Commit aa127655 authored by lixiaofang's avatar lixiaofang

cookies

parent 49973df7
This diff is collapsed.
...@@ -101,7 +101,7 @@ def follow(cookies_get, id): ...@@ -101,7 +101,7 @@ def follow(cookies_get, id):
def time_conv(): def time_conv():
try: try:
now = datetime.datetime.now() now = datetime.datetime.now()
yes_time = now - datetime.timedelta(days=1) yes_time = now - datetime.timedelta(days=15)
return yes_time return yes_time
except: except:
return None return None
...@@ -111,7 +111,7 @@ def get_follw_majia(numtime): ...@@ -111,7 +111,7 @@ def get_follw_majia(numtime):
db = pymysql.connect(host="rm-2ze5k2we69904787l.mysql.rds.aliyuncs.com", user='work', passwd='Gengmei123', db = pymysql.connect(host="rm-2ze5k2we69904787l.mysql.rds.aliyuncs.com", user='work', passwd='Gengmei123',
db="alpha", port=3306) db="alpha", port=3306)
cursor = db.cursor() cursor = db.cursor()
cursor.execute("select temp1.user_id,temp1.email,temp2.user_id from account_user_auth temp1 left join (select user_id,follow_id,create_time from user_follow) temp2 on temp1.user_id=temp2.follow_id where temp1.email in ('s_05tmwu@shadow.com','s_07CRHt@shadow.com','s_0bdxxU@shadow.com','s_0mfxcO@shadow.com','s_0u6eaV@shadow.com','s_0UudEr@shadow.com','s_1b3v5V@shadow.com','s_ZVuLyC@shadow.com','s_1dbAoA@shadow.com','s_1dholX@shadow.com','s_1EpLlt@shadow.com','s_1EpLlt@shadow.com') and temp2.create_time like '%%%%%s%%%%' "%(numtime)) cursor.execute("select temp1.user_id,temp1.email,temp2.user_id from account_user_auth temp1 left join (select user_id,follow_id,create_time from user_follow) temp2 on temp1.user_id = temp2.follow_id where temp1.email in ('s_05tmwu@shadow.com','s_07CRHt@shadow.com','s_0bdxxU@shadow.com','s_0mfxcO@shadow.com','s_0u6eaV@shadow.com','s_0UudEr@shadow.com','s_1b3v5V@shadow.com','s_ZVuLyC@shadow.com','s_1dbAoA@shadow.com','s_1dholX@shadow.com','s_1EpLlt@shadow.com') and temp2.create_time like '%%%%%s%%%%' "%(numtime))
data = cursor.fetchall() data = cursor.fetchall()
data=list(data) data=list(data)
logging.info("Database version : %s " % data) logging.info("Database version : %s " % data)
......
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