Commit 4bd367fb authored by lixiaofang's avatar lixiaofang

add

parent a654b975
......@@ -20,19 +20,19 @@ def get_data(numtime, numtime2):
topic_id = list(data)
topic_id_list = []
logging.info("get topic_id:%s" % topic_id)
try:
for i in topic_id and topic_id:
cursor.execute(
"select user_id from user_extra where user_id =" + str(i[0]) + " and is_shadow =0")
"select user_id,is_shadow from user_extra where user_id =" + str(i[0]))
data = cursor.fetchall()
user_id = list(data)
if user_id:
if (user_id and user_id["is_shadow"] == 0) or len(data) == 0:
topic_id_list.append(i)
logging.info("Database version : %s " % topic_id_list)
pc.close()
except:
pass
return topic_id_list
except:
logging.error("catch exception,get_data:%s" % traceback.format_exc())
return []
......
......@@ -19,19 +19,18 @@ def get_data(numtime, numtime2):
topic_id = list(data)
topic_id_list = []
logging.info("get topic_id:%s" % topic_id)
try:
for i in topic_id and topic_id:
cursor.execute(
"select user_id from user_extra where user_id =" + str(i[0]) + " and is_shadow =0")
"select user_id from user_extra where user_id =" + str(i[0]))
data = cursor.fetchall()
user_id = list(data)
if user_id:
if (user_id and user_id["is_shadow"] == 0) or len(user_id) == 0:
topic_id_list.append(i)
logging.info("Database version : %s " % topic_id_list)
pc.close()
except:
pass
return topic_id_list
except:
logging.error("catch exception,get_data:%s" % traceback.format_exc())
return []
......
......@@ -21,7 +21,6 @@ def get_data(numtime, numtime2):
topic_id = list(data)
topic_id_list = []
logging.info("get topic_id:%s" % topic_id)
try:
for i in topic_id and topic_id:
cursor.execute(
"select user_id from user_extra where user_id =" + str(i[0]) + " and is_shadow =0")
......@@ -31,9 +30,9 @@ def get_data(numtime, numtime2):
topic_id_list.append(i)
logging.info("Database version : %s " % topic_id_list)
pc.close()
except:
pass
return topic_id_list
except:
logging.error("catch exception,get_data:%s" % traceback.format_exc())
return []
......
......@@ -121,9 +121,7 @@ def login():
try:
user_id = get_majia()
logging.info("get user_id:%s" % user_id)
cookies = get_cookies(user_id)
cookies = "yhlcnc7q3louskthgpjguoi5n7r326cm"
if cookies is not None:
return {'sessionid': cookies}
except:
......@@ -134,7 +132,7 @@ def login():
def logins(user_id):
try:
cookies = get_cookies(user_id)
cookies = "yhlcnc7q3louskthgpjguoi5n7r326cm"
# cookies = "yhlcnc7q3louskthgpjguoi5n7r326cm"
if cookies is not None:
return {'sessionid': cookies}
......
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