Commit 0de795f1 authored by lixiaofang's avatar lixiaofang

add

parent 5735bb51
...@@ -14,7 +14,7 @@ def get_data(numtime, numtime2): ...@@ -14,7 +14,7 @@ def get_data(numtime, numtime2):
cursor = pc.cursor() cursor = pc.cursor()
cursor.execute( cursor.execute(
"SELECT user_id,id FROM topic WHERE is_online=1 and create_time > '%s' and create_time < '%s'" % ( "SELECT user_id,id FROM topic WHERE is_online=1 and create_time > '%s' and create_time < '%s'" % (
numtime, numtime2)) numtime, numtime2))
data = cursor.fetchall() data = cursor.fetchall()
topic_id = list(data) topic_id = list(data)
topic_id_list = [] topic_id_list = []
...@@ -42,11 +42,8 @@ if __name__ == "__main__": ...@@ -42,11 +42,8 @@ if __name__ == "__main__":
for i in time_list: for i in time_list:
numtime,numtime2 = time_convs(i + 1, i - 1) numtime, numtime2 = time_convs(i + 1, i - 1)
logging.info("get numtime :%s "%numtime) user_id = get_data(numtime, numtime2)
logging.info("get numtime2 :%s"%numtime2)
user_id = get_data(numtime,numtime2)
dicts = {} dicts = {}
...@@ -69,14 +66,14 @@ if __name__ == "__main__": ...@@ -69,14 +66,14 @@ if __name__ == "__main__":
for i in range(urge_num): for i in range(urge_num):
time.sleep(random.randint(1, 10)) time.sleep(random.randint(10, 50))
cook = login() cook = login()
if cook is not None: if cook is not None:
click(cook, rand_id) click(cook, rand_id)
time.sleep(100) time.sleep(300)
except: except:
logging.error("catch exception,main:%s" % traceback.format_exc()) logging.error("catch exception,main:%s" % traceback.format_exc())
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