This commit is contained in:
LibraHp_0928 2024-11-14 15:22:21 +08:00
parent d852a0e9a0
commit f1ee7d6736
3 changed files with 4 additions and 6 deletions

View File

@ -78,7 +78,7 @@ jobs:
- name: Flet Build macOS (x86_64)
run: |
flet pack --name GetQzonehistory-latest main.py -i .\assets\icon.ico
flet pack --name GetQzonehistory-latest main.py -i ./assets/icon.ico
- name: Zip the macOS (x86_64) build
run: |

View File

@ -17,9 +17,7 @@ import traceback
import dateparser
import hashlib
import copy
from fake_useragent import UserAgent
ua = UserAgent()
# 程序版本
version = "1.0.2"
@ -68,7 +66,7 @@ headers = {
'sec-fetch-user': '?1',
'upgrade-insecure-requests': '1',
# Temporarily fix waf issues
'user-agent': ua.random,
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36 Edg/122.0.0.0',
}
@ -1051,6 +1049,7 @@ def main(page: ft.Page):
)
def get_message(start, count):
global is_stop
for i in range(5):
if i == 4:
log("请求频繁,换个时间再试吧", "ERROR")
@ -1236,7 +1235,7 @@ def main(page: ft.Page):
# 完成消息获取
content_area.content.clean()
if is_stop:
log("获取失败,换个时间再来吧", "WARNING")
log("获取失败,换个时间再来吧", "ERROR")
else:
log("获取成功!", "SUCCESS")
clean_content()

View File

@ -4,5 +4,4 @@ pandas==2.2.3
Requests==2.31.0
openpyxl==3.1.5
dateparser==1.2.0
fake-useragent==1.5.1
pyinstaller==6.11.0