Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
pooneyy committed Dec 10, 2023
1 parent f699a94 commit a8bde53
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,14 @@
- 题库开始记录选项id
- 2023.09.18
- 支持从已结束的学习项目导入作答记录
- 2023.12.10
- 修复`importData.py`在某些情况下无法正确获取作答记录的问题

### 题库更新日志

- 2023.09.21
- 新增了41个条目,现有条目376项
- 尽量补全了一些以往收录的题目的正确答案的选项id。现有327项条目记录(或补充)了正确答案的选项id,有49项条目找不到原始记录,无法补全正确答案的选项id。
- 新增了 41 个条目,现有条目 376 项
- 尽量补全了一些以往收录的题目的正确答案的选项id。现有 327 项条目记录(或补充)了正确答案的选项id,有 49 项条目找不到原始记录,无法补全正确答案的选项id。
- 2023.10.01
- 新增了265个条目,现有条目641项
- 现有617项条目记录(或补充)了正确答案的选项id,剩余24项未补全正确选项id
- 新增了 265 个条目,现有条目 641 项
- 现有 617 项条目记录(或补充)了正确答案的选项id,剩余 24 项未补全正确选项id
10 changes: 5 additions & 5 deletions Utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@ def getUserExamId(self):
}
response = requests.post(url, data=payload, headers=self.headers)
data = json.loads(response.text)
for i in data['data']:
self.userExamIdList.append(i['id'])
if data['code'] != '-1':
for i in data['data']:
self.userExamIdList.append(i['id'])

def getPaperDetails(self):
'''返回一个字典,包含某一张试卷的详情'''
Expand Down Expand Up @@ -214,8 +215,7 @@ def getUserQuestionsBank():
questionsBankParse = Parse(login_State)
questionsBankParse.get_Project_Info()
questionsBankParse.getExamPlanId()
try:questionsBankParse.getUserExamId()
except KeyError:print("\033[0;31;40m输入的账户未找到作答记录\033[0m")
questionsBankParse.getUserExamId()
userQuestionsBank = questionsBankParse.getPaperDetails()
print(f"从{account['id']} 的账户中导入 {len(userQuestionsBank)} 条答题记录。请接着",end='')
print(f"从 {account['id']} 的账户中导入 {len(userQuestionsBank)} 条答题记录。请接着",end='')
return userQuestionsBank

0 comments on commit a8bde53

Please sign in to comment.