Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.50 KB | None | 0 0
  1. # coding=utf-8
  2. import requests
  3. import time
  4. from threading import Thread
  5.  
  6. def http ():
  7.     session = requests.Session()
  8.     while True:
  9.         try:
  10.             print(time.strftime("%S"),end = '')
  11.             start = session.get("http://www.csjh.ntpc.edu.tw/news/u_news_v2.asp?id={3E8BDD42-E167-4979-A201-187CB4AC9350}&newsid=3533")
  12.             print(start)
  13.         except:
  14.             print("重新連線中...")
  15.            
  16. for i in range(100):
  17.     thrd = Thread(target = http)
  18.     thrd.start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement