Commit eb2cfa9b authored by lixiaofang's avatar lixiaofang

add

parent 2e640f97
This diff is collapsed.
...@@ -83,7 +83,7 @@ def get_majia(): ...@@ -83,7 +83,7 @@ def get_majia():
def get_cookies(user_id): def get_cookies(user_id):
try: try:
with open("/srv/apps/cybertron/user_session.txt", 'r') as f: with open("/data/log/cybertron/app/user_session.txt", 'r') as f:
try: try:
data = f.readlines() data = f.readlines()
except: except:
...@@ -294,7 +294,7 @@ def get_offline_comment(): ...@@ -294,7 +294,7 @@ def get_offline_comment():
# return None # return None
def get_user_id(): def get_user_id():
user_data = open("user_id.txt", "r") user_data = open("/data/log/cybertron/app/user_id.txt", "r")
user_list = [] user_list = []
for i in user_data.readlines(): for i in user_data.readlines():
......
...@@ -34,7 +34,7 @@ def get_data(): ...@@ -34,7 +34,7 @@ def get_data():
data = get_data() data = get_data()
print(data) print(data)
file = open("user_id.txt", "w") file = open("/data/log/cybertron/app/user_id.txt", "w")
if data: if data:
for i in data: for i in data:
......
...@@ -110,7 +110,7 @@ if __name__ == "__main__": ...@@ -110,7 +110,7 @@ if __name__ == "__main__":
46629374, 46629385, 46629416, 46629419, 46629424, 46629683, 46629740, 46629782, 46629804, 46629820, 46629374, 46629385, 46629416, 46629419, 46629424, 46629683, 46629740, 46629782, 46629804, 46629820,
46629877, 46630485] 46629877, 46630485]
user_data = open("/srv/apps/cybertron/user_id.txt", "r") user_data = open("/data/log/cybertron/app/user_id.txt", "r")
user_list = [] user_list = []
for i in user_data.readlines(): for i in user_data.readlines():
user_list.append(i) user_list.append(i)
......
...@@ -66,7 +66,7 @@ if __name__ == "__main__": ...@@ -66,7 +66,7 @@ if __name__ == "__main__":
46629205, 46629207, 46629211, 46629227, 46629230, 46629232, 46629252, 46629274, 46629304, 46629205, 46629207, 46629211, 46629227, 46629230, 46629232, 46629252, 46629274, 46629304,
46629305, 46629309, 46629313, 46629338, 46629419, 46630746 46629305, 46629309, 46629313, 46629338, 46629419, 46630746
] ]
user_data = open("/srv/apps/cybertron/user_id.txt", "r") user_data = open("/data/log/cybertron/app/user_id.txt", "r")
user_list = [] user_list = []
for i in user_data.readlines(): for i in user_data.readlines():
user_list.append(i) user_list.append(i)
......
...@@ -59,7 +59,7 @@ if __name__ == "__main__": ...@@ -59,7 +59,7 @@ if __name__ == "__main__":
now = datetime.datetime.now() now = datetime.datetime.now()
yes_time = now - datetime.timedelta(minutes=5) yes_time = now - datetime.timedelta(minutes=5)
user_data = open("/srv/apps/cybertron/user_id.txt", "r") user_data = open("/data/log/cybertron/app/user_id.txt", "r")
user_list = [] user_list = []
for i in user_data.readlines(): for i in user_data.readlines():
user_list.append(i) user_list.append(i)
......
...@@ -58,7 +58,7 @@ if __name__ == "__main__": ...@@ -58,7 +58,7 @@ if __name__ == "__main__":
now = datetime.datetime.now() now = datetime.datetime.now()
yes_time = now - datetime.timedelta(days=6) yes_time = now - datetime.timedelta(days=6)
yes_time_str = yes_time.strftime('%Y-%m-%d') yes_time_str = yes_time.strftime('%Y-%m-%d')
user_data = open("/srv/apps/cybertron/user_id.txt", "r") user_data = open("/data/log/cybertron/app/user_id.txt", "r")
user_list = [] user_list = []
for i in user_data.readlines(): for i in user_data.readlines():
user_list.append(i) user_list.append(i)
......
...@@ -48,7 +48,7 @@ def get_cook(): ...@@ -48,7 +48,7 @@ def get_cook():
dicts = get_cook() dicts = get_cook()
with open("user_session.txt", 'w') as f: with open("/data/log/cybertron/app/user_session.txt", 'w') as f:
for key, value in dicts.items(): for key, value in dicts.items():
f.write(key) f.write(key)
f.write(",") f.write(",")
......
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