We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
以下是自己写的实现代码 未验证未提交时是否可以获取到正确选项
import requests mobtokan = 'xxx' userid = 'xxx' classid = 'xxx' HEADER = { 'eds-scope': 'xxx', 'cookie':'STUDY_SESS="xxx"' } def getClassActivity(classroomId): return requests.post("https://www.icourse163.org/mm-classroom/mob/j/v1/classroomManageBean.getClassroomLessonActivity4Stu.rpc",data={"mob-token":mobtokan,"classroomId":classroomId}).json() def getAnswerFrom(answerFormId,paperId,userId): return requests.get("https://www.icourse163.org/mm-tiku/api/mobile/paper/answerform/view",params={"answerFormId":answerFormId,"paperId":paperId,"userId":userId},headers=HEADER,cookies=COOKIE).json() classActivity = getClassActivity(classid)['results'] for i in classActivity['activities']: if i['activityType'] == 2: print(i['paper']) answerFrom = getAnswerFrom(i['paper']['answerformId'],i['paper']['id'],userid) HTMLContent = "" num = 1 for i in answerFrom['result']['nodes']: if i['questionData']['trueOrFalseQuestionContent']: HTMLContent += f"<br><br>{num}. 判断题:{i['questionData']['trueOrFalseQuestionContent']['title'].replace('<br>','')}" HTMLContent += f"<br>答案:{'对' if i['questionData']['trueOrFalseQuestionContent']['stdAnswer'] else '错'}" if i['questionData']['singleChoiceQuestionContent']: HTMLContent += f"<br><br>{num}. 单选题:{i['questionData']['singleChoiceQuestionContent']['title'].replace('<br>','')}" for p in i['questionData']['singleChoiceQuestionContent']['choicesAnswers']: HTMLContent += f"<br>{p['content'].replace('<br>','')} ({'<span style=color:red>正确</span>' if p['correct'] else '错误'})" HTMLContent += "<br><br><br>" num += 1 with open("output.html",'w+') as f: f.write(HTMLContent)
效果:
The text was updated successfully, but these errors were encountered:
哦哦,懂了懂了
Sorry, something went wrong.
你目前验证了在未提交的情况下是否可以修改请求参数实现获取测试答案吗?
之后尝试过好像是不太行
No branches or pull requests
以下是自己写的实现代码 未验证未提交时是否可以获取到正确选项
效果:
The text was updated successfully, but these errors were encountered: