mirror of
https://github.com/JasonYANG170/AutoCheckBJMF.git
synced 2024-11-23 12:16:25 +00:00
fix:
1. 修复cookie变量错误导致无法正常启动程序的错误 2. 修复蜜汁变量重复导致从第二轮开始无法正常检索当前正在进行的签到的错误
This commit is contained in:
parent
4a2e53c993
commit
a61a2c2651
6
main.py
6
main.py
|
@ -45,7 +45,7 @@ with open('data.json', 'r') as file:
|
||||||
if (json_data['cookie'] == "123"):
|
if (json_data['cookie'] == "123"):
|
||||||
MyCookie = input("请输入你的Cookie:")
|
MyCookie = input("请输入你的Cookie:")
|
||||||
else:
|
else:
|
||||||
scheduletime = json_data['cookie'] # int(input("请输入检索时长,建议>60s:"))
|
MyCookie = json_data['cookie'] # int(input("请输入检索时长,建议>60s:"))
|
||||||
print("----------配置定时任务(可选)----------")
|
print("----------配置定时任务(可选)----------")
|
||||||
print("格式为00:00,不设置定时请留空")
|
print("格式为00:00,不设置定时请留空")
|
||||||
print("提示:请使用英文符号“:”不要使用中文符号“:”")
|
print("提示:请使用英文符号“:”不要使用中文符号“:”")
|
||||||
|
@ -124,7 +124,7 @@ def job():
|
||||||
if matches:
|
if matches:
|
||||||
for match in matches:
|
for match in matches:
|
||||||
print(match)
|
print(match)
|
||||||
url = "http://k8n.cn/student/punchs/course/" + ClassID + "/" + match
|
url1 = "http://k8n.cn/student/punchs/course/" + ClassID + "/" + match
|
||||||
payload = {
|
payload = {
|
||||||
'id': match,
|
'id': match,
|
||||||
'lat': X,
|
'lat': X,
|
||||||
|
@ -134,7 +134,7 @@ def job():
|
||||||
'gps_addr': ''#未知,抓取时该函数为空
|
'gps_addr': ''#未知,抓取时该函数为空
|
||||||
}
|
}
|
||||||
|
|
||||||
response = requests.post(url, headers=headers, data=payload)
|
response = requests.post(url1, headers=headers, data=payload)
|
||||||
|
|
||||||
if response.status_code == 200:
|
if response.status_code == 200:
|
||||||
print("请求成功")
|
print("请求成功")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user