fix: 修复提交作业失败

This commit is contained in:
2026-04-24 14:51:39 +08:00
parent 70aaf144a5
commit 17c27372b0

17
main.py
View File

@@ -84,7 +84,7 @@ def replace_html_entities(text, replace_mode="keep_char"):
class CKWK: class CKWK:
def __init__(self, un: str, pw: str, host: str, ai_type="kimi") -> None: def __init__(self, un: str, pw: str, host: str, ai_type="deepseek") -> None:
""" """
un: 用户名 un: 用户名
pw: 密码 pw: 密码
@@ -113,13 +113,13 @@ class CKWK:
adapter = HTTPAdapter(max_retries=retry_strategy) adapter = HTTPAdapter(max_retries=retry_strategy)
self.session.mount("http://", adapter) self.session.mount("http://", adapter)
self.session.mount("https://", adapter) self.session.mount("https://", adapter)
# self.session.verify = False self.session.verify = False
# self.session.proxies.update( self.session.proxies.update(
# { {
# "http": "http://127.0.0.1:9000", "http": "http://127.0.0.1:9000",
# "https": "http://127.0.0.1:9000", "https": "http://127.0.0.1:9000",
# } }
# ) )
self.username = un self.username = un
self.host = host self.host = host
self.password = pw self.password = pw
@@ -369,6 +369,7 @@ class CKWK:
while aa == 1: while aa == 1:
print(f"作业链接: {self.start_url}") print(f"作业链接: {self.start_url}")
aa = input("现在是最后一道题,请你去检查后输入 0 后自动提交:") aa = input("现在是最后一道题,请你去检查后输入 0 后自动提交:")
aa = int(aa)
if aa == 0: if aa == 0:
data["finish"] = "1" data["finish"] = "1"
resp = self.session.post( resp = self.session.post(