python爬虫
·
https://segmentfault.com/a/1190000003933903
定时:
#!/usr/bin/env python
#coding=utf8
import time
import requests
while True:
current_time = time.localtime(time.time())
if((current_time.tm_hour == 0) and (current_time.tm_min == 0) and (current_time.tm_sec == 01)):
url = 'xxxxxxxxxxxxxxxxxxxxxx/'
res = requests.get(url)
print res
print "Hello World",current_time.tm_hour,current_time.tm_min,current_time.tm_sec
time.sleep(1)
更多推荐



所有评论(0)