From a61a2c265198f716e714ebca7905c5b2100cbc30 Mon Sep 17 00:00:00 2001 From: GoodBoyboy Date: Wed, 10 Apr 2024 18:31:40 +0800 Subject: [PATCH] fix: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 修复cookie变量错误导致无法正常启动程序的错误 2. 修复蜜汁变量重复导致从第二轮开始无法正常检索当前正在进行的签到的错误 --- main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 6acec46..539512d 100644 --- a/main.py +++ b/main.py @@ -45,7 +45,7 @@ with open('data.json', 'r') as file: if (json_data['cookie'] == "123"): MyCookie = input("请输入你的Cookie:") else: - scheduletime = json_data['cookie'] # int(input("请输入检索时长,建议>60s:")) + MyCookie = json_data['cookie'] # int(input("请输入检索时长,建议>60s:")) print("----------配置定时任务(可选)----------") print("格式为00:00,不设置定时请留空") print("提示:请使用英文符号“:”不要使用中文符号“:”") @@ -124,7 +124,7 @@ def job(): if matches: for match in matches: print(match) - url = "http://k8n.cn/student/punchs/course/" + ClassID + "/" + match + url1 = "http://k8n.cn/student/punchs/course/" + ClassID + "/" + match payload = { 'id': match, 'lat': X, @@ -134,7 +134,7 @@ def job(): 'gps_addr': ''#未知,抓取时该函数为空 } - response = requests.post(url, headers=headers, data=payload) + response = requests.post(url1, headers=headers, data=payload) if response.status_code == 200: print("请求成功")