mirror of
https://github.com/LibraHp/GetQzonehistory.git
synced 2024-12-26 14:09:09 +00:00
优化代码逻辑,修复时间格式不正确导致的排序问题
This commit is contained in:
parent
822e4b2f66
commit
238dc0d8f3
5
main.py
5
main.py
@ -28,8 +28,8 @@ def safe_strptime(date_str):
|
||||
# 尝试按照指定格式解析日期
|
||||
return datetime.strptime(date_str, "%Y年%m月%d日 %H:%M")
|
||||
except ValueError:
|
||||
# 如果日期格式不对,返回 None
|
||||
return None
|
||||
# 如果日期格式不对,返回 datetime.max
|
||||
return datetime.max
|
||||
|
||||
|
||||
# 还原QQ空间网页版说说
|
||||
@ -140,6 +140,7 @@ def save_data():
|
||||
open_file(current_directory + user_save_path[1:])
|
||||
os.system('pause')
|
||||
|
||||
|
||||
def open_file(file_path):
|
||||
# 检查操作系统
|
||||
if platform.system() == 'Windows':
|
||||
|
BIN
resource/.DS_Store
vendored
BIN
resource/.DS_Store
vendored
Binary file not shown.
@ -80,7 +80,7 @@ def get_login_user_info():
|
||||
def get_message_count():
|
||||
# 初始的总量范围
|
||||
lower_bound = 0
|
||||
upper_bound = 100000 # 假设最大总量为1000000
|
||||
upper_bound = 10000000 # 假设最大总量为1000000
|
||||
total = upper_bound // 2 # 初始的总量为上下界的中间值
|
||||
with tqdm(desc="正在获取消息列表数量...") as pbar:
|
||||
while lower_bound <= upper_bound:
|
||||
|
Loading…
Reference in New Issue
Block a user