Commit d8649ae6 authored by lixiaofang's avatar lixiaofang

add

parent ed855e77
...@@ -28,23 +28,26 @@ if __name__ == "__main__": ...@@ -28,23 +28,26 @@ if __name__ == "__main__":
logging.info("Database version : %s " % topic_id_list) logging.info("Database version : %s " % topic_id_list)
pc.close() pc.close()
def fun_timer(): topic_id_list = [919337,927745]
if topic_id_list:
for id in topic_id_list: def fun_timer():
cookies = login()
if cookies:
click(cookies, id)
global timer for id in topic_id_list:
timer = threading.Timer(3, fun_timer) cookies = login()
timer.start() if cookies:
timer = threading.Timer(4, fun_timer) click(cookies, id)
timer.start()
timer = threading.Timer(5, fun_timer)
timer.start()
timer = threading.Timer(1, fun_timer) # 首次启动 global timer
timer.start() timer = threading.Timer(3, fun_timer)
timer.start()
# timer = threading.Timer(4, fun_timer)
# timer.start()
# timer = threading.Timer(5, fun_timer)
# timer.start()
timer = threading.Timer(1, fun_timer) # 首次启动
timer.start()
except: except:
logging.error("catch exception,main:%s" % traceback.format_exc()) logging.error("catch exception,main:%s" % traceback.format_exc())
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment