更新导出的csv命名方式

This commit is contained in:
xaoyaoo committed 2024-01-09 21:11:01 +08:00
1 parent 63dce8ea26
commit 5a3f874178
2 files changed
+3 -4

No files matched your search

+1
View File
@@ -229,6 +229,7 @@ def export_csv(username, outpath, MSG_ALL_db_path, page_size=5000):
start_index = i
data = get_msg_list(MSG_ALL_db_path, username, start_index, page_size)
if len(data) == 0:
return False, "没有聊天记录"
break
save_path = os.path.join(outpath, f"{username}_{i}_{i + page_size}.csv")
with open(save_path, "w", encoding="utf-8") as f: