Commit 7f65fceb authored by lixiaofang's avatar lixiaofang

add

parent c46254ac
......@@ -41,7 +41,7 @@ def get_data(numtime):
def write_id_file(id):
try:
data = open("save_topic_id.txt", "w")
data = open("save_topic_id.txt", "a")
data.write(str(id))
data.write("/n")
......
......@@ -14,7 +14,7 @@ def write_id_file():
data = open("save_topic_id.txt", "r")
data2 = open("save_topic_id_three.txt", "w")
for i in data.readlines():
data2.write(str(i))
data2.write(str(i.strip()))
data2.write("\n")
user_ids.append(int(i))
data.truncate()
......
......@@ -13,7 +13,7 @@ def write_id_file():
user_ids = []
data = open("save_topic_id_three.txt", "r")
for i in data.readlines():
user_ids.append(int(i))
user_ids.append(int(i.strip()))
data.truncate()
return user_ids
except:
......
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