diff --git a/main.py b/main.py index 53a9a59..1fc851f 100644 --- a/main.py +++ b/main.py @@ -408,6 +408,11 @@ class CKWK: headers=headers, ) + if resp.status_code == 200 and resp.json().get("status", False): + self.log( + f'{index}/{len(self.qas)} 提交答案: {resp.json().get("msg", "")} {answerID} => {answer} {final}' + ) + if not final: aa = 1 while aa == 1: @@ -422,11 +427,6 @@ class CKWK: ) break - if resp.status_code == 200 and resp.json().get("status", False): - self.log( - f'{index}/{len(self.qas)} 提交答案: {resp.json().get("msg", "")} {answerID} => {answer} {final}' - ) - def get_course(self, _id: str) -> tuple[int, int]: resp = self.session.get("https://{}/user/node?nodeId={}".format(self.host, _id)) if resp.status_code == 200 and "错误提示" not in resp.text: