Commit 6591556c authored by lixiaofang's avatar lixiaofang

cookies

parent e5b7e34f
This diff is collapsed.
......@@ -141,7 +141,7 @@ def click(cookies_get, id):
try:
post_dict = {
'type': 1,
'type': 0,
'id': id
}
response = requests.post(url=auto_click_url,
......
......@@ -89,7 +89,7 @@ def click(cookies_get, id):
try:
post_dict = {
'type': 1,
'type': 0,
'id': id
}
response = requests.post(url=auto_click_url,
......
......@@ -84,7 +84,7 @@ def click(cookies_get, id):
try:
post_dict = {
'type': 1,
'type': 0,
'id': id
}
response = requests.post(url=auto_click_url,
......@@ -122,7 +122,6 @@ def get_data(numtime):
logging.error("catch exception,get_data:%s" % traceback.format_exc())
return None
if __name__ == "__main__":
try:
......
......@@ -53,8 +53,6 @@ def logins():
user_id = get_majia()
user_id='s_ZgFfzC@shadow.com'
cookies = index_first()
if cookies is None:
......
......@@ -154,7 +154,7 @@ def get_commnet_id(numtime):
if i[0] is not None:
user_id.append(i)
print("Database version : %s " % user_id)
logging.info("Database version : %s " % user_id)
db.close()
......
......@@ -163,28 +163,34 @@ def get_star_topic_id(numtime):
return None
if __name__ == "__main__":
try:
numtime = time_conv(1)
time_list = [1,2,3,4,5,6,7]
topic_id = get_star_topic_id(numtime)
for i in time_list:
for j in topic_id:
numtime = time_conv(i)
id = int(j[0])
user_id = get_star_topic_id(numtime)
# time.sleep(random.randint(200,500))
for j in user_id:
urge_num = random.randint(0, 1)
id = int(j[0])
for i in range(urge_num):
# time.sleep(random.randint(200,500))
cookies = logins()
urge_num = random.randint(0, 1)
if cookies is not None:
for i in range(1):
cookies = logins()
if cookies is not None:
click(cookies, id)
click(cookies, id)
# time.sleep(random.randint(500, 1000))
# time.sleep(random.randint(500, 1000))
user_id = get_star_user_id(numtime)
......@@ -194,18 +200,18 @@ if __name__ == "__main__":
# time.sleep(random.randint(200,500))
urge_num = random.randint(1,2)
urge_num = random.randint(1, 2)
for i in range(urge_num):
cookies = logins()
if cookies is not None:
follow(cookies,id)
follow(cookies, id)
# time.sleep(random.randint(500, 1000))
except:
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