mirror of
https://github.com/LibraHp/GetQzonehistory.git
synced 2025-01-01 09:39:55 +00:00
update
This commit is contained in:
parent
d852a0e9a0
commit
f1ee7d6736
2
.github/workflows/build-and-release.yml
vendored
2
.github/workflows/build-and-release.yml
vendored
@ -78,7 +78,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Flet Build macOS (x86_64)
|
- name: Flet Build macOS (x86_64)
|
||||||
run: |
|
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
|
- name: Zip the macOS (x86_64) build
|
||||||
run: |
|
run: |
|
||||||
|
7
main.py
7
main.py
@ -17,9 +17,7 @@ import traceback
|
|||||||
import dateparser
|
import dateparser
|
||||||
import hashlib
|
import hashlib
|
||||||
import copy
|
import copy
|
||||||
from fake_useragent import UserAgent
|
|
||||||
|
|
||||||
ua = UserAgent()
|
|
||||||
# 程序版本
|
# 程序版本
|
||||||
version = "1.0.2"
|
version = "1.0.2"
|
||||||
|
|
||||||
@ -68,7 +66,7 @@ headers = {
|
|||||||
'sec-fetch-user': '?1',
|
'sec-fetch-user': '?1',
|
||||||
'upgrade-insecure-requests': '1',
|
'upgrade-insecure-requests': '1',
|
||||||
# Temporarily fix waf issues
|
# 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):
|
def get_message(start, count):
|
||||||
|
global is_stop
|
||||||
for i in range(5):
|
for i in range(5):
|
||||||
if i == 4:
|
if i == 4:
|
||||||
log("请求频繁,换个时间再试吧", "ERROR")
|
log("请求频繁,换个时间再试吧", "ERROR")
|
||||||
@ -1236,7 +1235,7 @@ def main(page: ft.Page):
|
|||||||
# 完成消息获取
|
# 完成消息获取
|
||||||
content_area.content.clean()
|
content_area.content.clean()
|
||||||
if is_stop:
|
if is_stop:
|
||||||
log("获取失败,换个时间再来吧", "WARNING")
|
log("获取失败,换个时间再来吧", "ERROR")
|
||||||
else:
|
else:
|
||||||
log("获取成功!", "SUCCESS")
|
log("获取成功!", "SUCCESS")
|
||||||
clean_content()
|
clean_content()
|
||||||
|
@ -4,5 +4,4 @@ pandas==2.2.3
|
|||||||
Requests==2.31.0
|
Requests==2.31.0
|
||||||
openpyxl==3.1.5
|
openpyxl==3.1.5
|
||||||
dateparser==1.2.0
|
dateparser==1.2.0
|
||||||
fake-useragent==1.5.1
|
|
||||||
pyinstaller==6.11.0
|
pyinstaller==6.11.0
|
||||||
|
Loading…
Reference in New Issue
Block a user