From d13719a95291876e428456286a97049709d2d869 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=96=9B=E5=AE=9A=E8=B0=94=E7=9A=84=E6=8C=89=E9=92=AE?= Date: Sat, 12 Jul 2025 21:30:40 +0800 Subject: [PATCH 01/31] =?UTF-8?q?=E4=B8=AD=E9=80=94=E6=8D=A2=E7=94=B5?= =?UTF-8?q?=E8=84=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- requirements.txt | 5 +- rubbish/get_corret_answer.py | 94 ++ {src => rubbish}/get_oss_token.py | 0 rubbish/tmp.json | 1406 +++++++++++++++++++++++++++++ rubbish/tmp.py | 42 +- 5 files changed, 1510 insertions(+), 37 deletions(-) create mode 100644 rubbish/get_corret_answer.py rename {src => rubbish}/get_oss_token.py (100%) create mode 100644 rubbish/tmp.json diff --git a/requirements.txt b/requirements.txt index 9361fa7..a8bab36 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ -selenium -pyyaml \ No newline at end of file +selenium~=4.34.2 +pyyaml~=6.0.2 +requests~=2.32.4 \ No newline at end of file diff --git a/rubbish/get_corret_answer.py b/rubbish/get_corret_answer.py new file mode 100644 index 0000000..7c85d66 --- /dev/null +++ b/rubbish/get_corret_answer.py @@ -0,0 +1,94 @@ +import json + +import requests +from urllib.parse import urlparse + +# 创建会话对象 +session = requests.Session() + +# 设置 User-Agent +session.headers.update({ + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36 Edg/138.0.0.0" +}) + +# 只添加 token cookie +session.cookies.set( + name="token", + value="151028179-1-d65b0d54252a0394", + domain=".ewt360.com", + path="/" +) + +# 请求 URL +paperId='1969526514235999045' +reportId='2040881795217891454' +homeworkId='10389626' +userId='151028179' +url = f"https://web.ewt360.com/api/answerprod/web/answer/webreport/questionGroup?paperId={paperId}&reportId={reportId}&platform=1&bizCode=205&homeworkId={homeworkId}&userId={userId}" + +# 请求头 (保留所有原始头部) +headers = { + "authority": "web.ewt360.com", + "method": "GET", + "path": urlparse(url).path + "?" + urlparse(url).query, + "scheme": "https", + "accept": "application/json, text/plain, */*", + "accept-encoding": "gzip, deflate, br, zstd", + "accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6", + "access-control-allow-origin": "*", + "eagleeye-pappname": "aocb5mxsv0@c882b4be402630c", + "eagleeye-sessionid": "y9mOadU00X19e3psalIpu5beRwUs", + "eagleeye-traceid": "ef11d5e6175232609247810112630c", + "ewt-contentstyle": "CamelCase", + "ewt-requestsource": "web", + "priority": "u=1, i", + "referer": "https://web.ewt360.com/mystudy/", + "referurl": "https://web.ewt360.com/mystudy/#/report?bizCode=205&homeworkId=10389626&paperId=1969526514235999045&platform=1&reportId=2040881795217891454", + "sec-ch-ua": "\"Not)A;Brand\";v=\"8\", \"Chromium\";v=\"138\", \"Microsoft Edge\";v=\"138\"", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "\"Windows\"", + "sec-fetch-dest": "empty", + "sec-fetch-mode": "cors", + "sec-fetch-site": "same-origin", + "token": "151028179-1-d65b0d54252a0394", # 头部中的token + "x-requested-with": "XMLHttpRequest" +} + +try: + # 发送 GET 请求 + response = session.get( + url, + headers=headers, + timeout=15 + ) + + # 检查响应状态 + response.raise_for_status() + + # 输出结果 + print(f"请求成功! 状态码: {response.status_code}") + + # 尝试解析 JSON + try: + json_data = response.json() + print("响应JSON内容:") + print(json_data) + except ValueError: + print("响应文本内容:") + # print(response.text[:1000]) # 显示前1000个字符 + json2 = json.loads(response.text)['data']['groups']['questions'] + # # 调试信息 + # print("\n调试信息:") + # print(f"最终请求URL: {response.url}") + # print(f"发送的Cookies: {session.cookies.get_dict()}") + +except requests.exceptions.RequestException as e: + print(f"请求失败: {str(e)}") + if hasattr(e, 'response') and e.response is not None: + print(f"错误状态码: {e.response.status_code}") + print(f"错误响应: {e.response.text[:500]}") + + # 输出请求详情以便调试 + print("\n请求详情:") + print(f"URL: {url}") + print(f"Headers: {headers}") \ No newline at end of file diff --git a/src/get_oss_token.py b/rubbish/get_oss_token.py similarity index 100% rename from src/get_oss_token.py rename to rubbish/get_oss_token.py diff --git a/rubbish/tmp.json b/rubbish/tmp.json new file mode 100644 index 0000000..2c444e7 --- /dev/null +++ b/rubbish/tmp.json @@ -0,0 +1,1406 @@ +{ + 'success': True, + 'code': '200', + 'msg': '操作成功', + 'data': { + 'subjectId': 2, + 'subjectName': '数学', + 'paperId': '1969526514235999045', + 'reportId': '2040881795217891454', + 'title': 'B2025-2026学年高一数学必修二综合测试卷1', + 'useTimeStr': '1分42秒', + 'totalTimeStr': '120分钟', + 'myTotalScore': 100.0, + 'totalScore': 150.0, + 'lessons': [{ + 'courseId': '16185', + 'lessonId': '75001', + 'playTime': '11分56秒', + 'img': 'https://static.ewt360.com/upload/ewt/kecheng/2018/12/11/20181211162732140.png', + 'bgImg': 'https://static.ewt360.com/upload/ewt/kecheng/2018/12/27/20181227152923200.png', + 'videoTitle': 'B利用数形结合思想解平面向量问题专题测试卷-T6', + 'color': '#418282', + 'teacherImg': 'http://file.ewt360.com/file/1316391138168431278', + 'url': '/site-study/#/playVideo?courseId=16185&lessonId=75001&from=report_recommend', + 'subjectId': 0, + 'playRatio': '0.0', + 'questionId': '1195892489857859996' + }, + { + 'courseId': '14801', + 'lessonId': '67061', + 'playTime': '8分16秒', + 'img': 'https://static.ewt360.com/upload/ewt/kecheng/2018/12/11/20181211162732140.png', + 'bgImg': 'https://static.ewt360.com/upload/ewt/kecheng/2018/12/27/20181227152923200.png', + 'videoTitle': '拔尖1+T8', + 'color': '#418282', + 'teacherImg': 'http://file.ewt360.com/file/879911599202205696', + 'url': '/site-study/#/playVideo?courseId=14801&lessonId=67061&from=report_recommend', + 'subjectId': 0, + 'playRatio': '0.0', + 'questionId': '1178807249539383663' + }, + { + 'courseId': '14801', + 'lessonId': '67063', + 'playTime': '8分57秒', + 'img': 'https://static.ewt360.com/upload/ewt/kecheng/2018/12/11/20181211162732140.png', + 'bgImg': 'https://static.ewt360.com/upload/ewt/kecheng/2018/12/27/20181227152923200.png', + 'videoTitle': '拔尖1+T12', + 'color': '#418282', + 'teacherImg': 'http://file.ewt360.com/file/879911599202205696', + 'url': '/site-study/#/playVideo?courseId=14801&lessonId=67063&from=report_recommend', + 'subjectId': 0, + 'playRatio': '0.0', + 'questionId': '1176211356273243512' + }, + { + 'courseId': '14801', + 'lessonId': '67064', + 'playTime': '4分4秒', + 'img': 'https://static.ewt360.com/upload/ewt/kecheng/2018/12/11/20181211162732140.png', + 'bgImg': 'https://static.ewt360.com/upload/ewt/kecheng/2018/12/27/20181227152923200.png', + 'videoTitle': '拔尖1+T15', + 'color': '#418282', + 'teacherImg': 'http://file.ewt360.com/file/879911599202205696', + 'url': '/site-study/#/playVideo?courseId=14801&lessonId=67064&from=report_recommend', + 'subjectId': 0, + 'playRatio': '0.0', + 'questionId': '1176211356273243476' + }, + { + 'courseId': '14801', + 'lessonId': '67065', + 'playTime': '9分56秒', + 'img': 'https://static.ewt360.com/upload/ewt/kecheng/2018/12/11/20181211162732140.png', + 'bgImg': 'https://static.ewt360.com/upload/ewt/kecheng/2018/12/27/20181227152923200.png', + 'videoTitle': '拔尖1+T16', + 'color': '#418282', + 'teacherImg': 'http://file.ewt360.com/file/879911599202205696', + 'url': '/site-study/#/playVideo?courseId=14801&lessonId=67065&from=report_recommend', + 'subjectId': 0, + 'playRatio': '0.0', + 'questionId': '1176211251046528305' + }, + { + 'courseId': '14801', + 'lessonId': '67066', + 'playTime': '9分42秒', + 'img': 'https://static.ewt360.com/upload/ewt/kecheng/2018/12/11/20181211162732140.png', + 'bgImg': 'https://static.ewt360.com/upload/ewt/kecheng/2018/12/27/20181227152923200.png', + 'videoTitle': '拔尖1+T22', + 'color': '#418282', + 'teacherImg': 'http://file.ewt360.com/file/879911599202205696', + 'url': '/site-study/#/playVideo?courseId=14801&lessonId=67066&from=report_recommend', + 'subjectId': 0, + 'playRatio': '0.0', + 'questionId': '1176211375600604331' + }], + 'rightKnowledges': [{ + 'id': '311075', + 'title': '离散型随机变量的方差与标准差', + 'rate': 100.0 + }, + { + 'id': '317034', + 'title': '平面向量', + 'rate': 100.0 + }, + { + 'id': '310284', + 'title': '三角形的面积公式', + 'rate': 100.0 + }, + { + 'id': '310311', + 'title': '极化恒等式在平面向量问题中的应用', + 'rate': 100.0 + }, + { + 'id': '310842', + 'title': '利用正、余弦定理求解边长面积周长取值范围问题', + 'rate': 100.0 + }, + { + 'id': '310845', + 'title': '利用正、余弦定理解决高度测量问题', + 'rate': 100.0 + }, + { + 'id': '310938', + 'title': '求二面角', + 'rate': 100.0 + }, + { + 'id': '310583', + 'title': '计算古典概型问题的概率', + 'rate': 75.0 + }, + { + 'id': '310457', + 'title': '立体几何中的动态问题', + 'rate': 72.7 + }, + { + 'id': '315621', + 'title': '事件的相互独立性', + 'rate': 68.4 + }, + { + 'id': '311092', + 'title': '频率分布直方图的相关计算', + 'rate': 0.0 + }, + { + 'id': '310450', + 'title': '面面垂直的判定', + 'rate': 0.0 + }, + { + 'id': '310421', + 'title': '多面体的结构特征', + 'rate': 0.0 + }, + { + 'id': '311104', + 'title': '互斥事件与对立事件关系的辨析', + 'rate': 0.0 + }, + { + 'id': '310313', + 'title': '向量的模的坐标表示及坐标计算向量的模', + 'rate': 0.0 + }, + { + 'id': '310854', + 'title': '利用平面向量的数量积求夹角', + 'rate': 0.0 + }, + { + 'id': '310306', + 'title': '平面向量运算坐标表示的相关计算', + 'rate': 0.0 + }, + { + 'id': '310834', + 'title': '应用正弦定理解三角形', + 'rate': 0.0 + }, + { + 'id': '310615', + 'title': '共轭复数', + 'rate': 0.0 + }], + 'rightRate': 50.0, + 'allRight': False, + 'createPaperPara': None, + 'assignPointsFlag': True, + 'groups': [{ + 'index': 1, + 'groupId': 61657619, + 'groupName': '单选题', + 'groupInfo': '本题共8小题,共40分', + 'groupDeclare': '', + 'totalQuestions': 8, + 'totalScore': 40.0, + 'myTotalScore': 5.0, + 'questions': [{ + 'id': '1176211375600604287', + 'scoreCriterion': '', + 'cate': 1, + 'cateName': '单选', + 'subjectQuestionType': 1020101, + 'subjectQuestionTypeName': '单选题', + 'questionContent': '
复数满足,则复数的共轭复数(\u3000\u3000)
', + 'options': [{ + 'index': 0, + 'choice': 'A', + 'option': '
' + }, + { + 'index': 1, + 'choice': 'B', + 'option': '' + }, + { + 'index': 2, + 'choice': 'C', + 'option': '' + }, + { + 'index': 3, + 'choice': 'D', + 'option': '' + }], + 'myAnswer': ['A'], + 'myAnswers': ['A'], + 'attachmentImages': [], + 'rightStatus': 3, + 'rightAnswer': ['C'], + 'isRecordCorrected': 1, + 'recordCorrectUserType': 5, + 'degreeRange': 8.0, + 'degreeRangeDesc': '易', + 'questionType': 0, + 'questionSource': 1, + 'source': 1, + 'audioUrl': '', + 'questionSort': 1, + 'analyse': '
∵,∴,∴.
故选C.
', + 'method': None, + 'childQuestions': [], + 'knowledges': [{ + 'id': '310615', + 'title': '共轭复数' + }], + 'revision': True, + 'score': 5.0, + 'myScore': 0.0, + 'scoreList': [0.0, 1.0, 2.0, 3.0, 4.0, 5.0], + 'lessons': [], + 'collected': False, + 'subjectId': 2, + 'questionNo': 1, + 'questionNoShow': '1', + 'subjective': False, + 'groupSort': 1, + 'groupName': '单选题', + 'groupInfo': '本题共8小题,共40分', + 'groupDeclare': '' + }, + { + 'id': '1178807127132792160', + 'scoreCriterion': '', + 'cate': 1, + 'cateName': '单选', + 'subjectQuestionType': 1020101, + 'subjectQuestionTypeName': '单选题', + 'questionContent': '
在2025年某地销售的汽车中随机选取1000台,对销售价格与销售数量进行统计,这1000台车辆的销售价格都不小于5万元,但小于30万元,将销售价格分为五组:,,,,(单位:万元).统计后制成的频率分布直方图如图所示.在选取的1000台汽车中,销售价格在内的车辆台数为(\u3000\u3000)
\n
', + 'options': [{ + 'index': 0, + 'choice': 'A', + 'option': '
800
' + }, + { + 'index': 1, + 'choice': 'B', + 'option': '600' + }, + { + 'index': 2, + 'choice': 'C', + 'option': '700' + }, + { + 'index': 3, + 'choice': 'D', + 'option': '750' + }], + 'myAnswer': ['B'], + 'myAnswers': ['B'], + 'attachmentImages': [], + 'rightStatus': 3, + 'rightAnswer': ['C'], + 'isRecordCorrected': 1, + 'recordCorrectUserType': 5, + 'degreeRange': 7.0, + 'degreeRangeDesc': '易', + 'questionType': 0, + 'questionSource': 1, + 'source': 1, + 'audioUrl': '', + 'questionSort': 2, + 'analyse': '
由图可得:,∴,
∴销售价格在内的频率为,
∴销售价格在内的车辆台数为.
故选C.
', + 'method': None, + 'childQuestions': [], + 'knowledges': [{ + 'id': '311092', + 'title': '频率分布直方图的相关计算' + }], + 'revision': True, + 'score': 5.0, + 'myScore': 0.0, + 'scoreList': [0.0, 1.0, 2.0, 3.0, 4.0, 5.0], + 'lessons': [], + 'collected': False, + 'subjectId': 2, + 'questionNo': 2, + 'questionNoShow': '2', + 'subjective': False, + 'groupSort': 1, + 'groupName': '单选题', + 'groupInfo': '本题共8小题,共40分', + 'groupDeclare': '' + }, + { + 'id': '1176211356273243473', + 'scoreCriterion': '', + 'cate': 1, + 'cateName': '单选', + 'subjectQuestionType': 1020101, + 'subjectQuestionTypeName': '单选题', + 'questionContent': '
甲、乙两位同学暑假计划从吉林省去河北省旅游,他们所搭乘动车的“”座位车厢,如图所示,若这两位同学买到了同一排的座位,则他们的座位正好相邻的概率为(\u3000\u3000)
\n
', + 'options': [{ + 'index': 0, + 'choice': 'A', + 'option': '
' + }, + { + 'index': 1, + 'choice': 'B', + 'option': '' + }, + { + 'index': 2, + 'choice': 'C', + 'option': '' + }, + { + 'index': 3, + 'choice': 'D', + 'option': '' + }], + 'myAnswer': ['C'], + 'myAnswers': ['C'], + 'attachmentImages': [], + 'rightStatus': 3, + 'rightAnswer': ['D'], + 'isRecordCorrected': 1, + 'recordCorrectUserType': 5, + 'degreeRange': 7.0, + 'degreeRangeDesc': '易', + 'questionType': 0, + 'questionSource': 1, + 'source': 1, + 'audioUrl': '', + 'questionSort': 3, + 'analyse': '
设事件为“他们的座位正好相邻”,
甲乙二人买到同一排,,,,,5个座位中的两个形成的样本空间为
\n
,共包含10个样本点,
其中事件,包含3个样本点,则有,
所以他们的座位正好相邻的概率为.
故选D.
', + 'method': None, + 'childQuestions': [], + 'knowledges': [{ + 'id': '310583', + 'title': '计算古典概型问题的概率' + }], + 'revision': True, + 'score': 5.0, + 'myScore': 0.0, + 'scoreList': [0.0, 1.0, 2.0, 3.0, 4.0, 5.0], + 'lessons': [], + 'collected': False, + 'subjectId': 2, + 'questionNo': 3, + 'questionNoShow': '3', + 'subjective': False, + 'groupSort': 1, + 'groupName': '单选题', + 'groupInfo': '本题共8小题,共40分', + 'groupDeclare': '' + }, + { + 'id': '1176211251046528302', + 'scoreCriterion': '', + 'cate': 1, + 'cateName': '单选', + 'subjectQuestionType': 1020101, + 'subjectQuestionTypeName': '单选题', + 'questionContent': '
已知向量,,若,则(\u3000\u3000)
', + 'options': [{ + 'index': 0, + 'choice': 'A', + 'option': '
' + }, + { + 'index': 1, + 'choice': 'B', + 'option': '1' + }, + { + 'index': 2, + 'choice': 'C', + 'option': '' + }, + { + 'index': 3, + 'choice': 'D', + 'option': '' + }], + 'myAnswer': ['B'], + 'myAnswers': ['B'], + 'attachmentImages': [], + 'rightStatus': 3, + 'rightAnswer': ['D'], + 'isRecordCorrected': 1, + 'recordCorrectUserType': 5, + 'degreeRange': 7.0, + 'degreeRangeDesc': '易', + 'questionType': 0, + 'questionSource': 1, + 'source': 1, + 'audioUrl': '', + 'questionSort': 4, + 'analyse': '
由,得,所以,
又,,则,所以.
故选D.
', + 'method': None, + 'childQuestions': [], + 'knowledges': [{ + 'id': '310306', + 'title': '平面向量运算坐标表示的相关计算' + }], + 'revision': True, + 'score': 5.0, + 'myScore': 0.0, + 'scoreList': [0.0, 1.0, 2.0, 3.0, 4.0, 5.0], + 'lessons': [], + 'collected': False, + 'subjectId': 2, + 'questionNo': 4, + 'questionNoShow': '4', + 'subjective': False, + 'groupSort': 1, + 'groupName': '单选题', + 'groupInfo': '本题共8小题,共40分', + 'groupDeclare': '' + }, + { + 'id': '1176211375600604288', + 'scoreCriterion': '', + 'cate': 1, + 'cateName': '单选', + 'subjectQuestionType': 1020101, + 'subjectQuestionTypeName': '单选题', + 'questionContent': '
设,是两个不同的平面,,是两条不同的直线,下列说法正确的是(\u3000\u3000)
', + 'options': [{ + 'index': 0, + 'choice': 'A', + 'option': '
若,,,则
' + }, + { + 'index': 1, + 'choice': 'B', + 'option': '若,,,则' + }, + { + 'index': 2, + 'choice': 'C', + 'option': '若,,,则' + }, + { + 'index': 3, + 'choice': 'D', + 'option': '若,,,则' + }], + 'myAnswer': ['C'], + 'myAnswers': ['C'], + 'attachmentImages': [], + 'rightStatus': 3, + 'rightAnswer': ['A'], + 'isRecordCorrected': 1, + 'recordCorrectUserType': 5, + 'degreeRange': 6.0, + 'degreeRangeDesc': '易', + 'questionType': 0, + 'questionSource': 1, + 'source': 1, + 'audioUrl': '', + 'questionSort': 5, + 'analyse': '
对于A,∵,,又,∴,故A选项正确;
对于B,∵,,,∴可绕任意旋转,∴与不一定垂直,故B选项错误;
对于C,∵,,,∴,故C选项错误;
对于D,∵,,,∴可绕任意旋转,∴与不一定垂直,故D选项错误.
故选A.
', + 'method': None, + 'childQuestions': [], + 'knowledges': [{ + 'id': '310450', + 'title': '面面垂直的判定' + }], + 'revision': True, + 'score': 5.0, + 'myScore': 0.0, + 'scoreList': [0.0, 1.0, 2.0, 3.0, 4.0, 5.0], + 'lessons': [], + 'collected': False, + 'subjectId': 2, + 'questionNo': 5, + 'questionNoShow': '5', + 'subjective': False, + 'groupSort': 1, + 'groupName': '单选题', + 'groupInfo': '本题共8小题,共40分', + 'groupDeclare': '' + }, + { + 'id': '1176211253194020070', + 'scoreCriterion': '', + 'cate': 1, + 'cateName': '单选', + 'subjectQuestionType': 1020101, + 'subjectQuestionTypeName': '单选题', + 'questionContent': '
中国古代四大名楼鹳雀楼,位于山西省运城市永济市蒲州镇,因唐代诗人王之涣的诗作《登鹳雀楼》而流芳后世.如图,某同学为测量鹳雀楼的高度,在鹳雀楼的正东方向找到一座建筑物,高约为,在地面上点处(,,三点共线)测得建筑物顶部,鹳雀楼顶部的仰角分别为和,在处测得楼顶部的仰角为,则鹳雀楼的高度约为(\u3000\u3000)
\n
', + 'options': [{ + 'index': 0, + 'choice': 'A', + 'option': '
' + }, + { + 'index': 1, + 'choice': 'B', + 'option': '' + }, + { + 'index': 2, + 'choice': 'C', + 'option': '' + }, + { + 'index': 3, + 'choice': 'D', + 'option': '' + }], + 'myAnswer': ['B'], + 'myAnswers': ['B'], + 'attachmentImages': [], + 'rightStatus': 1, + 'rightAnswer': ['B'], + 'isRecordCorrected': 1, + 'recordCorrectUserType': 5, + 'degreeRange': 6.0, + 'degreeRangeDesc': '易', + 'questionType': 0, + 'questionSource': 1, + 'source': 1, + 'audioUrl': '', + 'questionSort': 6, + 'analyse': '
由题意,在中,,
在中,,,
∴,由正弦定理,得,
∴在中,.
故选:B.
', + 'method': None, + 'childQuestions': [], + 'knowledges': [{ + 'id': '310845', + 'title': '利用正、余弦定理解决高度测量问题' + }], + 'revision': True, + 'score': 5.0, + 'myScore': 5.0, + 'scoreList': [0.0, 1.0, 2.0, 3.0, 4.0, 5.0], + 'lessons': [], + 'collected': False, + 'subjectId': 2, + 'questionNo': 6, + 'questionNoShow': '6', + 'subjective': False, + 'groupSort': 1, + 'groupName': '单选题', + 'groupInfo': '本题共8小题,共40分', + 'groupDeclare': '' + }, + { + 'id': '1195892489857859996', + 'scoreCriterion': '', + 'cate': 1, + 'cateName': '单选', + 'subjectQuestionType': 1020101, + 'subjectQuestionTypeName': '单选题', + 'questionContent': '
在平面内,定点,,,满足,,动点,满足,,则的最大值是(\u3000\u3000)
', + 'options': [{ + 'index': 0, + 'choice': 'A', + 'option': '
' + }, + { + 'index': 1, + 'choice': 'B', + 'option': '' + }, + { + 'index': 2, + 'choice': 'C', + 'option': '' + }, + { + 'index': 3, + 'choice': 'D', + 'option': '' + }], + 'myAnswer': ['C'], + 'myAnswers': ['C'], + 'attachmentImages': [], + 'rightStatus': 3, + 'rightAnswer': ['B'], + 'isRecordCorrected': 1, + 'recordCorrectUserType': 5, + 'degreeRange': 5.0, + 'degreeRangeDesc': '中', + 'questionType': 0, + 'questionSource': 1, + 'source': 1, + 'audioUrl': '', + 'questionSort': 7, + 'analyse': '
法一:由,可得为的外心,
又,可得,,
即,
即有,,可得为的垂心,
则为的中心,即为正三角形,
由,即有,
解得,所以的边长为,
以为坐标原点,所在直线为轴建立直角坐标系,
可得,,,
由,可设,
由,可得为的中点,即有,
则
,
当,即时,取得最大值.
\n
\n
法二:如图,根据已知,有,
因此有,,全等,
进而得到为正三角形,计算可得,
\n
\n
根据题意在以为圆心,1为半径的圆上运动,
因此的中点在以的中点为圆心、为半径的圆上运动,
因此的最大值为.
故选:B.
', + 'method': None, + 'childQuestions': [], + 'knowledges': [{ + 'id': '310313', + 'title': '向量的模的坐标表示及坐标计算向量的模' + }], + 'revision': True, + 'score': 5.0, + 'myScore': 0.0, + 'scoreList': [0.0, 1.0, 2.0, 3.0, 4.0, 5.0], + 'lessons': [{ + 'courseId': '16185', + 'lessonId': '75001', + 'playTime': '11分56秒', + 'img': 'https://static.ewt360.com/upload/ewt/kecheng/2018/12/11/20181211162732140.png', + 'bgImg': 'https://static.ewt360.com/upload/ewt/kecheng/2018/12/27/20181227152923200.png', + 'videoTitle': 'B利用数形结合思想解平面向量问题专题测试卷-T6', + 'color': '#418282', + 'teacherImg': 'http://file.ewt360.com/file/1316391138168431278', + 'url': '/site-study/#/playVideo?courseId=16185&lessonId=75001&from=report_recommend', + 'subjectId': 0, + 'playRatio': '0.0', + 'questionId': '1195892489857859996' + }], + 'collected': False, + 'subjectId': 2, + 'questionNo': 7, + 'questionNoShow': '7', + 'subjective': False, + 'groupSort': 1, + 'groupName': '单选题', + 'groupInfo': '本题共8小题,共40分', + 'groupDeclare': '' + }, + { + 'id': '1178807249539383663', + 'scoreCriterion': '', + 'cate': 1, + 'cateName': '单选', + 'subjectQuestionType': 1020101, + 'subjectQuestionTypeName': '单选题', + 'questionContent': '
《九章算术》是我国古代著名的数学著作,书中记载有几何体“刍甍”.现有一个刍甍如图所示,底面为正方形,平面,四边形,为两个全等的等腰梯形,,且,则此刍甍的外接球的表面积为(\u3000\u3000)
\n
', + 'options': [{ + 'index': 0, + 'choice': 'A', + 'option': '
' + }, + { + 'index': 1, + 'choice': 'B', + 'option': '' + }, + { + 'index': 2, + 'choice': 'C', + 'option': '' + }, + { + 'index': 3, + 'choice': 'D', + 'option': '' + }], + 'myAnswer': ['B'], + 'myAnswers': ['B'], + 'attachmentImages': [], + 'rightStatus': 3, + 'rightAnswer': ['C'], + 'isRecordCorrected': 1, + 'recordCorrectUserType': 5, + 'degreeRange': 5.0, + 'degreeRangeDesc': '中', + 'questionType': 0, + 'questionSource': 1, + 'source': 1, + 'audioUrl': '', + 'questionSort': 8, + 'analyse': '
如图所示,取,中点,,正方形中心,中点,连接,,,,
根据题意可得平面,,点是的中点,,
在等腰中,,,同理,
则等腰梯形的高为,
根据几何体的结构特征可知,刍甍的外接球的球心在直线上,连接,,,
因为正方形的外接圆的半径,则有,
而,,,
故,故点在线段的延长线上,
即有,则,解得,
则刍甍的外接球的半径为,
则刍甍的外接球的表面积为.
故选C.
\n
', + 'method': None, + 'childQuestions': [], + 'knowledges': [{ + 'id': '310421', + 'title': '多面体的结构特征' + }], + 'revision': True, + 'score': 5.0, + 'myScore': 0.0, + 'scoreList': [0.0, 1.0, 2.0, 3.0, 4.0, 5.0], + 'lessons': [{ + 'courseId': '14801', + 'lessonId': '67061', + 'playTime': '8分16秒', + 'img': 'https://static.ewt360.com/upload/ewt/kecheng/2018/12/11/20181211162732140.png', + 'bgImg': 'https://static.ewt360.com/upload/ewt/kecheng/2018/12/27/20181227152923200.png', + 'videoTitle': '拔尖1+T8', + 'color': '#418282', + 'teacherImg': 'http://file.ewt360.com/file/879911599202205696', + 'url': '/site-study/#/playVideo?courseId=14801&lessonId=67061&from=report_recommend', + 'subjectId': 0, + 'playRatio': '0.0', + 'questionId': '1178807249539383663' + }], + 'collected': False, + 'subjectId': 2, + 'questionNo': 8, + 'questionNoShow': '8', + 'subjective': False, + 'groupSort': 1, + 'groupName': '单选题', + 'groupInfo': '本题共8小题,共40分', + 'groupDeclare': '' + }], + 'rightQuestionsCount': 0, + 'rightRate': 0.0 + }, + { + 'index': 2, + 'groupId': 61657620, + 'groupName': '多选题', + 'groupInfo': '本题共3小题,共18分', + 'groupDeclare': '', + 'totalQuestions': 3, + 'totalScore': 18.0, + 'myTotalScore': 3.0, + 'questions': [{ + 'id': '1182074793012652102', + 'scoreCriterion': '', + 'cate': 2, + 'cateName': '多选', + 'subjectQuestionType': 1020201, + 'subjectQuestionTypeName': '多选题', + 'questionContent': '
下列说法中正确的是(\u3000\u3000)
', + 'options': [{ + 'index': 0, + 'choice': 'A', + 'option': '
三点确定一个平面
' + }, + { + 'index': 1, + 'choice': 'B', + 'option': '
在中,角,,所对应的边分别为,,,若,则为等腰三角形
' + }, + { + 'index': 2, + 'choice': 'C', + 'option': '已知,是非零向量,与所成的角为锐角的充要条件是' + }, + { + 'index': 3, + 'choice': 'D', + 'option': '若满足条件,,的有两个,则实数的取值范围是' + }], + 'myAnswer': ['A', 'C'], + 'myAnswers': ['A', 'C'], + 'attachmentImages': [], + 'rightStatus': 3, + 'rightAnswer': ['B', 'D'], + 'isRecordCorrected': 1, + 'recordCorrectUserType': 5, + 'degreeRange': 6.0, + 'degreeRangeDesc': '易', + 'questionType': 0, + 'questionSource': 1, + 'source': 1, + 'audioUrl': '', + 'questionSort': 9, + 'analyse': '
A:不共线的三点确定一个平面,故A错;
B:在中,若,则,
\n
所以,所以为等腰三角形,故B正确;
C:与所成的角为锐角的充要条件是且排除与同向共线,故C错;
D:由正弦定理,可得,由题意得:当时,满足条件的有两个,所以,解得,故D正确.
故选:BD.
', + 'method': None, + 'childQuestions': [], + 'knowledges': [{ + 'id': '310834', + 'title': '应用正弦定理解三角形' + }, + { + 'id': '310854', + 'title': '利用平面向量的数量积求夹角' + }], + 'revision': True, + 'score': 6.0, + 'myScore': 0.0, + 'scoreList': [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0], + 'lessons': [], + 'collected': False, + 'subjectId': 2, + 'questionNo': 9, + 'questionNoShow': '9', + 'subjective': False, + 'groupSort': 2, + 'groupName': '多选题', + 'groupInfo': '本题共3小题,共18分', + 'groupDeclare': '' + }, + { + 'id': '1176211253194020071', + 'scoreCriterion': '', + 'cate': 2, + 'cateName': '多选', + 'subjectQuestionType': 1020201, + 'subjectQuestionTypeName': '多选题', + 'questionContent': '
已知事件与事件为互斥事件,是事件的对立事件,是事件的对立事件,若,,则(\u3000\u3000)
', + 'options': [{ + 'index': 0, + 'choice': 'A', + 'option': '
' + }, + { + 'index': 1, + 'choice': 'B', + 'option': '' + }, + { + 'index': 2, + 'choice': 'C', + 'option': '' + }, + { + 'index': 3, + 'choice': 'D', + 'option': '事件与事件不独立' + }], + 'myAnswer': ['B', 'C'], + 'myAnswers': ['B', 'C'], + 'attachmentImages': [], + 'rightStatus': 3, + 'rightAnswer': ['A', 'B', 'D'], + 'isRecordCorrected': 1, + 'recordCorrectUserType': 5, + 'degreeRange': 6.0, + 'degreeRangeDesc': '易', + 'questionType': 0, + 'questionSource': 1, + 'source': 1, + 'audioUrl': '', + 'questionSort': 10, + 'analyse': '
对于A,,故A正确;
对于B,∵事件与事件为互斥事件,,,∴,故B正确;
对于C,,故C错误;
对于D,,,,∴事件与事件不独立,故D正确.
故选ABD.
', + 'method': None, + 'childQuestions': [], + 'knowledges': [{ + 'id': '311104', + 'title': '互斥事件与对立事件关系的辨析' + }, + { + 'id': '315621', + 'title': '事件的相互独立性' + }], + 'revision': True, + 'score': 6.0, + 'myScore': 0.0, + 'scoreList': [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0], + 'lessons': [], + 'collected': False, + 'subjectId': 2, + 'questionNo': 10, + 'questionNoShow': '10', + 'subjective': False, + 'groupSort': 2, + 'groupName': '多选题', + 'groupInfo': '本题共3小题,共18分', + 'groupDeclare': '' + }, + { + 'id': '1176211356273243512', + 'scoreCriterion': '', + 'cate': 2, + 'cateName': '多选', + 'subjectQuestionType': 1020201, + 'subjectQuestionTypeName': '多选题', + 'questionContent': '
如图甲,在矩形中,,为的中点.将沿直线翻折至的位置,为的中点,如图乙所示,则(\u3000\u3000)
\n
', + 'options': [{ + 'index': 0, + 'choice': 'A', + 'option': '
翻折过程中,四棱锥必存在外接球,不一定存在内切球
' + }, + { + 'index': 1, + 'choice': 'B', + 'option': '翻折过程中,不存在任何位置的,使得' + }, + { + 'index': 2, + 'choice': 'C', + 'option': '当二面角为时,点到平面的距离为' + }, + { + 'index': 3, + 'choice': 'D', + 'option': '
当四棱锥的体积最大时,以为直径的球面被平面截得的交线长为
' + }], + 'myAnswer': ['B', 'C'], + 'myAnswers': ['B', 'C'], + 'attachmentImages': [], + 'rightStatus': 2, + 'rightAnswer': ['B', 'C', 'D'], + 'isRecordCorrected': 1, + 'recordCorrectUserType': 5, + 'degreeRange': 4.0, + 'degreeRangeDesc': '中', + 'questionType': 0, + 'questionSource': 1, + 'source': 1, + 'audioUrl': '', + 'questionSort': 11, + 'analyse': '
对于A,由已知,直角三角形存在以为直径的唯一外接圆,
∵,∴点不在该圆上,所以四边形不存在外接圆,因此四棱锥不存在外接球,故A错误;
对于B,由已知,,,∴,∴,即,假设在翻折过程中,存在位置,如图所示,使得,又∵,平面,平面,∴平面,
又∵平面,∴,
∵在翻折至的位置的过程中,,
∴显然不成立,故假设错误,∴翻折过程中,不存在任何位置的,使得,故B正确;
\n
\n
对于C,取中点,由已知,,∴,∴,
∴是二面角的平面角,
当二面角为时,二面角为,即,
又∵,∴到平面的距离为,
设点到平面的距离为,∵,
∴,∴,
∴,即点到平面的距离为,
∵点为中点,∴点到平面的距离是点到平面距离的,
∴点到平面的距离为,故C正确;
对于D,四棱锥底面梯形的面积为定值,
∴当四棱锥的体积最大时,平面平面,
∵平面平面,平面,
由B选项有,∴平面,
∵平面,∴,
∴,
又∵平面,∴点到平面的距离,
∵点为中点,
∴以为直径的球的半径,球心到平面的距离,
易知,球面被平面截得的交线为圆,其半径,
∴该交线周长为,故D正确.
故选BCD.
', + 'method': None, + 'childQuestions': [], + 'knowledges': [{ + 'id': '310457', + 'title': '立体几何中的动态问题' + }], + 'revision': True, + 'score': 6.0, + 'myScore': 3.0, + 'scoreList': [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0], + 'lessons': [{ + 'courseId': '14801', + 'lessonId': '67063', + 'playTime': '8分57秒', + 'img': 'https://static.ewt360.com/upload/ewt/kecheng/2018/12/11/20181211162732140.png', + 'bgImg': 'https://static.ewt360.com/upload/ewt/kecheng/2018/12/27/20181227152923200.png', + 'videoTitle': '拔尖1+T12', + 'color': '#418282', + 'teacherImg': 'http://file.ewt360.com/file/879911599202205696', + 'url': '/site-study/#/playVideo?courseId=14801&lessonId=67063&from=report_recommend', + 'subjectId': 0, + 'playRatio': '0.0', + 'questionId': '1176211356273243512' + }], + 'collected': False, + 'subjectId': 2, + 'questionNo': 11, + 'questionNoShow': '11', + 'subjective': False, + 'groupSort': 2, + 'groupName': '多选题', + 'groupInfo': '本题共3小题,共18分', + 'groupDeclare': '' + }], + 'rightQuestionsCount': 0, + 'rightRate': 0.0 + }, + { + 'index': 3, + 'groupId': 61657621, + 'groupName': '填空题', + 'groupInfo': '本题共3小题,共15分', + 'groupDeclare': '', + 'totalQuestions': 3, + 'totalScore': 15.0, + 'myTotalScore': 15.0, + 'questions': [{ + 'id': '1176211253194020072', + 'scoreCriterion': '', + 'cate': 30, + 'cateName': '填空', + 'subjectQuestionType': 1023001, + 'subjectQuestionTypeName': '填空题', + 'questionContent': '
已知一组样本数据,,,,且,平均数,则该组数据的方差为1.
', + 'options': [], + 'myAnswer': ['https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/f7500c8b-f535-4efb-b864-f00bc8c3b213.jpg'], + 'myAnswers': None, + 'attachmentImages': ['https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/f7500c8b-f535-4efb-b864-f00bc8c3b213.jpg'], + 'rightStatus': 1, + 'rightAnswer': ['
58.5
'], + 'isRecordCorrected': 1, + 'recordCorrectUserType': 1, + 'degreeRange': 6.0, + 'degreeRangeDesc': '易', + 'questionType': 0, + 'questionSource': 1, + 'source': 1, + 'audioUrl': '', + 'questionSort': 12, + 'analyse': '
由题意可得,该组数据的方差为

.
', + 'method': None, + 'childQuestions': [], + 'knowledges': [{ + 'id': '311075', + 'title': '离散型随机变量的方差与标准差' + }], + 'revision': True, + 'score': 5.0, + 'myScore': 5.0, + 'scoreList': [0.0, 1.0, 2.0, 3.0, 4.0, 5.0], + 'lessons': [], + 'collected': False, + 'subjectId': 2, + 'questionNo': 12, + 'questionNoShow': '12', + 'subjective': True, + 'groupSort': 3, + 'groupName': '填空题', + 'groupInfo': '本题共3小题,共15分', + 'groupDeclare': '' + }, + { + 'id': '1176211356273243476', + 'scoreCriterion': '', + 'cate': 30, + 'cateName': '填空', + 'subjectQuestionType': 1023001, + 'subjectQuestionTypeName': '填空题', + 'questionContent': '
已知在中,角,,所对的边分别为,,,满足,且,则的取值范围为1.
', + 'options': [], + 'myAnswer': ['https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/d3b09270-b861-4f8c-ac99-743dbdf0d47c.jpg'], + 'myAnswers': None, + 'attachmentImages': ['https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/d3b09270-b861-4f8c-ac99-743dbdf0d47c.jpg'], + 'rightStatus': 1, + 'rightAnswer': ['
'], + 'isRecordCorrected': 1, + 'recordCorrectUserType': 1, + 'degreeRange': 6.0, + 'degreeRangeDesc': '易', + 'questionType': 0, + 'questionSource': 1, + 'source': 1, + 'audioUrl': '', + 'questionSort': 13, + 'analyse': '
因为,由正弦定理得,
即,而,∴,故,又,∴,
则,同理,
故,又,
\n
∴,故,则.
', + 'method': None, + 'childQuestions': [], + 'knowledges': [{ + 'id': '310842', + 'title': '利用正、余弦定理求解边长面积周长取值范围问题' + }], + 'revision': True, + 'score': 5.0, + 'myScore': 5.0, + 'scoreList': [0.0, 1.0, 2.0, 3.0, 4.0, 5.0], + 'lessons': [{ + 'courseId': '14801', + 'lessonId': '67064', + 'playTime': '4分4秒', + 'img': 'https://static.ewt360.com/upload/ewt/kecheng/2018/12/11/20181211162732140.png', + 'bgImg': 'https://static.ewt360.com/upload/ewt/kecheng/2018/12/27/20181227152923200.png', + 'videoTitle': '拔尖1+T15', + 'color': '#418282', + 'teacherImg': 'http://file.ewt360.com/file/879911599202205696', + 'url': '/site-study/#/playVideo?courseId=14801&lessonId=67064&from=report_recommend', + 'subjectId': 0, + 'playRatio': '0.0', + 'questionId': '1176211356273243476' + }], + 'collected': False, + 'subjectId': 2, + 'questionNo': 13, + 'questionNoShow': '13', + 'subjective': True, + 'groupSort': 3, + 'groupName': '填空题', + 'groupInfo': '本题共3小题,共15分', + 'groupDeclare': '' + }, + { + 'id': '1176211251046528305', + 'scoreCriterion': '', + 'cate': 30, + 'cateName': '填空', + 'subjectQuestionType': 1023001, + 'subjectQuestionTypeName': '填空题', + 'questionContent': '
在长方体中,,,点为棱上靠近点的三等分点,点是长方形内一动点(含边界),且直线,与平面所成角的大小相等,则线段长度的取值范围为1.
', + 'options': [], + 'myAnswer': ['https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/e9883a80-4b0d-4775-a606-64ab5b5b5eaf.jpg'], + 'myAnswers': None, + 'attachmentImages': ['https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/e9883a80-4b0d-4775-a606-64ab5b5b5eaf.jpg'], + 'rightStatus': 1, + 'rightAnswer': ['
'], + 'isRecordCorrected': 1, + 'recordCorrectUserType': 1, + 'degreeRange': 5.0, + 'degreeRangeDesc': '中', + 'questionType': 0, + 'questionSource': 1, + 'source': 1, + 'audioUrl': '', + 'questionSort': 14, + 'analyse': '
如图1所示,连接,作交于,连接.
因为平面,所以为与平面所成的角.
因为平面,所以为与平面所成的角.
因为,与平面所成角的大小相等,所以,
则,又因为,
所以,则点在的中垂线上,即点在线段上运动,如图2,
\n
\n
因为,,为棱上靠近的三等分点,
所以,,则,因为,所以,
又,可得,,,,
当点在点处时,线段的长度取到最大值,最大值为,
当点在点处,线段的长度取到最小值,最小值为,
所以线段的长度的取值范围为.
', + 'method': None, + 'childQuestions': [], + 'knowledges': [{ + 'id': '310457', + 'title': '立体几何中的动态问题' + }], + 'revision': True, + 'score': 5.0, + 'myScore': 5.0, + 'scoreList': [0.0, 1.0, 2.0, 3.0, 4.0, 5.0], + 'lessons': [{ + 'courseId': '14801', + 'lessonId': '67065', + 'playTime': '9分56秒', + 'img': 'https://static.ewt360.com/upload/ewt/kecheng/2018/12/11/20181211162732140.png', + 'bgImg': 'https://static.ewt360.com/upload/ewt/kecheng/2018/12/27/20181227152923200.png', + 'videoTitle': '拔尖1+T16', + 'color': '#418282', + 'teacherImg': 'http://file.ewt360.com/file/879911599202205696', + 'url': '/site-study/#/playVideo?courseId=14801&lessonId=67065&from=report_recommend', + 'subjectId': 0, + 'playRatio': '0.0', + 'questionId': '1176211251046528305' + }], + 'collected': False, + 'subjectId': 2, + 'questionNo': 14, + 'questionNoShow': '14', + 'subjective': True, + 'groupSort': 3, + 'groupName': '填空题', + 'groupInfo': '本题共3小题,共15分', + 'groupDeclare': '' + }], + 'rightQuestionsCount': 1, + 'rightRate': 0.0 + }, + { + 'index': 4, + 'groupId': 61657622, + 'groupName': '解答题', + 'groupInfo': '本题共5小题,共77分', + 'groupDeclare': '', + 'totalQuestions': 5, + 'totalScore': 77.0, + 'myTotalScore': 77.0, + 'questions': [{ + 'id': '1176211251046528343', + 'scoreCriterion': '', + 'cate': 5, + 'cateName': '解答', + 'subjectQuestionType': 1020501, + 'subjectQuestionTypeName': '解答题', + 'questionContent': '
如图:用,,,四类不同的元件连接成系统,当元件正常工作且元件,都正常工作,或当元件正常工作且元件正常工作时,系统正常工作.已知元件,,,是否正常工作互相独立,且正常工作的概率依次为,,,.
\n
\n
(1)求元件不正常工作的概率;
(2)求元件,,都正常工作的概率;
(3)求系统正常工作的概率.
', + 'options': [], + 'myAnswer': ['https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/5f503809-079e-44d8-b97f-dff9456e27c3.jpg'], + 'myAnswers': None, + 'attachmentImages': ['https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/5f503809-079e-44d8-b97f-dff9456e27c3.jpg'], + 'rightStatus': 1, + 'rightAnswer': ['
(1);(2);(3).
'], + 'isRecordCorrected': 1, + 'recordCorrectUserType': 1, + 'degreeRange': 6.0, + 'degreeRangeDesc': '易', + 'questionType': 0, + 'questionSource': 1, + 'source': 1, + 'audioUrl': '', + 'questionSort': 15, + 'analyse': '
设元件正常工作为事件,元件正常工作为事件,元件正常工作为事件,元件正常工作为事件.
(1)元件正常工作的概率,
所以它不正常工作的概率;
(2)元件,,都正常工作的概率;
(3)系统正常工作可分为,,都正常工作和,正常但,不都正常工作两种情况,
,,都正常工作的概率为,
,正常但,不都正常工作的概率为
,
所以系统正常工作的概率是.
', + 'method': None, + 'childQuestions': [], + 'knowledges': [{ + 'id': '315621', + 'title': '事件的相互独立性' + }], + 'revision': True, + 'score': 13.0, + 'myScore': 13.0, + 'scoreList': [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0], + 'lessons': [], + 'collected': False, + 'subjectId': 2, + 'questionNo': 15, + 'questionNoShow': '15', + 'subjective': True, + 'groupSort': 4, + 'groupName': '解答题', + 'groupInfo': '本题共5小题,共77分', + 'groupDeclare': '' + }, + { + 'id': '1176211356273243514', + 'scoreCriterion': '', + 'cate': 5, + 'cateName': '解答', + 'subjectQuestionType': 1020501, + 'subjectQuestionTypeName': '解答题', + 'questionContent': '
某中学为了解高一年级数学文化知识竞赛的得分情况,从参赛的1000名学生中随机抽取了50名学生的成绩进行分析.经统计,这50名学生的成绩全部介于55分和95分之间,将数据按照如下方式分成八组:第一组,第二组,…,第八组,如图是按上述分组方法得到的频率分布直方图的一部分.已知第一组和第八组人数相同,第七组的人数为3人.
\n
\n
(1)求第六组的频率;若比赛成绩由高到低的前15%为优秀等级,试估计该校参赛的高一年级1000名学生的成绩中优秀等级的最低分数(精确到0.1);
(2)若从样本中成绩属于第六组和第八组的所有学生中随机抽取两名学生,记他们的成绩分别为,,设事件:,求事件的概率.
', + 'options': [], + 'myAnswer': ['https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/cef3bd42-e146-4cd4-92f5-4372b79ad1b6.jpg'], + 'myAnswers': None, + 'attachmentImages': ['https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/cef3bd42-e146-4cd4-92f5-4372b79ad1b6.jpg'], + 'rightStatus': 1, + 'rightAnswer': ['
(1)0.08,81.9分;(2).
'], + 'isRecordCorrected': 1, + 'recordCorrectUserType': 1, + 'degreeRange': 5.0, + 'degreeRangeDesc': '中', + 'questionType': 0, + 'questionSource': 1, + 'source': 1, + 'audioUrl': '', + 'questionSort': 16, + 'analyse': '
(1)第七组的频率为,
所以第六组的频率为;
因为第七、八两组的频率之和为0.10,第六、七、八组的频率之和为0.18,
设优秀等级的最低分数为,则,
由,解得,
故估计该校参赛的高一年级1000名学生的成绩中优秀等级的最低分数为81.9分;
(2)第六组的人数为4人,设为,,,,第八组的人数为2人,设为,,
随机抽取两名学生,则有,,,,,,,,,,,,,,,共15种情况,
事件:发生当且仅当随机抽取的两名学生不在同一组,
所以事件包含的基本事件为,,,,,,,,共8种情况,
故.
', + 'method': None, + 'childQuestions': [], + 'knowledges': [{ + 'id': '310583', + 'title': '计算古典概型问题的概率' + }], + 'revision': True, + 'score': 15.0, + 'myScore': 15.0, + 'scoreList': [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0], + 'lessons': [], + 'collected': False, + 'subjectId': 2, + 'questionNo': 16, + 'questionNoShow': '16', + 'subjective': True, + 'groupSort': 4, + 'groupName': '解答题', + 'groupInfo': '本题共5小题,共77分', + 'groupDeclare': '' + }, + { + 'id': '1176211375600604329', + 'scoreCriterion': '', + 'cate': 5, + 'cateName': '解答', + 'subjectQuestionType': 1020501, + 'subjectQuestionTypeName': '解答题', + 'questionContent': '
在斜三角形中,内角,,的对边分别为,,,且满足.
(1)求角的大小;
(2)若,且上的中线长为,求斜三角形的面积.
', + 'options': [], + 'myAnswer': ['https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/62b47b8f-eea8-4d2a-aa20-8aba45f10c61.jpg'], + 'myAnswers': None, + 'attachmentImages': ['https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/62b47b8f-eea8-4d2a-aa20-8aba45f10c61.jpg'], + 'rightStatus': 1, + 'rightAnswer': ['
(1);(2).
'], + 'isRecordCorrected': 1, + 'recordCorrectUserType': 1, + 'degreeRange': 4.0, + 'degreeRangeDesc': '中', + 'questionType': 0, + 'questionSource': 1, + 'source': 1, + 'audioUrl': '', + 'questionSort': 17, + 'analyse': '
(1)∵,
∴由正弦定理可得,,
∴,
∵三角形为斜三角形,
∴不为直角,即,∴,
又∵,∴;
(2)方法一:
∵,
∴,
∴,
∴.
方法二:
\n
∵,,
\n
∴由余弦定理可得①,
\n
∵上的中线长为,且,
∴在中,由余弦定理可得,
在中,由余弦定理可得,
又∵,
∴,整理可得②,
∴由①②解得,
∴.
\n
', + 'method': None, + 'childQuestions': [], + 'knowledges': [{ + 'id': '310284', + 'title': '三角形的面积公式' + }, + { + 'id': '310311', + 'title': '极化恒等式在平面向量问题中的应用' + }], + 'revision': True, + 'score': 15.0, + 'myScore': 15.0, + 'scoreList': [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0], + 'lessons': [], + 'collected': False, + 'subjectId': 2, + 'questionNo': 17, + 'questionNoShow': '17', + 'subjective': True, + 'groupSort': 4, + 'groupName': '解答题', + 'groupInfo': '本题共5小题,共77分', + 'groupDeclare': '' + }, + { + 'id': '1176211375600604331', + 'scoreCriterion': '', + 'cate': 5, + 'cateName': '解答', + 'subjectQuestionType': 1020501, + 'subjectQuestionTypeName': '解答题', + 'questionContent': '
如图,在正三棱柱中,为上的点,为上的点,,分别为,的中点,平面.
\n
\n
(1)证明:,,,四点共面,且平面平面;
(2)若,,求平面与平面所成锐二面角的余弦值.
', + 'options': [], + 'myAnswer': ['https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/fcd1b2c1-5578-4363-a76e-9bd2af46b30b.jpg'], + 'myAnswers': None, + 'attachmentImages': ['https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/fcd1b2c1-5578-4363-a76e-9bd2af46b30b.jpg'], + 'rightStatus': 1, + 'rightAnswer': ['
(1)证明过程见解析;(2).
'], + 'isRecordCorrected': 1, + 'recordCorrectUserType': 1, + 'degreeRange': 3.0, + 'degreeRangeDesc': '难', + 'questionType': 0, + 'questionSource': 1, + 'source': 1, + 'audioUrl': '', + 'questionSort': 18, + 'analyse': '
(1)∵在正三棱柱中,,分别为,的中点,
∴,
∵为正三棱柱,∴,∴,
∴,,,四点共面;
∵为正三棱柱,∴为等边三角形,
又为的中点,∴,
在正三棱柱中,有平面平面,
而平面平面,
∴平面,
∵平面平面,平面,
∴,∴平面,
∵平面,∴平面平面.
\n
\n
(2)取的中点,过点作的垂线交于,连接,
易证平面,
又平面,∴,
∵,,∴平面,
\n
又平面,所以,
∴为平面与平面所成二面角的平面角,
∵,,∴,,
由(1)知,,
故四边形为平行四边形,
∴,∴,
由得:
,,
∴,
∴平面与平面所成锐二面角的余弦值为.
', + 'method': None, + 'childQuestions': [], + 'knowledges': [{ + 'id': '310938', + 'title': '求二面角' + }], + 'revision': True, + 'score': 17.0, + 'myScore': 17.0, + 'scoreList': [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0], + 'lessons': [{ + 'courseId': '14801', + 'lessonId': '67066', + 'playTime': '9分42秒', + 'img': 'https://static.ewt360.com/upload/ewt/kecheng/2018/12/11/20181211162732140.png', + 'bgImg': 'https://static.ewt360.com/upload/ewt/kecheng/2018/12/27/20181227152923200.png', + 'videoTitle': '拔尖1+T22', + 'color': '#418282', + 'teacherImg': 'http://file.ewt360.com/file/879911599202205696', + 'url': '/site-study/#/playVideo?courseId=14801&lessonId=67066&from=report_recommend', + 'subjectId': 0, + 'playRatio': '0.0', + 'questionId': '1176211375600604331' + }], + 'collected': False, + 'subjectId': 2, + 'questionNo': 18, + 'questionNoShow': '18', + 'subjective': True, + 'groupSort': 4, + 'groupName': '解答题', + 'groupInfo': '本题共5小题,共77分', + 'groupDeclare': '' + }, + { + 'id': '1239541785075703108', + 'scoreCriterion': '', + 'cate': 5, + 'cateName': '解答', + 'subjectQuestionType': 1020501, + 'subjectQuestionTypeName': '解答题', + 'questionContent': '
已知非零向量,,,均用有向线段表示,现定义一个新的向量以及向量间的一种运算“”:.
\n
\n
(1)证明:是这样一个向量:其模是的模的倍,方向为将绕起点按逆时针方向旋转角(为轴正方向按逆时针方向旋转到所成的角,且,并举一个具体的例子说明;
(2)如图1,分别以的边,为一边向外作和,使,.设线段的中点为,证明:;
(3)如图2,设,圆,是圆上一动点,以为边作等边(,,三点按逆时针排列),求的最大值.
', + 'options': [], + 'myAnswer': None, + 'myAnswers': None, + 'attachmentImages': [], + 'rightStatus': 1, + 'rightAnswer': ['
(1)证明见解析,例子不唯一;(2)证明见解析;(3)5.
'], + 'isRecordCorrected': 1, + 'recordCorrectUserType': 1, + 'degreeRange': 3.0, + 'degreeRangeDesc': '难', + 'questionType': 0, + 'questionSource': 1, + 'source': 1, + 'audioUrl': '', + 'questionSort': 19, + 'analyse': '
(1)证明:设,,
其中,,,分别为轴正方向绕起点按逆时针方向旋转到的方向所成的角,且,,
则,
,
于是,
即,的方向为将轴正方向绕起点按逆时针方向旋转角,
故是这样一个向量:其模是的模的倍,方向为将绕起点按逆时针方向旋转角(为轴正方向按逆时针方向旋转到所成的角,且),
例如,,,则,
,,与轴正方向的夹角为,与轴正方向的夹角为,
所以将的模变为原来的2倍,并按逆时针方向旋转,即可得到;
(2)证明:记,,
根据新定义,可得,
同理,
所以,
而,
所以,
故;
(3)设,,则,
,
所以
,
所以
,
所以当,即时,.
', + 'method': None, + 'childQuestions': [], + 'knowledges': [{ + 'id': '317034', + 'title': '平面向量' + }], + 'revision': True, + 'score': 17.0, + 'myScore': 17.0, + 'scoreList': [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0], + 'lessons': [], + 'collected': False, + 'subjectId': 2, + 'questionNo': 19, + 'questionNoShow': '19', + 'subjective': True, + 'groupSort': 4, + 'groupName': '解答题', + 'groupInfo': '本题共5小题,共77分', + 'groupDeclare': '' + }], + 'rightQuestionsCount': 1, + 'rightRate': 0.0 + }], + 'teacherReviewScore': None, + 'teacherReviewRank': None, + 'teacherReviewRankList': ['A', 'B', 'C', 'D'], + 'teacherReviewComment': None, + 'teacherReviewImageList': [] + } +} \ No newline at end of file diff --git a/rubbish/tmp.py b/rubbish/tmp.py index 1a6d21a..5baa67a 100644 --- a/rubbish/tmp.py +++ b/rubbish/tmp.py @@ -1,38 +1,10 @@ -import json -import os -import requests +paperId = '1996206103754744180' +reportId = '2040663610879271448' +questionId = '1244399525157902124' +smallQuestionId = '3244399525157902127' +homeworkId = '10389626' -common_header_json = { - "content-type": "application/json", "access-control-allow-origin": "*", - "origin": "https://teacher.ewt360.com", "referer": "https://teacher.ewt360.com/", - "sec-ch-ua": '"Chromium";v="104", " Not A;Brand";v="99", "Microsoft Edge";v="104"', - "sec-ch-ua-mobile": "?0", "sec-ch-ua-platform": "Windows", - "sec-fetch-dest": "empty", "sec-fetch-mode": "cors", "sec-fetch-site": "same-site", - "token": "151028179-1-fca9a702344e7836", - "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.30", -} +# 请求 URL +url = f"https://web.ewt360.com/api/answerprod/app/answer/proofread/question?paperId={paperId}&reportId={reportId}&platform=1&questionId={questionId}&smallQuestionId={smallQuestionId}&bizCode=205&homeworkId={homeworkId}" -def get_paper_answer_by_questionid(paper_info,b_questionid): - contentUrl = paper_info['contentUrl'] - query_info = contentUrl[contentUrl.find('?')+1:] - url = "https://web.ewt360.com/customerApi/api/studyprod/web/answer/quesiton/analysis?"+query_info+"&questionId="+str(b_questionid) - try: - Response = requests.get(url,headers=common_header_json) - json2=json.loads(Response.text) - if(json2["code"]=="200"): - return json2["data"] - else: - print("get answer_by_questionid ERROR") - print(Response.text) - raise Exception("Error") - except: - os.system("pause") - - -homeworkId = "10389626" -paperId = "1996206103754744180" -item = {"contentUrl":f"//web.ewt360.com/mystudy/#/exam/answer?paperId={paperId}&bizCode=205&platform=1&videoPoint=1&homeworkId={homeworkId}"} -b_questionid = 3244399719505180405 - -get_paper_answer_by_questionid(item,b_questionid) \ No newline at end of file From 6e0657c6b1defd989a2c16ab98d036c12be7db71 Mon Sep 17 00:00:00 2001 From: DingerBtn Date: Sun, 13 Jul 2025 00:06:25 +0800 Subject: [PATCH 02/31] =?UTF-8?q?=E5=8F=AF=E8=8E=B7=E5=8F=96=E7=AD=94?= =?UTF-8?q?=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- response.json | 1 + rubbish/get_corret_answer.py | 157 ++-- rubbish/get_oss_token.py | 51 -- rubbish/tmp.json | 1406 ---------------------------------- tmp.json | 1 + 5 files changed, 79 insertions(+), 1537 deletions(-) create mode 100644 response.json delete mode 100644 rubbish/get_oss_token.py delete mode 100644 rubbish/tmp.json create mode 100644 tmp.json diff --git a/response.json b/response.json new file mode 100644 index 0000000..a8265b7 --- /dev/null +++ b/response.json @@ -0,0 +1 @@ +{"success":true,"code":"200","msg":"操作成功","data":{"subjectId":2,"subjectName":"数学","paperId":"1969526514235999045","reportId":"2040881795217891454","title":"B2025-2026学年高一数学必修二综合测试卷1","useTimeStr":"1分42秒","totalTimeStr":"120分钟","myTotalScore":100.0,"totalScore":150.0,"lessons":[{"courseId":"16185","lessonId":"75001","playTime":"11分56秒","img":"https://static.ewt360.com/upload/ewt/kecheng/2018/12/11/20181211162732140.png","bgImg":"https://static.ewt360.com/upload/ewt/kecheng/2018/12/27/20181227152923200.png","videoTitle":"B利用数形结合思想解平面向量问题专题测试卷-T6","color":"#418282","teacherImg":"http://file.ewt360.com/file/1316391138168431278","url":"/site-study/#/playVideo?courseId=16185&lessonId=75001&from=report_recommend","subjectId":0,"playRatio":"0.0","questionId":"1195892489857859996"},{"courseId":"14801","lessonId":"67061","playTime":"8分16秒","img":"https://static.ewt360.com/upload/ewt/kecheng/2018/12/11/20181211162732140.png","bgImg":"https://static.ewt360.com/upload/ewt/kecheng/2018/12/27/20181227152923200.png","videoTitle":"拔尖1+T8","color":"#418282","teacherImg":"http://file.ewt360.com/file/879911599202205696","url":"/site-study/#/playVideo?courseId=14801&lessonId=67061&from=report_recommend","subjectId":0,"playRatio":"0.0","questionId":"1178807249539383663"},{"courseId":"14801","lessonId":"67063","playTime":"8分57秒","img":"https://static.ewt360.com/upload/ewt/kecheng/2018/12/11/20181211162732140.png","bgImg":"https://static.ewt360.com/upload/ewt/kecheng/2018/12/27/20181227152923200.png","videoTitle":"拔尖1+T12","color":"#418282","teacherImg":"http://file.ewt360.com/file/879911599202205696","url":"/site-study/#/playVideo?courseId=14801&lessonId=67063&from=report_recommend","subjectId":0,"playRatio":"0.0","questionId":"1176211356273243512"},{"courseId":"14801","lessonId":"67064","playTime":"4分4秒","img":"https://static.ewt360.com/upload/ewt/kecheng/2018/12/11/20181211162732140.png","bgImg":"https://static.ewt360.com/upload/ewt/kecheng/2018/12/27/20181227152923200.png","videoTitle":"拔尖1+T15","color":"#418282","teacherImg":"http://file.ewt360.com/file/879911599202205696","url":"/site-study/#/playVideo?courseId=14801&lessonId=67064&from=report_recommend","subjectId":0,"playRatio":"0.0","questionId":"1176211356273243476"},{"courseId":"14801","lessonId":"67065","playTime":"9分56秒","img":"https://static.ewt360.com/upload/ewt/kecheng/2018/12/11/20181211162732140.png","bgImg":"https://static.ewt360.com/upload/ewt/kecheng/2018/12/27/20181227152923200.png","videoTitle":"拔尖1+T16","color":"#418282","teacherImg":"http://file.ewt360.com/file/879911599202205696","url":"/site-study/#/playVideo?courseId=14801&lessonId=67065&from=report_recommend","subjectId":0,"playRatio":"0.0","questionId":"1176211251046528305"},{"courseId":"14801","lessonId":"67066","playTime":"9分42秒","img":"https://static.ewt360.com/upload/ewt/kecheng/2018/12/11/20181211162732140.png","bgImg":"https://static.ewt360.com/upload/ewt/kecheng/2018/12/27/20181227152923200.png","videoTitle":"拔尖1+T22","color":"#418282","teacherImg":"http://file.ewt360.com/file/879911599202205696","url":"/site-study/#/playVideo?courseId=14801&lessonId=67066&from=report_recommend","subjectId":0,"playRatio":"0.0","questionId":"1176211375600604331"}],"rightKnowledges":[{"id":"311075","title":"离散型随机变量的方差与标准差","rate":100.0},{"id":"317034","title":"平面向量","rate":100.0},{"id":"310284","title":"三角形的面积公式","rate":100.0},{"id":"310311","title":"极化恒等式在平面向量问题中的应用","rate":100.0},{"id":"310842","title":"利用正、余弦定理求解边长面积周长取值范围问题","rate":100.0},{"id":"310845","title":"利用正、余弦定理解决高度测量问题","rate":100.0},{"id":"310938","title":"求二面角","rate":100.0},{"id":"310583","title":"计算古典概型问题的概率","rate":75.0},{"id":"310457","title":"立体几何中的动态问题","rate":72.7},{"id":"315621","title":"事件的相互独立性","rate":68.4},{"id":"311092","title":"频率分布直方图的相关计算","rate":0.0},{"id":"310450","title":"面面垂直的判定","rate":0.0},{"id":"310421","title":"多面体的结构特征","rate":0.0},{"id":"311104","title":"互斥事件与对立事件关系的辨析","rate":0.0},{"id":"310313","title":"向量的模的坐标表示及坐标计算向量的模","rate":0.0},{"id":"310854","title":"利用平面向量的数量积求夹角","rate":0.0},{"id":"310306","title":"平面向量运算坐标表示的相关计算","rate":0.0},{"id":"310834","title":"应用正弦定理解三角形","rate":0.0},{"id":"310615","title":"共轭复数","rate":0.0}],"rightRate":50.0,"allRight":false,"createPaperPara":null,"assignPointsFlag":true,"groups":[{"index":1,"groupId":61657619,"groupName":"单选题","groupInfo":"本题共8小题,共40分","groupDeclare":"","totalQuestions":8,"totalScore":40.0,"myTotalScore":5.0,"questions":[{"id":"1176211375600604287","scoreCriterion":"","cate":1,"cateName":"单选","subjectQuestionType":1020101,"subjectQuestionTypeName":"单选题","questionContent":"
复数满足,则复数的共轭复数(  )
","options":[{"index":0,"choice":"A","option":"
"},{"index":1,"choice":"B","option":""},{"index":2,"choice":"C","option":""},{"index":3,"choice":"D","option":""}],"myAnswer":["A"],"myAnswers":["A"],"attachmentImages":[],"rightStatus":3,"rightAnswer":["C"],"isRecordCorrected":1,"recordCorrectUserType":5,"degreeRange":8.0,"degreeRangeDesc":"易","questionType":0,"questionSource":1,"source":1,"audioUrl":"","questionSort":1,"analyse":"
∵,∴,∴.
故选C.
","method":null,"childQuestions":[],"knowledges":[{"id":"310615","title":"共轭复数"}],"revision":true,"score":5.0,"myScore":0.0,"scoreList":[0.0,1.0,2.0,3.0,4.0,5.0],"lessons":[],"collected":false,"subjectId":2,"questionNo":1,"questionNoShow":"1","subjective":false,"groupSort":1,"groupName":"单选题","groupInfo":"本题共8小题,共40分","groupDeclare":""},{"id":"1178807127132792160","scoreCriterion":"","cate":1,"cateName":"单选","subjectQuestionType":1020101,"subjectQuestionTypeName":"单选题","questionContent":"
在2025年某地销售的汽车中随机选取1000台,对销售价格与销售数量进行统计,这1000台车辆的销售价格都不小于5万元,但小于30万元,将销售价格分为五组:,,,,(单位:万元).统计后制成的频率分布直方图如图所示.在选取的1000台汽车中,销售价格在内的车辆台数为(  )
\n
","options":[{"index":0,"choice":"A","option":"
800
"},{"index":1,"choice":"B","option":"600"},{"index":2,"choice":"C","option":"700"},{"index":3,"choice":"D","option":"750"}],"myAnswer":["B"],"myAnswers":["B"],"attachmentImages":[],"rightStatus":3,"rightAnswer":["C"],"isRecordCorrected":1,"recordCorrectUserType":5,"degreeRange":7.0,"degreeRangeDesc":"易","questionType":0,"questionSource":1,"source":1,"audioUrl":"","questionSort":2,"analyse":"
由图可得:,∴,
∴销售价格在内的频率为,
∴销售价格在内的车辆台数为.
故选C.
","method":null,"childQuestions":[],"knowledges":[{"id":"311092","title":"频率分布直方图的相关计算"}],"revision":true,"score":5.0,"myScore":0.0,"scoreList":[0.0,1.0,2.0,3.0,4.0,5.0],"lessons":[],"collected":false,"subjectId":2,"questionNo":2,"questionNoShow":"2","subjective":false,"groupSort":1,"groupName":"单选题","groupInfo":"本题共8小题,共40分","groupDeclare":""},{"id":"1176211356273243473","scoreCriterion":"","cate":1,"cateName":"单选","subjectQuestionType":1020101,"subjectQuestionTypeName":"单选题","questionContent":"
甲、乙两位同学暑假计划从吉林省去河北省旅游,他们所搭乘动车的“”座位车厢,如图所示,若这两位同学买到了同一排的座位,则他们的座位正好相邻的概率为(  )
\n
","options":[{"index":0,"choice":"A","option":"
"},{"index":1,"choice":"B","option":""},{"index":2,"choice":"C","option":""},{"index":3,"choice":"D","option":""}],"myAnswer":["C"],"myAnswers":["C"],"attachmentImages":[],"rightStatus":3,"rightAnswer":["D"],"isRecordCorrected":1,"recordCorrectUserType":5,"degreeRange":7.0,"degreeRangeDesc":"易","questionType":0,"questionSource":1,"source":1,"audioUrl":"","questionSort":3,"analyse":"
设事件为“他们的座位正好相邻”,
甲乙二人买到同一排,,,,,5个座位中的两个形成的样本空间为
\n
,共包含10个样本点,
其中事件,包含3个样本点,则有,
所以他们的座位正好相邻的概率为.
故选D.
","method":null,"childQuestions":[],"knowledges":[{"id":"310583","title":"计算古典概型问题的概率"}],"revision":true,"score":5.0,"myScore":0.0,"scoreList":[0.0,1.0,2.0,3.0,4.0,5.0],"lessons":[],"collected":false,"subjectId":2,"questionNo":3,"questionNoShow":"3","subjective":false,"groupSort":1,"groupName":"单选题","groupInfo":"本题共8小题,共40分","groupDeclare":""},{"id":"1176211251046528302","scoreCriterion":"","cate":1,"cateName":"单选","subjectQuestionType":1020101,"subjectQuestionTypeName":"单选题","questionContent":"
已知向量,,若,则(  )
","options":[{"index":0,"choice":"A","option":"
"},{"index":1,"choice":"B","option":"1"},{"index":2,"choice":"C","option":""},{"index":3,"choice":"D","option":""}],"myAnswer":["B"],"myAnswers":["B"],"attachmentImages":[],"rightStatus":3,"rightAnswer":["D"],"isRecordCorrected":1,"recordCorrectUserType":5,"degreeRange":7.0,"degreeRangeDesc":"易","questionType":0,"questionSource":1,"source":1,"audioUrl":"","questionSort":4,"analyse":"
由,得,所以,
又,,则,所以.
故选D.
","method":null,"childQuestions":[],"knowledges":[{"id":"310306","title":"平面向量运算坐标表示的相关计算"}],"revision":true,"score":5.0,"myScore":0.0,"scoreList":[0.0,1.0,2.0,3.0,4.0,5.0],"lessons":[],"collected":false,"subjectId":2,"questionNo":4,"questionNoShow":"4","subjective":false,"groupSort":1,"groupName":"单选题","groupInfo":"本题共8小题,共40分","groupDeclare":""},{"id":"1176211375600604288","scoreCriterion":"","cate":1,"cateName":"单选","subjectQuestionType":1020101,"subjectQuestionTypeName":"单选题","questionContent":"
设,是两个不同的平面,,是两条不同的直线,下列说法正确的是(  )
","options":[{"index":0,"choice":"A","option":"
若,,,则
"},{"index":1,"choice":"B","option":"若,,,则"},{"index":2,"choice":"C","option":"若,,,则"},{"index":3,"choice":"D","option":"若,,,则"}],"myAnswer":["C"],"myAnswers":["C"],"attachmentImages":[],"rightStatus":3,"rightAnswer":["A"],"isRecordCorrected":1,"recordCorrectUserType":5,"degreeRange":6.0,"degreeRangeDesc":"易","questionType":0,"questionSource":1,"source":1,"audioUrl":"","questionSort":5,"analyse":"
对于A,∵,,又,∴,故A选项正确;
对于B,∵,,,∴可绕任意旋转,∴与不一定垂直,故B选项错误;
对于C,∵,,,∴,故C选项错误;
对于D,∵,,,∴可绕任意旋转,∴与不一定垂直,故D选项错误.
故选A.
","method":null,"childQuestions":[],"knowledges":[{"id":"310450","title":"面面垂直的判定"}],"revision":true,"score":5.0,"myScore":0.0,"scoreList":[0.0,1.0,2.0,3.0,4.0,5.0],"lessons":[],"collected":false,"subjectId":2,"questionNo":5,"questionNoShow":"5","subjective":false,"groupSort":1,"groupName":"单选题","groupInfo":"本题共8小题,共40分","groupDeclare":""},{"id":"1176211253194020070","scoreCriterion":"","cate":1,"cateName":"单选","subjectQuestionType":1020101,"subjectQuestionTypeName":"单选题","questionContent":"
中国古代四大名楼鹳雀楼,位于山西省运城市永济市蒲州镇,因唐代诗人王之涣的诗作《登鹳雀楼》而流芳后世.如图,某同学为测量鹳雀楼的高度,在鹳雀楼的正东方向找到一座建筑物,高约为,在地面上点处(,,三点共线)测得建筑物顶部,鹳雀楼顶部的仰角分别为和,在处测得楼顶部的仰角为,则鹳雀楼的高度约为(  )
\n
","options":[{"index":0,"choice":"A","option":"
"},{"index":1,"choice":"B","option":""},{"index":2,"choice":"C","option":""},{"index":3,"choice":"D","option":""}],"myAnswer":["B"],"myAnswers":["B"],"attachmentImages":[],"rightStatus":1,"rightAnswer":["B"],"isRecordCorrected":1,"recordCorrectUserType":5,"degreeRange":6.0,"degreeRangeDesc":"易","questionType":0,"questionSource":1,"source":1,"audioUrl":"","questionSort":6,"analyse":"
由题意,在中,,
在中,,,
∴,由正弦定理,得,
∴在中,.
故选:B.
","method":null,"childQuestions":[],"knowledges":[{"id":"310845","title":"利用正、余弦定理解决高度测量问题"}],"revision":true,"score":5.0,"myScore":5.0,"scoreList":[0.0,1.0,2.0,3.0,4.0,5.0],"lessons":[],"collected":false,"subjectId":2,"questionNo":6,"questionNoShow":"6","subjective":false,"groupSort":1,"groupName":"单选题","groupInfo":"本题共8小题,共40分","groupDeclare":""},{"id":"1195892489857859996","scoreCriterion":"","cate":1,"cateName":"单选","subjectQuestionType":1020101,"subjectQuestionTypeName":"单选题","questionContent":"
在平面内,定点,,,满足,,动点,满足,,则的最大值是(  )
","options":[{"index":0,"choice":"A","option":"
"},{"index":1,"choice":"B","option":""},{"index":2,"choice":"C","option":""},{"index":3,"choice":"D","option":""}],"myAnswer":["C"],"myAnswers":["C"],"attachmentImages":[],"rightStatus":3,"rightAnswer":["B"],"isRecordCorrected":1,"recordCorrectUserType":5,"degreeRange":5.0,"degreeRangeDesc":"中","questionType":0,"questionSource":1,"source":1,"audioUrl":"","questionSort":7,"analyse":"
法一:由,可得为的外心,
又,可得,,
即,
即有,,可得为的垂心,
则为的中心,即为正三角形,
由,即有,
解得,所以的边长为,
以为坐标原点,所在直线为轴建立直角坐标系,
可得,,,
由,可设,
由,可得为的中点,即有,
则
,
当,即时,取得最大值.
\n
\n
法二:如图,根据已知,有,
因此有,,全等,
进而得到为正三角形,计算可得,
\n
\n
根据题意在以为圆心,1为半径的圆上运动,
因此的中点在以的中点为圆心、为半径的圆上运动,
因此的最大值为.
故选:B.
","method":null,"childQuestions":[],"knowledges":[{"id":"310313","title":"向量的模的坐标表示及坐标计算向量的模"}],"revision":true,"score":5.0,"myScore":0.0,"scoreList":[0.0,1.0,2.0,3.0,4.0,5.0],"lessons":[{"courseId":"16185","lessonId":"75001","playTime":"11分56秒","img":"https://static.ewt360.com/upload/ewt/kecheng/2018/12/11/20181211162732140.png","bgImg":"https://static.ewt360.com/upload/ewt/kecheng/2018/12/27/20181227152923200.png","videoTitle":"B利用数形结合思想解平面向量问题专题测试卷-T6","color":"#418282","teacherImg":"http://file.ewt360.com/file/1316391138168431278","url":"/site-study/#/playVideo?courseId=16185&lessonId=75001&from=report_recommend","subjectId":0,"playRatio":"0.0","questionId":"1195892489857859996"}],"collected":false,"subjectId":2,"questionNo":7,"questionNoShow":"7","subjective":false,"groupSort":1,"groupName":"单选题","groupInfo":"本题共8小题,共40分","groupDeclare":""},{"id":"1178807249539383663","scoreCriterion":"","cate":1,"cateName":"单选","subjectQuestionType":1020101,"subjectQuestionTypeName":"单选题","questionContent":"
《九章算术》是我国古代著名的数学著作,书中记载有几何体“刍甍”.现有一个刍甍如图所示,底面为正方形,平面,四边形,为两个全等的等腰梯形,,且,则此刍甍的外接球的表面积为(  )
\n
","options":[{"index":0,"choice":"A","option":"
"},{"index":1,"choice":"B","option":""},{"index":2,"choice":"C","option":""},{"index":3,"choice":"D","option":""}],"myAnswer":["B"],"myAnswers":["B"],"attachmentImages":[],"rightStatus":3,"rightAnswer":["C"],"isRecordCorrected":1,"recordCorrectUserType":5,"degreeRange":5.0,"degreeRangeDesc":"中","questionType":0,"questionSource":1,"source":1,"audioUrl":"","questionSort":8,"analyse":"
如图所示,取,中点,,正方形中心,中点,连接,,,,
根据题意可得平面,,点是的中点,,
在等腰中,,,同理,
则等腰梯形的高为,
根据几何体的结构特征可知,刍甍的外接球的球心在直线上,连接,,,
因为正方形的外接圆的半径,则有,
而,,,
故,故点在线段的延长线上,
即有,则,解得,
则刍甍的外接球的半径为,
则刍甍的外接球的表面积为.
故选C.
\n
","method":null,"childQuestions":[],"knowledges":[{"id":"310421","title":"多面体的结构特征"}],"revision":true,"score":5.0,"myScore":0.0,"scoreList":[0.0,1.0,2.0,3.0,4.0,5.0],"lessons":[{"courseId":"14801","lessonId":"67061","playTime":"8分16秒","img":"https://static.ewt360.com/upload/ewt/kecheng/2018/12/11/20181211162732140.png","bgImg":"https://static.ewt360.com/upload/ewt/kecheng/2018/12/27/20181227152923200.png","videoTitle":"拔尖1+T8","color":"#418282","teacherImg":"http://file.ewt360.com/file/879911599202205696","url":"/site-study/#/playVideo?courseId=14801&lessonId=67061&from=report_recommend","subjectId":0,"playRatio":"0.0","questionId":"1178807249539383663"}],"collected":false,"subjectId":2,"questionNo":8,"questionNoShow":"8","subjective":false,"groupSort":1,"groupName":"单选题","groupInfo":"本题共8小题,共40分","groupDeclare":""}],"rightQuestionsCount":0,"rightRate":0.0},{"index":2,"groupId":61657620,"groupName":"多选题","groupInfo":"本题共3小题,共18分","groupDeclare":"","totalQuestions":3,"totalScore":18.0,"myTotalScore":3.0,"questions":[{"id":"1182074793012652102","scoreCriterion":"","cate":2,"cateName":"多选","subjectQuestionType":1020201,"subjectQuestionTypeName":"多选题","questionContent":"
下列说法中正确的是(  )
","options":[{"index":0,"choice":"A","option":"
三点确定一个平面
"},{"index":1,"choice":"B","option":"
在中,角,,所对应的边分别为,,,若,则为等腰三角形
"},{"index":2,"choice":"C","option":"已知,是非零向量,与所成的角为锐角的充要条件是"},{"index":3,"choice":"D","option":"若满足条件,,的有两个,则实数的取值范围是"}],"myAnswer":["A","C"],"myAnswers":["A","C"],"attachmentImages":[],"rightStatus":3,"rightAnswer":["B","D"],"isRecordCorrected":1,"recordCorrectUserType":5,"degreeRange":6.0,"degreeRangeDesc":"易","questionType":0,"questionSource":1,"source":1,"audioUrl":"","questionSort":9,"analyse":"
A:不共线的三点确定一个平面,故A错;
B:在中,若,则,
\n
所以,所以为等腰三角形,故B正确;
C:与所成的角为锐角的充要条件是且排除与同向共线,故C错;
D:由正弦定理,可得,由题意得:当时,满足条件的有两个,所以,解得,故D正确.
故选:BD.
","method":null,"childQuestions":[],"knowledges":[{"id":"310834","title":"应用正弦定理解三角形"},{"id":"310854","title":"利用平面向量的数量积求夹角"}],"revision":true,"score":6.0,"myScore":0.0,"scoreList":[0.0,1.0,2.0,3.0,4.0,5.0,6.0],"lessons":[],"collected":false,"subjectId":2,"questionNo":9,"questionNoShow":"9","subjective":false,"groupSort":2,"groupName":"多选题","groupInfo":"本题共3小题,共18分","groupDeclare":""},{"id":"1176211253194020071","scoreCriterion":"","cate":2,"cateName":"多选","subjectQuestionType":1020201,"subjectQuestionTypeName":"多选题","questionContent":"
已知事件与事件为互斥事件,是事件的对立事件,是事件的对立事件,若,,则(  )
","options":[{"index":0,"choice":"A","option":"
"},{"index":1,"choice":"B","option":""},{"index":2,"choice":"C","option":""},{"index":3,"choice":"D","option":"事件与事件不独立"}],"myAnswer":["B","C"],"myAnswers":["B","C"],"attachmentImages":[],"rightStatus":3,"rightAnswer":["A","B","D"],"isRecordCorrected":1,"recordCorrectUserType":5,"degreeRange":6.0,"degreeRangeDesc":"易","questionType":0,"questionSource":1,"source":1,"audioUrl":"","questionSort":10,"analyse":"
对于A,,故A正确;
对于B,∵事件与事件为互斥事件,,,∴,故B正确;
对于C,,故C错误;
对于D,,,,∴事件与事件不独立,故D正确.
故选ABD.
","method":null,"childQuestions":[],"knowledges":[{"id":"311104","title":"互斥事件与对立事件关系的辨析"},{"id":"315621","title":"事件的相互独立性"}],"revision":true,"score":6.0,"myScore":0.0,"scoreList":[0.0,1.0,2.0,3.0,4.0,5.0,6.0],"lessons":[],"collected":false,"subjectId":2,"questionNo":10,"questionNoShow":"10","subjective":false,"groupSort":2,"groupName":"多选题","groupInfo":"本题共3小题,共18分","groupDeclare":""},{"id":"1176211356273243512","scoreCriterion":"","cate":2,"cateName":"多选","subjectQuestionType":1020201,"subjectQuestionTypeName":"多选题","questionContent":"
如图甲,在矩形中,,为的中点.将沿直线翻折至的位置,为的中点,如图乙所示,则(  )
\n
","options":[{"index":0,"choice":"A","option":"
翻折过程中,四棱锥必存在外接球,不一定存在内切球
"},{"index":1,"choice":"B","option":"翻折过程中,不存在任何位置的,使得"},{"index":2,"choice":"C","option":"当二面角为时,点到平面的距离为"},{"index":3,"choice":"D","option":"
当四棱锥的体积最大时,以为直径的球面被平面截得的交线长为
"}],"myAnswer":["B","C"],"myAnswers":["B","C"],"attachmentImages":[],"rightStatus":2,"rightAnswer":["B","C","D"],"isRecordCorrected":1,"recordCorrectUserType":5,"degreeRange":4.0,"degreeRangeDesc":"中","questionType":0,"questionSource":1,"source":1,"audioUrl":"","questionSort":11,"analyse":"
对于A,由已知,直角三角形存在以为直径的唯一外接圆,
∵,∴点不在该圆上,所以四边形不存在外接圆,因此四棱锥不存在外接球,故A错误;
对于B,由已知,,,∴,∴,即,假设在翻折过程中,存在位置,如图所示,使得,又∵,平面,平面,∴平面,
又∵平面,∴,
∵在翻折至的位置的过程中,,
∴显然不成立,故假设错误,∴翻折过程中,不存在任何位置的,使得,故B正确;
\n
\n
对于C,取中点,由已知,,∴,∴,
∴是二面角的平面角,
当二面角为时,二面角为,即,
又∵,∴到平面的距离为,
设点到平面的距离为,∵,
∴,∴,
∴,即点到平面的距离为,
∵点为中点,∴点到平面的距离是点到平面距离的,
∴点到平面的距离为,故C正确;
对于D,四棱锥底面梯形的面积为定值,
∴当四棱锥的体积最大时,平面平面,
∵平面平面,平面,
由B选项有,∴平面,
∵平面,∴,
∴,
又∵平面,∴点到平面的距离,
∵点为中点,
∴以为直径的球的半径,球心到平面的距离,
易知,球面被平面截得的交线为圆,其半径,
∴该交线周长为,故D正确.
故选BCD.
","method":null,"childQuestions":[],"knowledges":[{"id":"310457","title":"立体几何中的动态问题"}],"revision":true,"score":6.0,"myScore":3.0,"scoreList":[0.0,1.0,2.0,3.0,4.0,5.0,6.0],"lessons":[{"courseId":"14801","lessonId":"67063","playTime":"8分57秒","img":"https://static.ewt360.com/upload/ewt/kecheng/2018/12/11/20181211162732140.png","bgImg":"https://static.ewt360.com/upload/ewt/kecheng/2018/12/27/20181227152923200.png","videoTitle":"拔尖1+T12","color":"#418282","teacherImg":"http://file.ewt360.com/file/879911599202205696","url":"/site-study/#/playVideo?courseId=14801&lessonId=67063&from=report_recommend","subjectId":0,"playRatio":"0.0","questionId":"1176211356273243512"}],"collected":false,"subjectId":2,"questionNo":11,"questionNoShow":"11","subjective":false,"groupSort":2,"groupName":"多选题","groupInfo":"本题共3小题,共18分","groupDeclare":""}],"rightQuestionsCount":0,"rightRate":0.0},{"index":3,"groupId":61657621,"groupName":"填空题","groupInfo":"本题共3小题,共15分","groupDeclare":"","totalQuestions":3,"totalScore":15.0,"myTotalScore":15.0,"questions":[{"id":"1176211253194020072","scoreCriterion":"","cate":30,"cateName":"填空","subjectQuestionType":1023001,"subjectQuestionTypeName":"填空题","questionContent":"
已知一组样本数据,,,,且,平均数,则该组数据的方差为1.
","options":[],"myAnswer":["https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/f7500c8b-f535-4efb-b864-f00bc8c3b213.jpg"],"myAnswers":null,"attachmentImages":["https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/f7500c8b-f535-4efb-b864-f00bc8c3b213.jpg"],"rightStatus":1,"rightAnswer":["
58.5
"],"isRecordCorrected":1,"recordCorrectUserType":1,"degreeRange":6.0,"degreeRangeDesc":"易","questionType":0,"questionSource":1,"source":1,"audioUrl":"","questionSort":12,"analyse":"
由题意可得,该组数据的方差为

.
","method":null,"childQuestions":[],"knowledges":[{"id":"311075","title":"离散型随机变量的方差与标准差"}],"revision":true,"score":5.0,"myScore":5.0,"scoreList":[0.0,1.0,2.0,3.0,4.0,5.0],"lessons":[],"collected":false,"subjectId":2,"questionNo":12,"questionNoShow":"12","subjective":true,"groupSort":3,"groupName":"填空题","groupInfo":"本题共3小题,共15分","groupDeclare":""},{"id":"1176211356273243476","scoreCriterion":"","cate":30,"cateName":"填空","subjectQuestionType":1023001,"subjectQuestionTypeName":"填空题","questionContent":"
已知在中,角,,所对的边分别为,,,满足,且,则的取值范围为1.
","options":[],"myAnswer":["https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/d3b09270-b861-4f8c-ac99-743dbdf0d47c.jpg"],"myAnswers":null,"attachmentImages":["https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/d3b09270-b861-4f8c-ac99-743dbdf0d47c.jpg"],"rightStatus":1,"rightAnswer":["
"],"isRecordCorrected":1,"recordCorrectUserType":1,"degreeRange":6.0,"degreeRangeDesc":"易","questionType":0,"questionSource":1,"source":1,"audioUrl":"","questionSort":13,"analyse":"
因为,由正弦定理得,
即,而,∴,故,又,∴,
则,同理,
故,又,
\n
∴,故,则.
","method":null,"childQuestions":[],"knowledges":[{"id":"310842","title":"利用正、余弦定理求解边长面积周长取值范围问题"}],"revision":true,"score":5.0,"myScore":5.0,"scoreList":[0.0,1.0,2.0,3.0,4.0,5.0],"lessons":[{"courseId":"14801","lessonId":"67064","playTime":"4分4秒","img":"https://static.ewt360.com/upload/ewt/kecheng/2018/12/11/20181211162732140.png","bgImg":"https://static.ewt360.com/upload/ewt/kecheng/2018/12/27/20181227152923200.png","videoTitle":"拔尖1+T15","color":"#418282","teacherImg":"http://file.ewt360.com/file/879911599202205696","url":"/site-study/#/playVideo?courseId=14801&lessonId=67064&from=report_recommend","subjectId":0,"playRatio":"0.0","questionId":"1176211356273243476"}],"collected":false,"subjectId":2,"questionNo":13,"questionNoShow":"13","subjective":true,"groupSort":3,"groupName":"填空题","groupInfo":"本题共3小题,共15分","groupDeclare":""},{"id":"1176211251046528305","scoreCriterion":"","cate":30,"cateName":"填空","subjectQuestionType":1023001,"subjectQuestionTypeName":"填空题","questionContent":"
在长方体中,,,点为棱上靠近点的三等分点,点是长方形内一动点(含边界),且直线,与平面所成角的大小相等,则线段长度的取值范围为1.
","options":[],"myAnswer":["https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/e9883a80-4b0d-4775-a606-64ab5b5b5eaf.jpg"],"myAnswers":null,"attachmentImages":["https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/e9883a80-4b0d-4775-a606-64ab5b5b5eaf.jpg"],"rightStatus":1,"rightAnswer":["
"],"isRecordCorrected":1,"recordCorrectUserType":1,"degreeRange":5.0,"degreeRangeDesc":"中","questionType":0,"questionSource":1,"source":1,"audioUrl":"","questionSort":14,"analyse":"
如图1所示,连接,作交于,连接.
因为平面,所以为与平面所成的角.
因为平面,所以为与平面所成的角.
因为,与平面所成角的大小相等,所以,
则,又因为,
所以,则点在的中垂线上,即点在线段上运动,如图2,
\n
\n
因为,,为棱上靠近的三等分点,
所以,,则,因为,所以,
又,可得,,,,
当点在点处时,线段的长度取到最大值,最大值为,
当点在点处,线段的长度取到最小值,最小值为,
所以线段的长度的取值范围为.
","method":null,"childQuestions":[],"knowledges":[{"id":"310457","title":"立体几何中的动态问题"}],"revision":true,"score":5.0,"myScore":5.0,"scoreList":[0.0,1.0,2.0,3.0,4.0,5.0],"lessons":[{"courseId":"14801","lessonId":"67065","playTime":"9分56秒","img":"https://static.ewt360.com/upload/ewt/kecheng/2018/12/11/20181211162732140.png","bgImg":"https://static.ewt360.com/upload/ewt/kecheng/2018/12/27/20181227152923200.png","videoTitle":"拔尖1+T16","color":"#418282","teacherImg":"http://file.ewt360.com/file/879911599202205696","url":"/site-study/#/playVideo?courseId=14801&lessonId=67065&from=report_recommend","subjectId":0,"playRatio":"0.0","questionId":"1176211251046528305"}],"collected":false,"subjectId":2,"questionNo":14,"questionNoShow":"14","subjective":true,"groupSort":3,"groupName":"填空题","groupInfo":"本题共3小题,共15分","groupDeclare":""}],"rightQuestionsCount":1,"rightRate":0.0},{"index":4,"groupId":61657622,"groupName":"解答题","groupInfo":"本题共5小题,共77分","groupDeclare":"","totalQuestions":5,"totalScore":77.0,"myTotalScore":77.0,"questions":[{"id":"1176211251046528343","scoreCriterion":"","cate":5,"cateName":"解答","subjectQuestionType":1020501,"subjectQuestionTypeName":"解答题","questionContent":"
如图:用,,,四类不同的元件连接成系统,当元件正常工作且元件,都正常工作,或当元件正常工作且元件正常工作时,系统正常工作.已知元件,,,是否正常工作互相独立,且正常工作的概率依次为,,,.
\n
\n
(1)求元件不正常工作的概率;
(2)求元件,,都正常工作的概率;
(3)求系统正常工作的概率.
","options":[],"myAnswer":["https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/5f503809-079e-44d8-b97f-dff9456e27c3.jpg"],"myAnswers":null,"attachmentImages":["https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/5f503809-079e-44d8-b97f-dff9456e27c3.jpg"],"rightStatus":1,"rightAnswer":["
(1);(2);(3).
"],"isRecordCorrected":1,"recordCorrectUserType":1,"degreeRange":6.0,"degreeRangeDesc":"易","questionType":0,"questionSource":1,"source":1,"audioUrl":"","questionSort":15,"analyse":"
设元件正常工作为事件,元件正常工作为事件,元件正常工作为事件,元件正常工作为事件.
(1)元件正常工作的概率,
所以它不正常工作的概率;
(2)元件,,都正常工作的概率;
(3)系统正常工作可分为,,都正常工作和,正常但,不都正常工作两种情况,
,,都正常工作的概率为,
,正常但,不都正常工作的概率为
,
所以系统正常工作的概率是.
","method":null,"childQuestions":[],"knowledges":[{"id":"315621","title":"事件的相互独立性"}],"revision":true,"score":13.0,"myScore":13.0,"scoreList":[0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0,11.0,12.0,13.0],"lessons":[],"collected":false,"subjectId":2,"questionNo":15,"questionNoShow":"15","subjective":true,"groupSort":4,"groupName":"解答题","groupInfo":"本题共5小题,共77分","groupDeclare":""},{"id":"1176211356273243514","scoreCriterion":"","cate":5,"cateName":"解答","subjectQuestionType":1020501,"subjectQuestionTypeName":"解答题","questionContent":"
某中学为了解高一年级数学文化知识竞赛的得分情况,从参赛的1000名学生中随机抽取了50名学生的成绩进行分析.经统计,这50名学生的成绩全部介于55分和95分之间,将数据按照如下方式分成八组:第一组,第二组,…,第八组,如图是按上述分组方法得到的频率分布直方图的一部分.已知第一组和第八组人数相同,第七组的人数为3人.
\n
\n
(1)求第六组的频率;若比赛成绩由高到低的前15%为优秀等级,试估计该校参赛的高一年级1000名学生的成绩中优秀等级的最低分数(精确到0.1);
(2)若从样本中成绩属于第六组和第八组的所有学生中随机抽取两名学生,记他们的成绩分别为,,设事件:,求事件的概率.
","options":[],"myAnswer":["https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/cef3bd42-e146-4cd4-92f5-4372b79ad1b6.jpg"],"myAnswers":null,"attachmentImages":["https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/cef3bd42-e146-4cd4-92f5-4372b79ad1b6.jpg"],"rightStatus":1,"rightAnswer":["
(1)0.08,81.9分;(2).
"],"isRecordCorrected":1,"recordCorrectUserType":1,"degreeRange":5.0,"degreeRangeDesc":"中","questionType":0,"questionSource":1,"source":1,"audioUrl":"","questionSort":16,"analyse":"
(1)第七组的频率为,
所以第六组的频率为;
因为第七、八两组的频率之和为0.10,第六、七、八组的频率之和为0.18,
设优秀等级的最低分数为,则,
由,解得,
故估计该校参赛的高一年级1000名学生的成绩中优秀等级的最低分数为81.9分;
(2)第六组的人数为4人,设为,,,,第八组的人数为2人,设为,,
随机抽取两名学生,则有,,,,,,,,,,,,,,,共15种情况,
事件:发生当且仅当随机抽取的两名学生不在同一组,
所以事件包含的基本事件为,,,,,,,,共8种情况,
故.
","method":null,"childQuestions":[],"knowledges":[{"id":"310583","title":"计算古典概型问题的概率"}],"revision":true,"score":15.0,"myScore":15.0,"scoreList":[0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0,11.0,12.0,13.0,14.0,15.0],"lessons":[],"collected":false,"subjectId":2,"questionNo":16,"questionNoShow":"16","subjective":true,"groupSort":4,"groupName":"解答题","groupInfo":"本题共5小题,共77分","groupDeclare":""},{"id":"1176211375600604329","scoreCriterion":"","cate":5,"cateName":"解答","subjectQuestionType":1020501,"subjectQuestionTypeName":"解答题","questionContent":"
在斜三角形中,内角,,的对边分别为,,,且满足.
(1)求角的大小;
(2)若,且上的中线长为,求斜三角形的面积.
","options":[],"myAnswer":["https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/62b47b8f-eea8-4d2a-aa20-8aba45f10c61.jpg"],"myAnswers":null,"attachmentImages":["https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/62b47b8f-eea8-4d2a-aa20-8aba45f10c61.jpg"],"rightStatus":1,"rightAnswer":["
(1);(2).
"],"isRecordCorrected":1,"recordCorrectUserType":1,"degreeRange":4.0,"degreeRangeDesc":"中","questionType":0,"questionSource":1,"source":1,"audioUrl":"","questionSort":17,"analyse":"
(1)∵,
∴由正弦定理可得,,
∴,
∵三角形为斜三角形,
∴不为直角,即,∴,
又∵,∴;
(2)方法一:
∵,
∴,
∴,
∴.
方法二:
\n
∵,,
\n
∴由余弦定理可得①,
\n
∵上的中线长为,且,
∴在中,由余弦定理可得,
在中,由余弦定理可得,
又∵,
∴,整理可得②,
∴由①②解得,
∴.
\n
","method":null,"childQuestions":[],"knowledges":[{"id":"310284","title":"三角形的面积公式"},{"id":"310311","title":"极化恒等式在平面向量问题中的应用"}],"revision":true,"score":15.0,"myScore":15.0,"scoreList":[0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0,11.0,12.0,13.0,14.0,15.0],"lessons":[],"collected":false,"subjectId":2,"questionNo":17,"questionNoShow":"17","subjective":true,"groupSort":4,"groupName":"解答题","groupInfo":"本题共5小题,共77分","groupDeclare":""},{"id":"1176211375600604331","scoreCriterion":"","cate":5,"cateName":"解答","subjectQuestionType":1020501,"subjectQuestionTypeName":"解答题","questionContent":"
如图,在正三棱柱中,为上的点,为上的点,,分别为,的中点,平面.
\n
\n
(1)证明:,,,四点共面,且平面平面;
(2)若,,求平面与平面所成锐二面角的余弦值.
","options":[],"myAnswer":["https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/fcd1b2c1-5578-4363-a76e-9bd2af46b30b.jpg"],"myAnswers":null,"attachmentImages":["https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/fcd1b2c1-5578-4363-a76e-9bd2af46b30b.jpg"],"rightStatus":1,"rightAnswer":["
(1)证明过程见解析;(2).
"],"isRecordCorrected":1,"recordCorrectUserType":1,"degreeRange":3.0,"degreeRangeDesc":"难","questionType":0,"questionSource":1,"source":1,"audioUrl":"","questionSort":18,"analyse":"
(1)∵在正三棱柱中,,分别为,的中点,
∴,
∵为正三棱柱,∴,∴,
∴,,,四点共面;
∵为正三棱柱,∴为等边三角形,
又为的中点,∴,
在正三棱柱中,有平面平面,
而平面平面,
∴平面,
∵平面平面,平面,
∴,∴平面,
∵平面,∴平面平面.
\n
\n
(2)取的中点,过点作的垂线交于,连接,
易证平面,
又平面,∴,
∵,,∴平面,
\n
又平面,所以,
∴为平面与平面所成二面角的平面角,
∵,,∴,,
由(1)知,,
故四边形为平行四边形,
∴,∴,
由得:
,,
∴,
∴平面与平面所成锐二面角的余弦值为.
","method":null,"childQuestions":[],"knowledges":[{"id":"310938","title":"求二面角"}],"revision":true,"score":17.0,"myScore":17.0,"scoreList":[0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0,11.0,12.0,13.0,14.0,15.0,16.0,17.0],"lessons":[{"courseId":"14801","lessonId":"67066","playTime":"9分42秒","img":"https://static.ewt360.com/upload/ewt/kecheng/2018/12/11/20181211162732140.png","bgImg":"https://static.ewt360.com/upload/ewt/kecheng/2018/12/27/20181227152923200.png","videoTitle":"拔尖1+T22","color":"#418282","teacherImg":"http://file.ewt360.com/file/879911599202205696","url":"/site-study/#/playVideo?courseId=14801&lessonId=67066&from=report_recommend","subjectId":0,"playRatio":"0.0","questionId":"1176211375600604331"}],"collected":false,"subjectId":2,"questionNo":18,"questionNoShow":"18","subjective":true,"groupSort":4,"groupName":"解答题","groupInfo":"本题共5小题,共77分","groupDeclare":""},{"id":"1239541785075703108","scoreCriterion":"","cate":5,"cateName":"解答","subjectQuestionType":1020501,"subjectQuestionTypeName":"解答题","questionContent":"
已知非零向量,,,均用有向线段表示,现定义一个新的向量以及向量间的一种运算“”:.
\n
\n
(1)证明:是这样一个向量:其模是的模的倍,方向为将绕起点按逆时针方向旋转角(为轴正方向按逆时针方向旋转到所成的角,且,并举一个具体的例子说明;
(2)如图1,分别以的边,为一边向外作和,使,.设线段的中点为,证明:;
(3)如图2,设,圆,是圆上一动点,以为边作等边(,,三点按逆时针排列),求的最大值.
","options":[],"myAnswer":null,"myAnswers":null,"attachmentImages":[],"rightStatus":1,"rightAnswer":["
(1)证明见解析,例子不唯一;(2)证明见解析;(3)5.
"],"isRecordCorrected":1,"recordCorrectUserType":1,"degreeRange":3.0,"degreeRangeDesc":"难","questionType":0,"questionSource":1,"source":1,"audioUrl":"","questionSort":19,"analyse":"
(1)证明:设,,
其中,,,分别为轴正方向绕起点按逆时针方向旋转到的方向所成的角,且,,
则,
,
于是,
即,的方向为将轴正方向绕起点按逆时针方向旋转角,
故是这样一个向量:其模是的模的倍,方向为将绕起点按逆时针方向旋转角(为轴正方向按逆时针方向旋转到所成的角,且),
例如,,,则,
,,与轴正方向的夹角为,与轴正方向的夹角为,
所以将的模变为原来的2倍,并按逆时针方向旋转,即可得到;
(2)证明:记,,
根据新定义,可得,
同理,
所以,
而,
所以,
故;
(3)设,,则,
,
所以
,
所以
,
所以当,即时,.
","method":null,"childQuestions":[],"knowledges":[{"id":"317034","title":"平面向量"}],"revision":true,"score":17.0,"myScore":17.0,"scoreList":[0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0,11.0,12.0,13.0,14.0,15.0,16.0,17.0],"lessons":[],"collected":false,"subjectId":2,"questionNo":19,"questionNoShow":"19","subjective":true,"groupSort":4,"groupName":"解答题","groupInfo":"本题共5小题,共77分","groupDeclare":""}],"rightQuestionsCount":1,"rightRate":0.0}],"teacherReviewScore":null,"teacherReviewRank":null,"teacherReviewRankList":["A","B","C","D"],"teacherReviewComment":null,"teacherReviewImageList":[]}} \ No newline at end of file diff --git a/rubbish/get_corret_answer.py b/rubbish/get_corret_answer.py index 7c85d66..0ab6219 100644 --- a/rubbish/get_corret_answer.py +++ b/rubbish/get_corret_answer.py @@ -3,92 +3,89 @@ import requests from urllib.parse import urlparse -# 创建会话对象 -session = requests.Session() - -# 设置 User-Agent -session.headers.update({ - "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36 Edg/138.0.0.0" -}) - -# 只添加 token cookie -session.cookies.set( - name="token", - value="151028179-1-d65b0d54252a0394", - domain=".ewt360.com", - path="/" -) - -# 请求 URL + paperId='1969526514235999045' reportId='2040881795217891454' homeworkId='10389626' userId='151028179' -url = f"https://web.ewt360.com/api/answerprod/web/answer/webreport/questionGroup?paperId={paperId}&reportId={reportId}&platform=1&bizCode=205&homeworkId={homeworkId}&userId={userId}" - -# 请求头 (保留所有原始头部) -headers = { - "authority": "web.ewt360.com", - "method": "GET", - "path": urlparse(url).path + "?" + urlparse(url).query, - "scheme": "https", - "accept": "application/json, text/plain, */*", - "accept-encoding": "gzip, deflate, br, zstd", - "accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6", - "access-control-allow-origin": "*", - "eagleeye-pappname": "aocb5mxsv0@c882b4be402630c", - "eagleeye-sessionid": "y9mOadU00X19e3psalIpu5beRwUs", - "eagleeye-traceid": "ef11d5e6175232609247810112630c", - "ewt-contentstyle": "CamelCase", - "ewt-requestsource": "web", - "priority": "u=1, i", - "referer": "https://web.ewt360.com/mystudy/", - "referurl": "https://web.ewt360.com/mystudy/#/report?bizCode=205&homeworkId=10389626&paperId=1969526514235999045&platform=1&reportId=2040881795217891454", - "sec-ch-ua": "\"Not)A;Brand\";v=\"8\", \"Chromium\";v=\"138\", \"Microsoft Edge\";v=\"138\"", - "sec-ch-ua-mobile": "?0", - "sec-ch-ua-platform": "\"Windows\"", - "sec-fetch-dest": "empty", - "sec-fetch-mode": "cors", - "sec-fetch-site": "same-origin", - "token": "151028179-1-d65b0d54252a0394", # 头部中的token - "x-requested-with": "XMLHttpRequest" -} - -try: - # 发送 GET 请求 - response = session.get( - url, - headers=headers, - timeout=15 +token = '151028179-1-89663793316a648f' + + +def get_answer(paperId:str, reportId:str, homeworkId:str, userId:str, token:str): + # 创建会话对象 + session = requests.Session() + + # 设置 User-Agent + session.headers.update({ + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36 Edg/138.0.0.0" + }) + + # 只添加 token cookie + session.cookies.set( + name="token", + value=token, + domain=".ewt360.com", + path="/" ) - # 检查响应状态 - response.raise_for_status() + # 请求 URL + + url = f"https://web.ewt360.com/api/answerprod/web/answer/webreport/questionGroup?paperId={paperId}&reportId={reportId}&platform=1&bizCode=205&homeworkId={homeworkId}&userId={userId}" - # 输出结果 - print(f"请求成功! 状态码: {response.status_code}") + # 请求头 (保留所有原始头部) + headers = { + "authority": "web.ewt360.com", + "method": "GET", + "path": urlparse(url).path + "?" + urlparse(url).query, + "scheme": "https", + "accept": "application/json, text/plain, */*", + "accept-encoding": "gzip, deflate, br, zstd", + "accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6", + "access-control-allow-origin": "*", + "eagleeye-pappname": "aocb5mxsv0@c882b4be402630c", + "eagleeye-sessionid": "y9mOadU00X19e3psalIpu5beRwUs", + "eagleeye-traceid": "ef11d5e6175232609247810112630c", + "ewt-contentstyle": "CamelCase", + "ewt-requestsource": "web", + "priority": "u=1, i", + "referer": "https://web.ewt360.com/mystudy/", + "referurl": "https://web.ewt360.com/mystudy/#/report?bizCode=205&homeworkId=10389626&paperId=1969526514235999045&platform=1&reportId=2040881795217891454", + # "referurl": "https://web.ewt360.com/mystudy/#/report?bizCode=205&homeworkId=10389626&paperId=1969526514235999045&platform=1&reportId=2040881795217891454", + "sec-ch-ua": "\"Not)A;Brand\";v=\"8\", \"Chromium\";v=\"138\", \"Microsoft Edge\";v=\"138\"", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "\"Windows\"", + "sec-fetch-dest": "empty", + "sec-fetch-mode": "cors", + "sec-fetch-site": "same-origin", + "token": token, + "x-requested-with": "XMLHttpRequest" + } - # 尝试解析 JSON try: - json_data = response.json() - print("响应JSON内容:") - print(json_data) - except ValueError: - print("响应文本内容:") - # print(response.text[:1000]) # 显示前1000个字符 - json2 = json.loads(response.text)['data']['groups']['questions'] - # # 调试信息 - # print("\n调试信息:") - # print(f"最终请求URL: {response.url}") - # print(f"发送的Cookies: {session.cookies.get_dict()}") - -except requests.exceptions.RequestException as e: - print(f"请求失败: {str(e)}") - if hasattr(e, 'response') and e.response is not None: - print(f"错误状态码: {e.response.status_code}") - print(f"错误响应: {e.response.text[:500]}") - - # 输出请求详情以便调试 - print("\n请求详情:") - print(f"URL: {url}") - print(f"Headers: {headers}") \ No newline at end of file + # 发送 GET 请求 + response = session.get( + url, + headers=headers, + timeout=15 + ) + + + # 尝试解析 JSON + try: + # open('response.json','w',encoding='utf-8').write(response.text) + json2 = json.loads(response.text)['data']['groups'][0]['questions'][0]['rightAnswer'] + return json2 + + + except ValueError: + pass + return 'json解析失败' + + except requests.exceptions.RequestException as e: + if hasattr(e, 'response') and e.response is not None: + return f'请求失败,错误响应{e.response.text}' + else: + return f"请求失败: {str(e)}" + +if __name__ == '__main__': + print(get_answer(paperId,reportId,homeworkId,userId,token)) \ No newline at end of file diff --git a/rubbish/get_oss_token.py b/rubbish/get_oss_token.py deleted file mode 100644 index 3f2bff5..0000000 --- a/rubbish/get_oss_token.py +++ /dev/null @@ -1,51 +0,0 @@ -import json -import requests -import time - - -def get_token(): - # 创建会话对象并设置 User-Agent - session = requests.Session() - session.headers.update({ - "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 Edg/116.0.1938.62" - }) - - # 构造请求 URL(使用当前时间戳,或固定值 1752300940171) - ts = int(time.time() * 1000) # 当前毫秒级时间戳 - # ts = 1752300940171 # 或使用原固定值 - url = f"https://gateway.ewt360.com/fs/credentials/token?appName=mystudy&bucket=ewt-infrastructure&expire=3600&ts={ts}" - - # 定义请求头 - headers = { - "authority": "gateway.ewt360.com", - "method": "GET", - "path": f"/fs/credentials/token?appName=mystudy&bucket=ewt-infrastructure&expire=3600&ts={ts}", - "scheme": "https", - "accept": "application/json, text/plain, */*", - "accept-encoding": "gzip, deflate, br, zstd", - "accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6", - "origin": "https://web.ewt360.com", - "priority": "u=1, i", - "referer": "https://web.ewt360.com/", - "sec-ch-ua": '""', - "sec-ch-ua-mobile": "?0", - "sec-ch-ua-platform": '""', - "sec-fetch-dest": "empty", - "sec-fetch-mode": "cors", - "sec-fetch-site": "same-site" - } - - # 发送 GET 请求 - response = session.get( - url, - headers=headers, - verify=True # 验证 SSL 证书(默认) - ) - - json2=json.loads(response.text) - return json2["data"]["credentials"]["securityToken"] - - - -if __name__=="__main__": - print(get_token()) diff --git a/rubbish/tmp.json b/rubbish/tmp.json deleted file mode 100644 index 2c444e7..0000000 --- a/rubbish/tmp.json +++ /dev/null @@ -1,1406 +0,0 @@ -{ - 'success': True, - 'code': '200', - 'msg': '操作成功', - 'data': { - 'subjectId': 2, - 'subjectName': '数学', - 'paperId': '1969526514235999045', - 'reportId': '2040881795217891454', - 'title': 'B2025-2026学年高一数学必修二综合测试卷1', - 'useTimeStr': '1分42秒', - 'totalTimeStr': '120分钟', - 'myTotalScore': 100.0, - 'totalScore': 150.0, - 'lessons': [{ - 'courseId': '16185', - 'lessonId': '75001', - 'playTime': '11分56秒', - 'img': 'https://static.ewt360.com/upload/ewt/kecheng/2018/12/11/20181211162732140.png', - 'bgImg': 'https://static.ewt360.com/upload/ewt/kecheng/2018/12/27/20181227152923200.png', - 'videoTitle': 'B利用数形结合思想解平面向量问题专题测试卷-T6', - 'color': '#418282', - 'teacherImg': 'http://file.ewt360.com/file/1316391138168431278', - 'url': '/site-study/#/playVideo?courseId=16185&lessonId=75001&from=report_recommend', - 'subjectId': 0, - 'playRatio': '0.0', - 'questionId': '1195892489857859996' - }, - { - 'courseId': '14801', - 'lessonId': '67061', - 'playTime': '8分16秒', - 'img': 'https://static.ewt360.com/upload/ewt/kecheng/2018/12/11/20181211162732140.png', - 'bgImg': 'https://static.ewt360.com/upload/ewt/kecheng/2018/12/27/20181227152923200.png', - 'videoTitle': '拔尖1+T8', - 'color': '#418282', - 'teacherImg': 'http://file.ewt360.com/file/879911599202205696', - 'url': '/site-study/#/playVideo?courseId=14801&lessonId=67061&from=report_recommend', - 'subjectId': 0, - 'playRatio': '0.0', - 'questionId': '1178807249539383663' - }, - { - 'courseId': '14801', - 'lessonId': '67063', - 'playTime': '8分57秒', - 'img': 'https://static.ewt360.com/upload/ewt/kecheng/2018/12/11/20181211162732140.png', - 'bgImg': 'https://static.ewt360.com/upload/ewt/kecheng/2018/12/27/20181227152923200.png', - 'videoTitle': '拔尖1+T12', - 'color': '#418282', - 'teacherImg': 'http://file.ewt360.com/file/879911599202205696', - 'url': '/site-study/#/playVideo?courseId=14801&lessonId=67063&from=report_recommend', - 'subjectId': 0, - 'playRatio': '0.0', - 'questionId': '1176211356273243512' - }, - { - 'courseId': '14801', - 'lessonId': '67064', - 'playTime': '4分4秒', - 'img': 'https://static.ewt360.com/upload/ewt/kecheng/2018/12/11/20181211162732140.png', - 'bgImg': 'https://static.ewt360.com/upload/ewt/kecheng/2018/12/27/20181227152923200.png', - 'videoTitle': '拔尖1+T15', - 'color': '#418282', - 'teacherImg': 'http://file.ewt360.com/file/879911599202205696', - 'url': '/site-study/#/playVideo?courseId=14801&lessonId=67064&from=report_recommend', - 'subjectId': 0, - 'playRatio': '0.0', - 'questionId': '1176211356273243476' - }, - { - 'courseId': '14801', - 'lessonId': '67065', - 'playTime': '9分56秒', - 'img': 'https://static.ewt360.com/upload/ewt/kecheng/2018/12/11/20181211162732140.png', - 'bgImg': 'https://static.ewt360.com/upload/ewt/kecheng/2018/12/27/20181227152923200.png', - 'videoTitle': '拔尖1+T16', - 'color': '#418282', - 'teacherImg': 'http://file.ewt360.com/file/879911599202205696', - 'url': '/site-study/#/playVideo?courseId=14801&lessonId=67065&from=report_recommend', - 'subjectId': 0, - 'playRatio': '0.0', - 'questionId': '1176211251046528305' - }, - { - 'courseId': '14801', - 'lessonId': '67066', - 'playTime': '9分42秒', - 'img': 'https://static.ewt360.com/upload/ewt/kecheng/2018/12/11/20181211162732140.png', - 'bgImg': 'https://static.ewt360.com/upload/ewt/kecheng/2018/12/27/20181227152923200.png', - 'videoTitle': '拔尖1+T22', - 'color': '#418282', - 'teacherImg': 'http://file.ewt360.com/file/879911599202205696', - 'url': '/site-study/#/playVideo?courseId=14801&lessonId=67066&from=report_recommend', - 'subjectId': 0, - 'playRatio': '0.0', - 'questionId': '1176211375600604331' - }], - 'rightKnowledges': [{ - 'id': '311075', - 'title': '离散型随机变量的方差与标准差', - 'rate': 100.0 - }, - { - 'id': '317034', - 'title': '平面向量', - 'rate': 100.0 - }, - { - 'id': '310284', - 'title': '三角形的面积公式', - 'rate': 100.0 - }, - { - 'id': '310311', - 'title': '极化恒等式在平面向量问题中的应用', - 'rate': 100.0 - }, - { - 'id': '310842', - 'title': '利用正、余弦定理求解边长面积周长取值范围问题', - 'rate': 100.0 - }, - { - 'id': '310845', - 'title': '利用正、余弦定理解决高度测量问题', - 'rate': 100.0 - }, - { - 'id': '310938', - 'title': '求二面角', - 'rate': 100.0 - }, - { - 'id': '310583', - 'title': '计算古典概型问题的概率', - 'rate': 75.0 - }, - { - 'id': '310457', - 'title': '立体几何中的动态问题', - 'rate': 72.7 - }, - { - 'id': '315621', - 'title': '事件的相互独立性', - 'rate': 68.4 - }, - { - 'id': '311092', - 'title': '频率分布直方图的相关计算', - 'rate': 0.0 - }, - { - 'id': '310450', - 'title': '面面垂直的判定', - 'rate': 0.0 - }, - { - 'id': '310421', - 'title': '多面体的结构特征', - 'rate': 0.0 - }, - { - 'id': '311104', - 'title': '互斥事件与对立事件关系的辨析', - 'rate': 0.0 - }, - { - 'id': '310313', - 'title': '向量的模的坐标表示及坐标计算向量的模', - 'rate': 0.0 - }, - { - 'id': '310854', - 'title': '利用平面向量的数量积求夹角', - 'rate': 0.0 - }, - { - 'id': '310306', - 'title': '平面向量运算坐标表示的相关计算', - 'rate': 0.0 - }, - { - 'id': '310834', - 'title': '应用正弦定理解三角形', - 'rate': 0.0 - }, - { - 'id': '310615', - 'title': '共轭复数', - 'rate': 0.0 - }], - 'rightRate': 50.0, - 'allRight': False, - 'createPaperPara': None, - 'assignPointsFlag': True, - 'groups': [{ - 'index': 1, - 'groupId': 61657619, - 'groupName': '单选题', - 'groupInfo': '本题共8小题,共40分', - 'groupDeclare': '', - 'totalQuestions': 8, - 'totalScore': 40.0, - 'myTotalScore': 5.0, - 'questions': [{ - 'id': '1176211375600604287', - 'scoreCriterion': '', - 'cate': 1, - 'cateName': '单选', - 'subjectQuestionType': 1020101, - 'subjectQuestionTypeName': '单选题', - 'questionContent': '
复数满足,则复数的共轭复数(\u3000\u3000)
', - 'options': [{ - 'index': 0, - 'choice': 'A', - 'option': '
' - }, - { - 'index': 1, - 'choice': 'B', - 'option': '' - }, - { - 'index': 2, - 'choice': 'C', - 'option': '' - }, - { - 'index': 3, - 'choice': 'D', - 'option': '' - }], - 'myAnswer': ['A'], - 'myAnswers': ['A'], - 'attachmentImages': [], - 'rightStatus': 3, - 'rightAnswer': ['C'], - 'isRecordCorrected': 1, - 'recordCorrectUserType': 5, - 'degreeRange': 8.0, - 'degreeRangeDesc': '易', - 'questionType': 0, - 'questionSource': 1, - 'source': 1, - 'audioUrl': '', - 'questionSort': 1, - 'analyse': '
∵,∴,∴.
故选C.
', - 'method': None, - 'childQuestions': [], - 'knowledges': [{ - 'id': '310615', - 'title': '共轭复数' - }], - 'revision': True, - 'score': 5.0, - 'myScore': 0.0, - 'scoreList': [0.0, 1.0, 2.0, 3.0, 4.0, 5.0], - 'lessons': [], - 'collected': False, - 'subjectId': 2, - 'questionNo': 1, - 'questionNoShow': '1', - 'subjective': False, - 'groupSort': 1, - 'groupName': '单选题', - 'groupInfo': '本题共8小题,共40分', - 'groupDeclare': '' - }, - { - 'id': '1178807127132792160', - 'scoreCriterion': '', - 'cate': 1, - 'cateName': '单选', - 'subjectQuestionType': 1020101, - 'subjectQuestionTypeName': '单选题', - 'questionContent': '
在2025年某地销售的汽车中随机选取1000台,对销售价格与销售数量进行统计,这1000台车辆的销售价格都不小于5万元,但小于30万元,将销售价格分为五组:,,,,(单位:万元).统计后制成的频率分布直方图如图所示.在选取的1000台汽车中,销售价格在内的车辆台数为(\u3000\u3000)
\n
', - 'options': [{ - 'index': 0, - 'choice': 'A', - 'option': '
800
' - }, - { - 'index': 1, - 'choice': 'B', - 'option': '600' - }, - { - 'index': 2, - 'choice': 'C', - 'option': '700' - }, - { - 'index': 3, - 'choice': 'D', - 'option': '750' - }], - 'myAnswer': ['B'], - 'myAnswers': ['B'], - 'attachmentImages': [], - 'rightStatus': 3, - 'rightAnswer': ['C'], - 'isRecordCorrected': 1, - 'recordCorrectUserType': 5, - 'degreeRange': 7.0, - 'degreeRangeDesc': '易', - 'questionType': 0, - 'questionSource': 1, - 'source': 1, - 'audioUrl': '', - 'questionSort': 2, - 'analyse': '
由图可得:,∴,
∴销售价格在内的频率为,
∴销售价格在内的车辆台数为.
故选C.
', - 'method': None, - 'childQuestions': [], - 'knowledges': [{ - 'id': '311092', - 'title': '频率分布直方图的相关计算' - }], - 'revision': True, - 'score': 5.0, - 'myScore': 0.0, - 'scoreList': [0.0, 1.0, 2.0, 3.0, 4.0, 5.0], - 'lessons': [], - 'collected': False, - 'subjectId': 2, - 'questionNo': 2, - 'questionNoShow': '2', - 'subjective': False, - 'groupSort': 1, - 'groupName': '单选题', - 'groupInfo': '本题共8小题,共40分', - 'groupDeclare': '' - }, - { - 'id': '1176211356273243473', - 'scoreCriterion': '', - 'cate': 1, - 'cateName': '单选', - 'subjectQuestionType': 1020101, - 'subjectQuestionTypeName': '单选题', - 'questionContent': '
甲、乙两位同学暑假计划从吉林省去河北省旅游,他们所搭乘动车的“”座位车厢,如图所示,若这两位同学买到了同一排的座位,则他们的座位正好相邻的概率为(\u3000\u3000)
\n
', - 'options': [{ - 'index': 0, - 'choice': 'A', - 'option': '
' - }, - { - 'index': 1, - 'choice': 'B', - 'option': '' - }, - { - 'index': 2, - 'choice': 'C', - 'option': '' - }, - { - 'index': 3, - 'choice': 'D', - 'option': '' - }], - 'myAnswer': ['C'], - 'myAnswers': ['C'], - 'attachmentImages': [], - 'rightStatus': 3, - 'rightAnswer': ['D'], - 'isRecordCorrected': 1, - 'recordCorrectUserType': 5, - 'degreeRange': 7.0, - 'degreeRangeDesc': '易', - 'questionType': 0, - 'questionSource': 1, - 'source': 1, - 'audioUrl': '', - 'questionSort': 3, - 'analyse': '
设事件为“他们的座位正好相邻”,
甲乙二人买到同一排,,,,,5个座位中的两个形成的样本空间为
\n
,共包含10个样本点,
其中事件,包含3个样本点,则有,
所以他们的座位正好相邻的概率为.
故选D.
', - 'method': None, - 'childQuestions': [], - 'knowledges': [{ - 'id': '310583', - 'title': '计算古典概型问题的概率' - }], - 'revision': True, - 'score': 5.0, - 'myScore': 0.0, - 'scoreList': [0.0, 1.0, 2.0, 3.0, 4.0, 5.0], - 'lessons': [], - 'collected': False, - 'subjectId': 2, - 'questionNo': 3, - 'questionNoShow': '3', - 'subjective': False, - 'groupSort': 1, - 'groupName': '单选题', - 'groupInfo': '本题共8小题,共40分', - 'groupDeclare': '' - }, - { - 'id': '1176211251046528302', - 'scoreCriterion': '', - 'cate': 1, - 'cateName': '单选', - 'subjectQuestionType': 1020101, - 'subjectQuestionTypeName': '单选题', - 'questionContent': '
已知向量,,若,则(\u3000\u3000)
', - 'options': [{ - 'index': 0, - 'choice': 'A', - 'option': '
' - }, - { - 'index': 1, - 'choice': 'B', - 'option': '1' - }, - { - 'index': 2, - 'choice': 'C', - 'option': '' - }, - { - 'index': 3, - 'choice': 'D', - 'option': '' - }], - 'myAnswer': ['B'], - 'myAnswers': ['B'], - 'attachmentImages': [], - 'rightStatus': 3, - 'rightAnswer': ['D'], - 'isRecordCorrected': 1, - 'recordCorrectUserType': 5, - 'degreeRange': 7.0, - 'degreeRangeDesc': '易', - 'questionType': 0, - 'questionSource': 1, - 'source': 1, - 'audioUrl': '', - 'questionSort': 4, - 'analyse': '
由,得,所以,
又,,则,所以.
故选D.
', - 'method': None, - 'childQuestions': [], - 'knowledges': [{ - 'id': '310306', - 'title': '平面向量运算坐标表示的相关计算' - }], - 'revision': True, - 'score': 5.0, - 'myScore': 0.0, - 'scoreList': [0.0, 1.0, 2.0, 3.0, 4.0, 5.0], - 'lessons': [], - 'collected': False, - 'subjectId': 2, - 'questionNo': 4, - 'questionNoShow': '4', - 'subjective': False, - 'groupSort': 1, - 'groupName': '单选题', - 'groupInfo': '本题共8小题,共40分', - 'groupDeclare': '' - }, - { - 'id': '1176211375600604288', - 'scoreCriterion': '', - 'cate': 1, - 'cateName': '单选', - 'subjectQuestionType': 1020101, - 'subjectQuestionTypeName': '单选题', - 'questionContent': '
设,是两个不同的平面,,是两条不同的直线,下列说法正确的是(\u3000\u3000)
', - 'options': [{ - 'index': 0, - 'choice': 'A', - 'option': '
若,,,则
' - }, - { - 'index': 1, - 'choice': 'B', - 'option': '若,,,则' - }, - { - 'index': 2, - 'choice': 'C', - 'option': '若,,,则' - }, - { - 'index': 3, - 'choice': 'D', - 'option': '若,,,则' - }], - 'myAnswer': ['C'], - 'myAnswers': ['C'], - 'attachmentImages': [], - 'rightStatus': 3, - 'rightAnswer': ['A'], - 'isRecordCorrected': 1, - 'recordCorrectUserType': 5, - 'degreeRange': 6.0, - 'degreeRangeDesc': '易', - 'questionType': 0, - 'questionSource': 1, - 'source': 1, - 'audioUrl': '', - 'questionSort': 5, - 'analyse': '
对于A,∵,,又,∴,故A选项正确;
对于B,∵,,,∴可绕任意旋转,∴与不一定垂直,故B选项错误;
对于C,∵,,,∴,故C选项错误;
对于D,∵,,,∴可绕任意旋转,∴与不一定垂直,故D选项错误.
故选A.
', - 'method': None, - 'childQuestions': [], - 'knowledges': [{ - 'id': '310450', - 'title': '面面垂直的判定' - }], - 'revision': True, - 'score': 5.0, - 'myScore': 0.0, - 'scoreList': [0.0, 1.0, 2.0, 3.0, 4.0, 5.0], - 'lessons': [], - 'collected': False, - 'subjectId': 2, - 'questionNo': 5, - 'questionNoShow': '5', - 'subjective': False, - 'groupSort': 1, - 'groupName': '单选题', - 'groupInfo': '本题共8小题,共40分', - 'groupDeclare': '' - }, - { - 'id': '1176211253194020070', - 'scoreCriterion': '', - 'cate': 1, - 'cateName': '单选', - 'subjectQuestionType': 1020101, - 'subjectQuestionTypeName': '单选题', - 'questionContent': '
中国古代四大名楼鹳雀楼,位于山西省运城市永济市蒲州镇,因唐代诗人王之涣的诗作《登鹳雀楼》而流芳后世.如图,某同学为测量鹳雀楼的高度,在鹳雀楼的正东方向找到一座建筑物,高约为,在地面上点处(,,三点共线)测得建筑物顶部,鹳雀楼顶部的仰角分别为和,在处测得楼顶部的仰角为,则鹳雀楼的高度约为(\u3000\u3000)
\n
', - 'options': [{ - 'index': 0, - 'choice': 'A', - 'option': '
' - }, - { - 'index': 1, - 'choice': 'B', - 'option': '' - }, - { - 'index': 2, - 'choice': 'C', - 'option': '' - }, - { - 'index': 3, - 'choice': 'D', - 'option': '' - }], - 'myAnswer': ['B'], - 'myAnswers': ['B'], - 'attachmentImages': [], - 'rightStatus': 1, - 'rightAnswer': ['B'], - 'isRecordCorrected': 1, - 'recordCorrectUserType': 5, - 'degreeRange': 6.0, - 'degreeRangeDesc': '易', - 'questionType': 0, - 'questionSource': 1, - 'source': 1, - 'audioUrl': '', - 'questionSort': 6, - 'analyse': '
由题意,在中,,
在中,,,
∴,由正弦定理,得,
∴在中,.
故选:B.
', - 'method': None, - 'childQuestions': [], - 'knowledges': [{ - 'id': '310845', - 'title': '利用正、余弦定理解决高度测量问题' - }], - 'revision': True, - 'score': 5.0, - 'myScore': 5.0, - 'scoreList': [0.0, 1.0, 2.0, 3.0, 4.0, 5.0], - 'lessons': [], - 'collected': False, - 'subjectId': 2, - 'questionNo': 6, - 'questionNoShow': '6', - 'subjective': False, - 'groupSort': 1, - 'groupName': '单选题', - 'groupInfo': '本题共8小题,共40分', - 'groupDeclare': '' - }, - { - 'id': '1195892489857859996', - 'scoreCriterion': '', - 'cate': 1, - 'cateName': '单选', - 'subjectQuestionType': 1020101, - 'subjectQuestionTypeName': '单选题', - 'questionContent': '
在平面内,定点,,,满足,,动点,满足,,则的最大值是(\u3000\u3000)
', - 'options': [{ - 'index': 0, - 'choice': 'A', - 'option': '
' - }, - { - 'index': 1, - 'choice': 'B', - 'option': '' - }, - { - 'index': 2, - 'choice': 'C', - 'option': '' - }, - { - 'index': 3, - 'choice': 'D', - 'option': '' - }], - 'myAnswer': ['C'], - 'myAnswers': ['C'], - 'attachmentImages': [], - 'rightStatus': 3, - 'rightAnswer': ['B'], - 'isRecordCorrected': 1, - 'recordCorrectUserType': 5, - 'degreeRange': 5.0, - 'degreeRangeDesc': '中', - 'questionType': 0, - 'questionSource': 1, - 'source': 1, - 'audioUrl': '', - 'questionSort': 7, - 'analyse': '
法一:由,可得为的外心,
又,可得,,
即,
即有,,可得为的垂心,
则为的中心,即为正三角形,
由,即有,
解得,所以的边长为,
以为坐标原点,所在直线为轴建立直角坐标系,
可得,,,
由,可设,
由,可得为的中点,即有,
则
,
当,即时,取得最大值.
\n
\n
法二:如图,根据已知,有,
因此有,,全等,
进而得到为正三角形,计算可得,
\n
\n
根据题意在以为圆心,1为半径的圆上运动,
因此的中点在以的中点为圆心、为半径的圆上运动,
因此的最大值为.
故选:B.
', - 'method': None, - 'childQuestions': [], - 'knowledges': [{ - 'id': '310313', - 'title': '向量的模的坐标表示及坐标计算向量的模' - }], - 'revision': True, - 'score': 5.0, - 'myScore': 0.0, - 'scoreList': [0.0, 1.0, 2.0, 3.0, 4.0, 5.0], - 'lessons': [{ - 'courseId': '16185', - 'lessonId': '75001', - 'playTime': '11分56秒', - 'img': 'https://static.ewt360.com/upload/ewt/kecheng/2018/12/11/20181211162732140.png', - 'bgImg': 'https://static.ewt360.com/upload/ewt/kecheng/2018/12/27/20181227152923200.png', - 'videoTitle': 'B利用数形结合思想解平面向量问题专题测试卷-T6', - 'color': '#418282', - 'teacherImg': 'http://file.ewt360.com/file/1316391138168431278', - 'url': '/site-study/#/playVideo?courseId=16185&lessonId=75001&from=report_recommend', - 'subjectId': 0, - 'playRatio': '0.0', - 'questionId': '1195892489857859996' - }], - 'collected': False, - 'subjectId': 2, - 'questionNo': 7, - 'questionNoShow': '7', - 'subjective': False, - 'groupSort': 1, - 'groupName': '单选题', - 'groupInfo': '本题共8小题,共40分', - 'groupDeclare': '' - }, - { - 'id': '1178807249539383663', - 'scoreCriterion': '', - 'cate': 1, - 'cateName': '单选', - 'subjectQuestionType': 1020101, - 'subjectQuestionTypeName': '单选题', - 'questionContent': '
《九章算术》是我国古代著名的数学著作,书中记载有几何体“刍甍”.现有一个刍甍如图所示,底面为正方形,平面,四边形,为两个全等的等腰梯形,,且,则此刍甍的外接球的表面积为(\u3000\u3000)
\n
', - 'options': [{ - 'index': 0, - 'choice': 'A', - 'option': '
' - }, - { - 'index': 1, - 'choice': 'B', - 'option': '' - }, - { - 'index': 2, - 'choice': 'C', - 'option': '' - }, - { - 'index': 3, - 'choice': 'D', - 'option': '' - }], - 'myAnswer': ['B'], - 'myAnswers': ['B'], - 'attachmentImages': [], - 'rightStatus': 3, - 'rightAnswer': ['C'], - 'isRecordCorrected': 1, - 'recordCorrectUserType': 5, - 'degreeRange': 5.0, - 'degreeRangeDesc': '中', - 'questionType': 0, - 'questionSource': 1, - 'source': 1, - 'audioUrl': '', - 'questionSort': 8, - 'analyse': '
如图所示,取,中点,,正方形中心,中点,连接,,,,
根据题意可得平面,,点是的中点,,
在等腰中,,,同理,
则等腰梯形的高为,
根据几何体的结构特征可知,刍甍的外接球的球心在直线上,连接,,,
因为正方形的外接圆的半径,则有,
而,,,
故,故点在线段的延长线上,
即有,则,解得,
则刍甍的外接球的半径为,
则刍甍的外接球的表面积为.
故选C.
\n
', - 'method': None, - 'childQuestions': [], - 'knowledges': [{ - 'id': '310421', - 'title': '多面体的结构特征' - }], - 'revision': True, - 'score': 5.0, - 'myScore': 0.0, - 'scoreList': [0.0, 1.0, 2.0, 3.0, 4.0, 5.0], - 'lessons': [{ - 'courseId': '14801', - 'lessonId': '67061', - 'playTime': '8分16秒', - 'img': 'https://static.ewt360.com/upload/ewt/kecheng/2018/12/11/20181211162732140.png', - 'bgImg': 'https://static.ewt360.com/upload/ewt/kecheng/2018/12/27/20181227152923200.png', - 'videoTitle': '拔尖1+T8', - 'color': '#418282', - 'teacherImg': 'http://file.ewt360.com/file/879911599202205696', - 'url': '/site-study/#/playVideo?courseId=14801&lessonId=67061&from=report_recommend', - 'subjectId': 0, - 'playRatio': '0.0', - 'questionId': '1178807249539383663' - }], - 'collected': False, - 'subjectId': 2, - 'questionNo': 8, - 'questionNoShow': '8', - 'subjective': False, - 'groupSort': 1, - 'groupName': '单选题', - 'groupInfo': '本题共8小题,共40分', - 'groupDeclare': '' - }], - 'rightQuestionsCount': 0, - 'rightRate': 0.0 - }, - { - 'index': 2, - 'groupId': 61657620, - 'groupName': '多选题', - 'groupInfo': '本题共3小题,共18分', - 'groupDeclare': '', - 'totalQuestions': 3, - 'totalScore': 18.0, - 'myTotalScore': 3.0, - 'questions': [{ - 'id': '1182074793012652102', - 'scoreCriterion': '', - 'cate': 2, - 'cateName': '多选', - 'subjectQuestionType': 1020201, - 'subjectQuestionTypeName': '多选题', - 'questionContent': '
下列说法中正确的是(\u3000\u3000)
', - 'options': [{ - 'index': 0, - 'choice': 'A', - 'option': '
三点确定一个平面
' - }, - { - 'index': 1, - 'choice': 'B', - 'option': '
在中,角,,所对应的边分别为,,,若,则为等腰三角形
' - }, - { - 'index': 2, - 'choice': 'C', - 'option': '已知,是非零向量,与所成的角为锐角的充要条件是' - }, - { - 'index': 3, - 'choice': 'D', - 'option': '若满足条件,,的有两个,则实数的取值范围是' - }], - 'myAnswer': ['A', 'C'], - 'myAnswers': ['A', 'C'], - 'attachmentImages': [], - 'rightStatus': 3, - 'rightAnswer': ['B', 'D'], - 'isRecordCorrected': 1, - 'recordCorrectUserType': 5, - 'degreeRange': 6.0, - 'degreeRangeDesc': '易', - 'questionType': 0, - 'questionSource': 1, - 'source': 1, - 'audioUrl': '', - 'questionSort': 9, - 'analyse': '
A:不共线的三点确定一个平面,故A错;
B:在中,若,则,
\n
所以,所以为等腰三角形,故B正确;
C:与所成的角为锐角的充要条件是且排除与同向共线,故C错;
D:由正弦定理,可得,由题意得:当时,满足条件的有两个,所以,解得,故D正确.
故选:BD.
', - 'method': None, - 'childQuestions': [], - 'knowledges': [{ - 'id': '310834', - 'title': '应用正弦定理解三角形' - }, - { - 'id': '310854', - 'title': '利用平面向量的数量积求夹角' - }], - 'revision': True, - 'score': 6.0, - 'myScore': 0.0, - 'scoreList': [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0], - 'lessons': [], - 'collected': False, - 'subjectId': 2, - 'questionNo': 9, - 'questionNoShow': '9', - 'subjective': False, - 'groupSort': 2, - 'groupName': '多选题', - 'groupInfo': '本题共3小题,共18分', - 'groupDeclare': '' - }, - { - 'id': '1176211253194020071', - 'scoreCriterion': '', - 'cate': 2, - 'cateName': '多选', - 'subjectQuestionType': 1020201, - 'subjectQuestionTypeName': '多选题', - 'questionContent': '
已知事件与事件为互斥事件,是事件的对立事件,是事件的对立事件,若,,则(\u3000\u3000)
', - 'options': [{ - 'index': 0, - 'choice': 'A', - 'option': '
' - }, - { - 'index': 1, - 'choice': 'B', - 'option': '' - }, - { - 'index': 2, - 'choice': 'C', - 'option': '' - }, - { - 'index': 3, - 'choice': 'D', - 'option': '事件与事件不独立' - }], - 'myAnswer': ['B', 'C'], - 'myAnswers': ['B', 'C'], - 'attachmentImages': [], - 'rightStatus': 3, - 'rightAnswer': ['A', 'B', 'D'], - 'isRecordCorrected': 1, - 'recordCorrectUserType': 5, - 'degreeRange': 6.0, - 'degreeRangeDesc': '易', - 'questionType': 0, - 'questionSource': 1, - 'source': 1, - 'audioUrl': '', - 'questionSort': 10, - 'analyse': '
对于A,,故A正确;
对于B,∵事件与事件为互斥事件,,,∴,故B正确;
对于C,,故C错误;
对于D,,,,∴事件与事件不独立,故D正确.
故选ABD.
', - 'method': None, - 'childQuestions': [], - 'knowledges': [{ - 'id': '311104', - 'title': '互斥事件与对立事件关系的辨析' - }, - { - 'id': '315621', - 'title': '事件的相互独立性' - }], - 'revision': True, - 'score': 6.0, - 'myScore': 0.0, - 'scoreList': [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0], - 'lessons': [], - 'collected': False, - 'subjectId': 2, - 'questionNo': 10, - 'questionNoShow': '10', - 'subjective': False, - 'groupSort': 2, - 'groupName': '多选题', - 'groupInfo': '本题共3小题,共18分', - 'groupDeclare': '' - }, - { - 'id': '1176211356273243512', - 'scoreCriterion': '', - 'cate': 2, - 'cateName': '多选', - 'subjectQuestionType': 1020201, - 'subjectQuestionTypeName': '多选题', - 'questionContent': '
如图甲,在矩形中,,为的中点.将沿直线翻折至的位置,为的中点,如图乙所示,则(\u3000\u3000)
\n
', - 'options': [{ - 'index': 0, - 'choice': 'A', - 'option': '
翻折过程中,四棱锥必存在外接球,不一定存在内切球
' - }, - { - 'index': 1, - 'choice': 'B', - 'option': '翻折过程中,不存在任何位置的,使得' - }, - { - 'index': 2, - 'choice': 'C', - 'option': '当二面角为时,点到平面的距离为' - }, - { - 'index': 3, - 'choice': 'D', - 'option': '
当四棱锥的体积最大时,以为直径的球面被平面截得的交线长为
' - }], - 'myAnswer': ['B', 'C'], - 'myAnswers': ['B', 'C'], - 'attachmentImages': [], - 'rightStatus': 2, - 'rightAnswer': ['B', 'C', 'D'], - 'isRecordCorrected': 1, - 'recordCorrectUserType': 5, - 'degreeRange': 4.0, - 'degreeRangeDesc': '中', - 'questionType': 0, - 'questionSource': 1, - 'source': 1, - 'audioUrl': '', - 'questionSort': 11, - 'analyse': '
对于A,由已知,直角三角形存在以为直径的唯一外接圆,
∵,∴点不在该圆上,所以四边形不存在外接圆,因此四棱锥不存在外接球,故A错误;
对于B,由已知,,,∴,∴,即,假设在翻折过程中,存在位置,如图所示,使得,又∵,平面,平面,∴平面,
又∵平面,∴,
∵在翻折至的位置的过程中,,
∴显然不成立,故假设错误,∴翻折过程中,不存在任何位置的,使得,故B正确;
\n
\n
对于C,取中点,由已知,,∴,∴,
∴是二面角的平面角,
当二面角为时,二面角为,即,
又∵,∴到平面的距离为,
设点到平面的距离为,∵,
∴,∴,
∴,即点到平面的距离为,
∵点为中点,∴点到平面的距离是点到平面距离的,
∴点到平面的距离为,故C正确;
对于D,四棱锥底面梯形的面积为定值,
∴当四棱锥的体积最大时,平面平面,
∵平面平面,平面,
由B选项有,∴平面,
∵平面,∴,
∴,
又∵平面,∴点到平面的距离,
∵点为中点,
∴以为直径的球的半径,球心到平面的距离,
易知,球面被平面截得的交线为圆,其半径,
∴该交线周长为,故D正确.
故选BCD.
', - 'method': None, - 'childQuestions': [], - 'knowledges': [{ - 'id': '310457', - 'title': '立体几何中的动态问题' - }], - 'revision': True, - 'score': 6.0, - 'myScore': 3.0, - 'scoreList': [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0], - 'lessons': [{ - 'courseId': '14801', - 'lessonId': '67063', - 'playTime': '8分57秒', - 'img': 'https://static.ewt360.com/upload/ewt/kecheng/2018/12/11/20181211162732140.png', - 'bgImg': 'https://static.ewt360.com/upload/ewt/kecheng/2018/12/27/20181227152923200.png', - 'videoTitle': '拔尖1+T12', - 'color': '#418282', - 'teacherImg': 'http://file.ewt360.com/file/879911599202205696', - 'url': '/site-study/#/playVideo?courseId=14801&lessonId=67063&from=report_recommend', - 'subjectId': 0, - 'playRatio': '0.0', - 'questionId': '1176211356273243512' - }], - 'collected': False, - 'subjectId': 2, - 'questionNo': 11, - 'questionNoShow': '11', - 'subjective': False, - 'groupSort': 2, - 'groupName': '多选题', - 'groupInfo': '本题共3小题,共18分', - 'groupDeclare': '' - }], - 'rightQuestionsCount': 0, - 'rightRate': 0.0 - }, - { - 'index': 3, - 'groupId': 61657621, - 'groupName': '填空题', - 'groupInfo': '本题共3小题,共15分', - 'groupDeclare': '', - 'totalQuestions': 3, - 'totalScore': 15.0, - 'myTotalScore': 15.0, - 'questions': [{ - 'id': '1176211253194020072', - 'scoreCriterion': '', - 'cate': 30, - 'cateName': '填空', - 'subjectQuestionType': 1023001, - 'subjectQuestionTypeName': '填空题', - 'questionContent': '
已知一组样本数据,,,,且,平均数,则该组数据的方差为1.
', - 'options': [], - 'myAnswer': ['https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/f7500c8b-f535-4efb-b864-f00bc8c3b213.jpg'], - 'myAnswers': None, - 'attachmentImages': ['https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/f7500c8b-f535-4efb-b864-f00bc8c3b213.jpg'], - 'rightStatus': 1, - 'rightAnswer': ['
58.5
'], - 'isRecordCorrected': 1, - 'recordCorrectUserType': 1, - 'degreeRange': 6.0, - 'degreeRangeDesc': '易', - 'questionType': 0, - 'questionSource': 1, - 'source': 1, - 'audioUrl': '', - 'questionSort': 12, - 'analyse': '
由题意可得,该组数据的方差为

.
', - 'method': None, - 'childQuestions': [], - 'knowledges': [{ - 'id': '311075', - 'title': '离散型随机变量的方差与标准差' - }], - 'revision': True, - 'score': 5.0, - 'myScore': 5.0, - 'scoreList': [0.0, 1.0, 2.0, 3.0, 4.0, 5.0], - 'lessons': [], - 'collected': False, - 'subjectId': 2, - 'questionNo': 12, - 'questionNoShow': '12', - 'subjective': True, - 'groupSort': 3, - 'groupName': '填空题', - 'groupInfo': '本题共3小题,共15分', - 'groupDeclare': '' - }, - { - 'id': '1176211356273243476', - 'scoreCriterion': '', - 'cate': 30, - 'cateName': '填空', - 'subjectQuestionType': 1023001, - 'subjectQuestionTypeName': '填空题', - 'questionContent': '
已知在中,角,,所对的边分别为,,,满足,且,则的取值范围为1.
', - 'options': [], - 'myAnswer': ['https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/d3b09270-b861-4f8c-ac99-743dbdf0d47c.jpg'], - 'myAnswers': None, - 'attachmentImages': ['https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/d3b09270-b861-4f8c-ac99-743dbdf0d47c.jpg'], - 'rightStatus': 1, - 'rightAnswer': ['
'], - 'isRecordCorrected': 1, - 'recordCorrectUserType': 1, - 'degreeRange': 6.0, - 'degreeRangeDesc': '易', - 'questionType': 0, - 'questionSource': 1, - 'source': 1, - 'audioUrl': '', - 'questionSort': 13, - 'analyse': '
因为,由正弦定理得,
即,而,∴,故,又,∴,
则,同理,
故,又,
\n
∴,故,则.
', - 'method': None, - 'childQuestions': [], - 'knowledges': [{ - 'id': '310842', - 'title': '利用正、余弦定理求解边长面积周长取值范围问题' - }], - 'revision': True, - 'score': 5.0, - 'myScore': 5.0, - 'scoreList': [0.0, 1.0, 2.0, 3.0, 4.0, 5.0], - 'lessons': [{ - 'courseId': '14801', - 'lessonId': '67064', - 'playTime': '4分4秒', - 'img': 'https://static.ewt360.com/upload/ewt/kecheng/2018/12/11/20181211162732140.png', - 'bgImg': 'https://static.ewt360.com/upload/ewt/kecheng/2018/12/27/20181227152923200.png', - 'videoTitle': '拔尖1+T15', - 'color': '#418282', - 'teacherImg': 'http://file.ewt360.com/file/879911599202205696', - 'url': '/site-study/#/playVideo?courseId=14801&lessonId=67064&from=report_recommend', - 'subjectId': 0, - 'playRatio': '0.0', - 'questionId': '1176211356273243476' - }], - 'collected': False, - 'subjectId': 2, - 'questionNo': 13, - 'questionNoShow': '13', - 'subjective': True, - 'groupSort': 3, - 'groupName': '填空题', - 'groupInfo': '本题共3小题,共15分', - 'groupDeclare': '' - }, - { - 'id': '1176211251046528305', - 'scoreCriterion': '', - 'cate': 30, - 'cateName': '填空', - 'subjectQuestionType': 1023001, - 'subjectQuestionTypeName': '填空题', - 'questionContent': '
在长方体中,,,点为棱上靠近点的三等分点,点是长方形内一动点(含边界),且直线,与平面所成角的大小相等,则线段长度的取值范围为1.
', - 'options': [], - 'myAnswer': ['https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/e9883a80-4b0d-4775-a606-64ab5b5b5eaf.jpg'], - 'myAnswers': None, - 'attachmentImages': ['https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/e9883a80-4b0d-4775-a606-64ab5b5b5eaf.jpg'], - 'rightStatus': 1, - 'rightAnswer': ['
'], - 'isRecordCorrected': 1, - 'recordCorrectUserType': 1, - 'degreeRange': 5.0, - 'degreeRangeDesc': '中', - 'questionType': 0, - 'questionSource': 1, - 'source': 1, - 'audioUrl': '', - 'questionSort': 14, - 'analyse': '
如图1所示,连接,作交于,连接.
因为平面,所以为与平面所成的角.
因为平面,所以为与平面所成的角.
因为,与平面所成角的大小相等,所以,
则,又因为,
所以,则点在的中垂线上,即点在线段上运动,如图2,
\n
\n
因为,,为棱上靠近的三等分点,
所以,,则,因为,所以,
又,可得,,,,
当点在点处时,线段的长度取到最大值,最大值为,
当点在点处,线段的长度取到最小值,最小值为,
所以线段的长度的取值范围为.
', - 'method': None, - 'childQuestions': [], - 'knowledges': [{ - 'id': '310457', - 'title': '立体几何中的动态问题' - }], - 'revision': True, - 'score': 5.0, - 'myScore': 5.0, - 'scoreList': [0.0, 1.0, 2.0, 3.0, 4.0, 5.0], - 'lessons': [{ - 'courseId': '14801', - 'lessonId': '67065', - 'playTime': '9分56秒', - 'img': 'https://static.ewt360.com/upload/ewt/kecheng/2018/12/11/20181211162732140.png', - 'bgImg': 'https://static.ewt360.com/upload/ewt/kecheng/2018/12/27/20181227152923200.png', - 'videoTitle': '拔尖1+T16', - 'color': '#418282', - 'teacherImg': 'http://file.ewt360.com/file/879911599202205696', - 'url': '/site-study/#/playVideo?courseId=14801&lessonId=67065&from=report_recommend', - 'subjectId': 0, - 'playRatio': '0.0', - 'questionId': '1176211251046528305' - }], - 'collected': False, - 'subjectId': 2, - 'questionNo': 14, - 'questionNoShow': '14', - 'subjective': True, - 'groupSort': 3, - 'groupName': '填空题', - 'groupInfo': '本题共3小题,共15分', - 'groupDeclare': '' - }], - 'rightQuestionsCount': 1, - 'rightRate': 0.0 - }, - { - 'index': 4, - 'groupId': 61657622, - 'groupName': '解答题', - 'groupInfo': '本题共5小题,共77分', - 'groupDeclare': '', - 'totalQuestions': 5, - 'totalScore': 77.0, - 'myTotalScore': 77.0, - 'questions': [{ - 'id': '1176211251046528343', - 'scoreCriterion': '', - 'cate': 5, - 'cateName': '解答', - 'subjectQuestionType': 1020501, - 'subjectQuestionTypeName': '解答题', - 'questionContent': '
如图:用,,,四类不同的元件连接成系统,当元件正常工作且元件,都正常工作,或当元件正常工作且元件正常工作时,系统正常工作.已知元件,,,是否正常工作互相独立,且正常工作的概率依次为,,,.
\n
\n
(1)求元件不正常工作的概率;
(2)求元件,,都正常工作的概率;
(3)求系统正常工作的概率.
', - 'options': [], - 'myAnswer': ['https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/5f503809-079e-44d8-b97f-dff9456e27c3.jpg'], - 'myAnswers': None, - 'attachmentImages': ['https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/5f503809-079e-44d8-b97f-dff9456e27c3.jpg'], - 'rightStatus': 1, - 'rightAnswer': ['
(1);(2);(3).
'], - 'isRecordCorrected': 1, - 'recordCorrectUserType': 1, - 'degreeRange': 6.0, - 'degreeRangeDesc': '易', - 'questionType': 0, - 'questionSource': 1, - 'source': 1, - 'audioUrl': '', - 'questionSort': 15, - 'analyse': '
设元件正常工作为事件,元件正常工作为事件,元件正常工作为事件,元件正常工作为事件.
(1)元件正常工作的概率,
所以它不正常工作的概率;
(2)元件,,都正常工作的概率;
(3)系统正常工作可分为,,都正常工作和,正常但,不都正常工作两种情况,
,,都正常工作的概率为,
,正常但,不都正常工作的概率为
,
所以系统正常工作的概率是.
', - 'method': None, - 'childQuestions': [], - 'knowledges': [{ - 'id': '315621', - 'title': '事件的相互独立性' - }], - 'revision': True, - 'score': 13.0, - 'myScore': 13.0, - 'scoreList': [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0], - 'lessons': [], - 'collected': False, - 'subjectId': 2, - 'questionNo': 15, - 'questionNoShow': '15', - 'subjective': True, - 'groupSort': 4, - 'groupName': '解答题', - 'groupInfo': '本题共5小题,共77分', - 'groupDeclare': '' - }, - { - 'id': '1176211356273243514', - 'scoreCriterion': '', - 'cate': 5, - 'cateName': '解答', - 'subjectQuestionType': 1020501, - 'subjectQuestionTypeName': '解答题', - 'questionContent': '
某中学为了解高一年级数学文化知识竞赛的得分情况,从参赛的1000名学生中随机抽取了50名学生的成绩进行分析.经统计,这50名学生的成绩全部介于55分和95分之间,将数据按照如下方式分成八组:第一组,第二组,…,第八组,如图是按上述分组方法得到的频率分布直方图的一部分.已知第一组和第八组人数相同,第七组的人数为3人.
\n
\n
(1)求第六组的频率;若比赛成绩由高到低的前15%为优秀等级,试估计该校参赛的高一年级1000名学生的成绩中优秀等级的最低分数(精确到0.1);
(2)若从样本中成绩属于第六组和第八组的所有学生中随机抽取两名学生,记他们的成绩分别为,,设事件:,求事件的概率.
', - 'options': [], - 'myAnswer': ['https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/cef3bd42-e146-4cd4-92f5-4372b79ad1b6.jpg'], - 'myAnswers': None, - 'attachmentImages': ['https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/cef3bd42-e146-4cd4-92f5-4372b79ad1b6.jpg'], - 'rightStatus': 1, - 'rightAnswer': ['
(1)0.08,81.9分;(2).
'], - 'isRecordCorrected': 1, - 'recordCorrectUserType': 1, - 'degreeRange': 5.0, - 'degreeRangeDesc': '中', - 'questionType': 0, - 'questionSource': 1, - 'source': 1, - 'audioUrl': '', - 'questionSort': 16, - 'analyse': '
(1)第七组的频率为,
所以第六组的频率为;
因为第七、八两组的频率之和为0.10,第六、七、八组的频率之和为0.18,
设优秀等级的最低分数为,则,
由,解得,
故估计该校参赛的高一年级1000名学生的成绩中优秀等级的最低分数为81.9分;
(2)第六组的人数为4人,设为,,,,第八组的人数为2人,设为,,
随机抽取两名学生,则有,,,,,,,,,,,,,,,共15种情况,
事件:发生当且仅当随机抽取的两名学生不在同一组,
所以事件包含的基本事件为,,,,,,,,共8种情况,
故.
', - 'method': None, - 'childQuestions': [], - 'knowledges': [{ - 'id': '310583', - 'title': '计算古典概型问题的概率' - }], - 'revision': True, - 'score': 15.0, - 'myScore': 15.0, - 'scoreList': [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0], - 'lessons': [], - 'collected': False, - 'subjectId': 2, - 'questionNo': 16, - 'questionNoShow': '16', - 'subjective': True, - 'groupSort': 4, - 'groupName': '解答题', - 'groupInfo': '本题共5小题,共77分', - 'groupDeclare': '' - }, - { - 'id': '1176211375600604329', - 'scoreCriterion': '', - 'cate': 5, - 'cateName': '解答', - 'subjectQuestionType': 1020501, - 'subjectQuestionTypeName': '解答题', - 'questionContent': '
在斜三角形中,内角,,的对边分别为,,,且满足.
(1)求角的大小;
(2)若,且上的中线长为,求斜三角形的面积.
', - 'options': [], - 'myAnswer': ['https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/62b47b8f-eea8-4d2a-aa20-8aba45f10c61.jpg'], - 'myAnswers': None, - 'attachmentImages': ['https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/62b47b8f-eea8-4d2a-aa20-8aba45f10c61.jpg'], - 'rightStatus': 1, - 'rightAnswer': ['
(1);(2).
'], - 'isRecordCorrected': 1, - 'recordCorrectUserType': 1, - 'degreeRange': 4.0, - 'degreeRangeDesc': '中', - 'questionType': 0, - 'questionSource': 1, - 'source': 1, - 'audioUrl': '', - 'questionSort': 17, - 'analyse': '
(1)∵,
∴由正弦定理可得,,
∴,
∵三角形为斜三角形,
∴不为直角,即,∴,
又∵,∴;
(2)方法一:
∵,
∴,
∴,
∴.
方法二:
\n
∵,,
\n
∴由余弦定理可得①,
\n
∵上的中线长为,且,
∴在中,由余弦定理可得,
在中,由余弦定理可得,
又∵,
∴,整理可得②,
∴由①②解得,
∴.
\n
', - 'method': None, - 'childQuestions': [], - 'knowledges': [{ - 'id': '310284', - 'title': '三角形的面积公式' - }, - { - 'id': '310311', - 'title': '极化恒等式在平面向量问题中的应用' - }], - 'revision': True, - 'score': 15.0, - 'myScore': 15.0, - 'scoreList': [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0], - 'lessons': [], - 'collected': False, - 'subjectId': 2, - 'questionNo': 17, - 'questionNoShow': '17', - 'subjective': True, - 'groupSort': 4, - 'groupName': '解答题', - 'groupInfo': '本题共5小题,共77分', - 'groupDeclare': '' - }, - { - 'id': '1176211375600604331', - 'scoreCriterion': '', - 'cate': 5, - 'cateName': '解答', - 'subjectQuestionType': 1020501, - 'subjectQuestionTypeName': '解答题', - 'questionContent': '
如图,在正三棱柱中,为上的点,为上的点,,分别为,的中点,平面.
\n
\n
(1)证明:,,,四点共面,且平面平面;
(2)若,,求平面与平面所成锐二面角的余弦值.
', - 'options': [], - 'myAnswer': ['https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/fcd1b2c1-5578-4363-a76e-9bd2af46b30b.jpg'], - 'myAnswers': None, - 'attachmentImages': ['https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/fcd1b2c1-5578-4363-a76e-9bd2af46b30b.jpg'], - 'rightStatus': 1, - 'rightAnswer': ['
(1)证明过程见解析;(2).
'], - 'isRecordCorrected': 1, - 'recordCorrectUserType': 1, - 'degreeRange': 3.0, - 'degreeRangeDesc': '难', - 'questionType': 0, - 'questionSource': 1, - 'source': 1, - 'audioUrl': '', - 'questionSort': 18, - 'analyse': '
(1)∵在正三棱柱中,,分别为,的中点,
∴,
∵为正三棱柱,∴,∴,
∴,,,四点共面;
∵为正三棱柱,∴为等边三角形,
又为的中点,∴,
在正三棱柱中,有平面平面,
而平面平面,
∴平面,
∵平面平面,平面,
∴,∴平面,
∵平面,∴平面平面.
\n
\n
(2)取的中点,过点作的垂线交于,连接,
易证平面,
又平面,∴,
∵,,∴平面,
\n
又平面,所以,
∴为平面与平面所成二面角的平面角,
∵,,∴,,
由(1)知,,
故四边形为平行四边形,
∴,∴,
由得:
,,
∴,
∴平面与平面所成锐二面角的余弦值为.
', - 'method': None, - 'childQuestions': [], - 'knowledges': [{ - 'id': '310938', - 'title': '求二面角' - }], - 'revision': True, - 'score': 17.0, - 'myScore': 17.0, - 'scoreList': [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0], - 'lessons': [{ - 'courseId': '14801', - 'lessonId': '67066', - 'playTime': '9分42秒', - 'img': 'https://static.ewt360.com/upload/ewt/kecheng/2018/12/11/20181211162732140.png', - 'bgImg': 'https://static.ewt360.com/upload/ewt/kecheng/2018/12/27/20181227152923200.png', - 'videoTitle': '拔尖1+T22', - 'color': '#418282', - 'teacherImg': 'http://file.ewt360.com/file/879911599202205696', - 'url': '/site-study/#/playVideo?courseId=14801&lessonId=67066&from=report_recommend', - 'subjectId': 0, - 'playRatio': '0.0', - 'questionId': '1176211375600604331' - }], - 'collected': False, - 'subjectId': 2, - 'questionNo': 18, - 'questionNoShow': '18', - 'subjective': True, - 'groupSort': 4, - 'groupName': '解答题', - 'groupInfo': '本题共5小题,共77分', - 'groupDeclare': '' - }, - { - 'id': '1239541785075703108', - 'scoreCriterion': '', - 'cate': 5, - 'cateName': '解答', - 'subjectQuestionType': 1020501, - 'subjectQuestionTypeName': '解答题', - 'questionContent': '
已知非零向量,,,均用有向线段表示,现定义一个新的向量以及向量间的一种运算“”:.
\n
\n
(1)证明:是这样一个向量:其模是的模的倍,方向为将绕起点按逆时针方向旋转角(为轴正方向按逆时针方向旋转到所成的角,且,并举一个具体的例子说明;
(2)如图1,分别以的边,为一边向外作和,使,.设线段的中点为,证明:;
(3)如图2,设,圆,是圆上一动点,以为边作等边(,,三点按逆时针排列),求的最大值.
', - 'options': [], - 'myAnswer': None, - 'myAnswers': None, - 'attachmentImages': [], - 'rightStatus': 1, - 'rightAnswer': ['
(1)证明见解析,例子不唯一;(2)证明见解析;(3)5.
'], - 'isRecordCorrected': 1, - 'recordCorrectUserType': 1, - 'degreeRange': 3.0, - 'degreeRangeDesc': '难', - 'questionType': 0, - 'questionSource': 1, - 'source': 1, - 'audioUrl': '', - 'questionSort': 19, - 'analyse': '
(1)证明:设,,
其中,,,分别为轴正方向绕起点按逆时针方向旋转到的方向所成的角,且,,
则,
,
于是,
即,的方向为将轴正方向绕起点按逆时针方向旋转角,
故是这样一个向量:其模是的模的倍,方向为将绕起点按逆时针方向旋转角(为轴正方向按逆时针方向旋转到所成的角,且),
例如,,,则,
,,与轴正方向的夹角为,与轴正方向的夹角为,
所以将的模变为原来的2倍,并按逆时针方向旋转,即可得到;
(2)证明:记,,
根据新定义,可得,
同理,
所以,
而,
所以,
故;
(3)设,,则,
,
所以
,
所以
,
所以当,即时,.
', - 'method': None, - 'childQuestions': [], - 'knowledges': [{ - 'id': '317034', - 'title': '平面向量' - }], - 'revision': True, - 'score': 17.0, - 'myScore': 17.0, - 'scoreList': [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0], - 'lessons': [], - 'collected': False, - 'subjectId': 2, - 'questionNo': 19, - 'questionNoShow': '19', - 'subjective': True, - 'groupSort': 4, - 'groupName': '解答题', - 'groupInfo': '本题共5小题,共77分', - 'groupDeclare': '' - }], - 'rightQuestionsCount': 1, - 'rightRate': 0.0 - }], - 'teacherReviewScore': None, - 'teacherReviewRank': None, - 'teacherReviewRankList': ['A', 'B', 'C', 'D'], - 'teacherReviewComment': None, - 'teacherReviewImageList': [] - } -} \ No newline at end of file diff --git a/tmp.json b/tmp.json new file mode 100644 index 0000000..0fbb21e --- /dev/null +++ b/tmp.json @@ -0,0 +1 @@ +["C"] \ No newline at end of file From f23955f7be0b5e764895c17cd0953914d1388a0f Mon Sep 17 00:00:00 2001 From: DingerBtn Date: Sun, 13 Jul 2025 00:32:56 +0800 Subject: [PATCH 03/31] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E7=AD=94=E6=A1=88?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E5=AE=8C=E5=85=A8=E5=8F=AF=E7=94=A8=EF=BC=8C?= =?UTF-8?q?=E5=B7=B2=E7=A7=BB=E5=85=A5src?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rubbish/get_corret_answer.py | 91 ------------------------------- rubbish/tmp.py | 10 ---- src/get_corret_answer.py | 100 +++++++++++++++++++++++++++++++++++ 3 files changed, 100 insertions(+), 101 deletions(-) delete mode 100644 rubbish/get_corret_answer.py delete mode 100644 rubbish/tmp.py create mode 100644 src/get_corret_answer.py diff --git a/rubbish/get_corret_answer.py b/rubbish/get_corret_answer.py deleted file mode 100644 index 0ab6219..0000000 --- a/rubbish/get_corret_answer.py +++ /dev/null @@ -1,91 +0,0 @@ -import json - -import requests -from urllib.parse import urlparse - - -paperId='1969526514235999045' -reportId='2040881795217891454' -homeworkId='10389626' -userId='151028179' -token = '151028179-1-89663793316a648f' - - -def get_answer(paperId:str, reportId:str, homeworkId:str, userId:str, token:str): - # 创建会话对象 - session = requests.Session() - - # 设置 User-Agent - session.headers.update({ - "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36 Edg/138.0.0.0" - }) - - # 只添加 token cookie - session.cookies.set( - name="token", - value=token, - domain=".ewt360.com", - path="/" - ) - - # 请求 URL - - url = f"https://web.ewt360.com/api/answerprod/web/answer/webreport/questionGroup?paperId={paperId}&reportId={reportId}&platform=1&bizCode=205&homeworkId={homeworkId}&userId={userId}" - - # 请求头 (保留所有原始头部) - headers = { - "authority": "web.ewt360.com", - "method": "GET", - "path": urlparse(url).path + "?" + urlparse(url).query, - "scheme": "https", - "accept": "application/json, text/plain, */*", - "accept-encoding": "gzip, deflate, br, zstd", - "accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6", - "access-control-allow-origin": "*", - "eagleeye-pappname": "aocb5mxsv0@c882b4be402630c", - "eagleeye-sessionid": "y9mOadU00X19e3psalIpu5beRwUs", - "eagleeye-traceid": "ef11d5e6175232609247810112630c", - "ewt-contentstyle": "CamelCase", - "ewt-requestsource": "web", - "priority": "u=1, i", - "referer": "https://web.ewt360.com/mystudy/", - "referurl": "https://web.ewt360.com/mystudy/#/report?bizCode=205&homeworkId=10389626&paperId=1969526514235999045&platform=1&reportId=2040881795217891454", - # "referurl": "https://web.ewt360.com/mystudy/#/report?bizCode=205&homeworkId=10389626&paperId=1969526514235999045&platform=1&reportId=2040881795217891454", - "sec-ch-ua": "\"Not)A;Brand\";v=\"8\", \"Chromium\";v=\"138\", \"Microsoft Edge\";v=\"138\"", - "sec-ch-ua-mobile": "?0", - "sec-ch-ua-platform": "\"Windows\"", - "sec-fetch-dest": "empty", - "sec-fetch-mode": "cors", - "sec-fetch-site": "same-origin", - "token": token, - "x-requested-with": "XMLHttpRequest" - } - - try: - # 发送 GET 请求 - response = session.get( - url, - headers=headers, - timeout=15 - ) - - - # 尝试解析 JSON - try: - # open('response.json','w',encoding='utf-8').write(response.text) - json2 = json.loads(response.text)['data']['groups'][0]['questions'][0]['rightAnswer'] - return json2 - - - except ValueError: - pass - return 'json解析失败' - - except requests.exceptions.RequestException as e: - if hasattr(e, 'response') and e.response is not None: - return f'请求失败,错误响应{e.response.text}' - else: - return f"请求失败: {str(e)}" - -if __name__ == '__main__': - print(get_answer(paperId,reportId,homeworkId,userId,token)) \ No newline at end of file diff --git a/rubbish/tmp.py b/rubbish/tmp.py deleted file mode 100644 index 5baa67a..0000000 --- a/rubbish/tmp.py +++ /dev/null @@ -1,10 +0,0 @@ -paperId = '1996206103754744180' -reportId = '2040663610879271448' -questionId = '1244399525157902124' -smallQuestionId = '3244399525157902127' -homeworkId = '10389626' - -# 请求 URL -url = f"https://web.ewt360.com/api/answerprod/app/answer/proofread/question?paperId={paperId}&reportId={reportId}&platform=1&questionId={questionId}&smallQuestionId={smallQuestionId}&bizCode=205&homeworkId={homeworkId}" - - diff --git a/src/get_corret_answer.py b/src/get_corret_answer.py new file mode 100644 index 0000000..e319a94 --- /dev/null +++ b/src/get_corret_answer.py @@ -0,0 +1,100 @@ +import json + +import requests +from urllib.parse import urlparse + + + + +def get_answer(paperId:str, reportId:str, homeworkId:str, userId:str, token:str): + """获取指定试卷的单选题和多选题正确答案 + + 通过调用EWT360 API获取指定用户的作业报告,解析并返回题目ID与正确答案的映射 + + 参数除了token都包含在试卷页面的url里了 + + 很多地方写的很不规范,一部分是不得不和 ewt 统一,还其它的看到就改一下吧qwq + + :param paperId: 试卷唯一标识符 + :param reportId: 报告唯一标识符(也不知道这个报告指的是什么) + :param homeworkId: 作业唯一标识符 + :param userId: 用户唯一标识 + :param token: 用户认证令牌 + + :returns: + - 成功时返回格式为 {题目ID: 正确答案} 的字典 + - 没有找到答案时返回'未找到正确答案'字符串 + - 发生错误时返回错误描述字符串 + + :raises ValueError: 当JSON解析失败时返回错误字符串 + :raises requests.exceptions.RequestException: 网络请求失败时返回错误字符串 + """ + # 创建会话对象 + session = requests.Session() + + # 设置 User-Agent + session.headers.update({ + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36 Edg/138.0.0.0" + }) + + # 添加 token cookie + session.cookies.set(name="token",value=token,domain=".ewt360.com",path="/") + + # 请求 URL + url = f"https://web.ewt360.com/api/answerprod/web/answer/webreport/questionGroup?paperId={paperId}&reportId={reportId}&platform=1&bizCode=205&homeworkId={homeworkId}&userId={userId}" + + # 请求头 + headers = { + "authority": "web.ewt360.com", + "method": "GET", + "path": urlparse(url).path + "?" + urlparse(url).query, + "scheme": "https", + "token": token, + } + + try: + # 发送 GET 请求 + response = session.get( + url, + headers=headers, + timeout=15 + ) + + # 尝试解析 JSON + try: + data = json.loads(response.text)['data'] + answer_dict = {} # 改为字典存储 + + # 遍历所有题目组 + for group in data.get('groups', []): + # 过滤条件:只处理单选题和多选题 + if group.get('groupName', '') in ['单选题', '多选题']: + # 遍历组中的每个题目 + for question in group.get('questions', []): + # 同时获取题目ID和答案 + q_id = question.get('id') + answer = question.get('rightAnswer') + if q_id and answer: + answer_dict[q_id] = answer + + return answer_dict if answer_dict else '未找到正确答案' + + except ValueError: + return 'json解析失败' + + except requests.exceptions.RequestException as e: + if hasattr(e, 'response') and e.response is not None: + return f'请求失败,错误响应{e.response.text}' + else: + return f"请求失败: {str(e)}" + + + + +if __name__ == '__main__': + paperId='1969526514235999045' + reportId='2040881795217891454' + homeworkId='10389626' + userId='151028179' + token = '151028179-1-89663793316a648f' + print(get_answer(paperId,reportId,homeworkId,userId,token)) \ No newline at end of file From 9ab238c52c1f1c948ab9a8d58239599547daff41 Mon Sep 17 00:00:00 2001 From: DingerBtn Date: Sun, 13 Jul 2025 09:14:22 +0800 Subject: [PATCH 04/31] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=9E=83=E5=9C=BE?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- response.json | 1 - src/get_corret_answer.py | 16 +++++++--------- tmp.json | 1 - 3 files changed, 7 insertions(+), 11 deletions(-) delete mode 100644 response.json delete mode 100644 tmp.json diff --git a/response.json b/response.json deleted file mode 100644 index a8265b7..0000000 --- a/response.json +++ /dev/null @@ -1 +0,0 @@ -{"success":true,"code":"200","msg":"操作成功","data":{"subjectId":2,"subjectName":"数学","paperId":"1969526514235999045","reportId":"2040881795217891454","title":"B2025-2026学年高一数学必修二综合测试卷1","useTimeStr":"1分42秒","totalTimeStr":"120分钟","myTotalScore":100.0,"totalScore":150.0,"lessons":[{"courseId":"16185","lessonId":"75001","playTime":"11分56秒","img":"https://static.ewt360.com/upload/ewt/kecheng/2018/12/11/20181211162732140.png","bgImg":"https://static.ewt360.com/upload/ewt/kecheng/2018/12/27/20181227152923200.png","videoTitle":"B利用数形结合思想解平面向量问题专题测试卷-T6","color":"#418282","teacherImg":"http://file.ewt360.com/file/1316391138168431278","url":"/site-study/#/playVideo?courseId=16185&lessonId=75001&from=report_recommend","subjectId":0,"playRatio":"0.0","questionId":"1195892489857859996"},{"courseId":"14801","lessonId":"67061","playTime":"8分16秒","img":"https://static.ewt360.com/upload/ewt/kecheng/2018/12/11/20181211162732140.png","bgImg":"https://static.ewt360.com/upload/ewt/kecheng/2018/12/27/20181227152923200.png","videoTitle":"拔尖1+T8","color":"#418282","teacherImg":"http://file.ewt360.com/file/879911599202205696","url":"/site-study/#/playVideo?courseId=14801&lessonId=67061&from=report_recommend","subjectId":0,"playRatio":"0.0","questionId":"1178807249539383663"},{"courseId":"14801","lessonId":"67063","playTime":"8分57秒","img":"https://static.ewt360.com/upload/ewt/kecheng/2018/12/11/20181211162732140.png","bgImg":"https://static.ewt360.com/upload/ewt/kecheng/2018/12/27/20181227152923200.png","videoTitle":"拔尖1+T12","color":"#418282","teacherImg":"http://file.ewt360.com/file/879911599202205696","url":"/site-study/#/playVideo?courseId=14801&lessonId=67063&from=report_recommend","subjectId":0,"playRatio":"0.0","questionId":"1176211356273243512"},{"courseId":"14801","lessonId":"67064","playTime":"4分4秒","img":"https://static.ewt360.com/upload/ewt/kecheng/2018/12/11/20181211162732140.png","bgImg":"https://static.ewt360.com/upload/ewt/kecheng/2018/12/27/20181227152923200.png","videoTitle":"拔尖1+T15","color":"#418282","teacherImg":"http://file.ewt360.com/file/879911599202205696","url":"/site-study/#/playVideo?courseId=14801&lessonId=67064&from=report_recommend","subjectId":0,"playRatio":"0.0","questionId":"1176211356273243476"},{"courseId":"14801","lessonId":"67065","playTime":"9分56秒","img":"https://static.ewt360.com/upload/ewt/kecheng/2018/12/11/20181211162732140.png","bgImg":"https://static.ewt360.com/upload/ewt/kecheng/2018/12/27/20181227152923200.png","videoTitle":"拔尖1+T16","color":"#418282","teacherImg":"http://file.ewt360.com/file/879911599202205696","url":"/site-study/#/playVideo?courseId=14801&lessonId=67065&from=report_recommend","subjectId":0,"playRatio":"0.0","questionId":"1176211251046528305"},{"courseId":"14801","lessonId":"67066","playTime":"9分42秒","img":"https://static.ewt360.com/upload/ewt/kecheng/2018/12/11/20181211162732140.png","bgImg":"https://static.ewt360.com/upload/ewt/kecheng/2018/12/27/20181227152923200.png","videoTitle":"拔尖1+T22","color":"#418282","teacherImg":"http://file.ewt360.com/file/879911599202205696","url":"/site-study/#/playVideo?courseId=14801&lessonId=67066&from=report_recommend","subjectId":0,"playRatio":"0.0","questionId":"1176211375600604331"}],"rightKnowledges":[{"id":"311075","title":"离散型随机变量的方差与标准差","rate":100.0},{"id":"317034","title":"平面向量","rate":100.0},{"id":"310284","title":"三角形的面积公式","rate":100.0},{"id":"310311","title":"极化恒等式在平面向量问题中的应用","rate":100.0},{"id":"310842","title":"利用正、余弦定理求解边长面积周长取值范围问题","rate":100.0},{"id":"310845","title":"利用正、余弦定理解决高度测量问题","rate":100.0},{"id":"310938","title":"求二面角","rate":100.0},{"id":"310583","title":"计算古典概型问题的概率","rate":75.0},{"id":"310457","title":"立体几何中的动态问题","rate":72.7},{"id":"315621","title":"事件的相互独立性","rate":68.4},{"id":"311092","title":"频率分布直方图的相关计算","rate":0.0},{"id":"310450","title":"面面垂直的判定","rate":0.0},{"id":"310421","title":"多面体的结构特征","rate":0.0},{"id":"311104","title":"互斥事件与对立事件关系的辨析","rate":0.0},{"id":"310313","title":"向量的模的坐标表示及坐标计算向量的模","rate":0.0},{"id":"310854","title":"利用平面向量的数量积求夹角","rate":0.0},{"id":"310306","title":"平面向量运算坐标表示的相关计算","rate":0.0},{"id":"310834","title":"应用正弦定理解三角形","rate":0.0},{"id":"310615","title":"共轭复数","rate":0.0}],"rightRate":50.0,"allRight":false,"createPaperPara":null,"assignPointsFlag":true,"groups":[{"index":1,"groupId":61657619,"groupName":"单选题","groupInfo":"本题共8小题,共40分","groupDeclare":"","totalQuestions":8,"totalScore":40.0,"myTotalScore":5.0,"questions":[{"id":"1176211375600604287","scoreCriterion":"","cate":1,"cateName":"单选","subjectQuestionType":1020101,"subjectQuestionTypeName":"单选题","questionContent":"
复数满足,则复数的共轭复数(  )
","options":[{"index":0,"choice":"A","option":"
"},{"index":1,"choice":"B","option":""},{"index":2,"choice":"C","option":""},{"index":3,"choice":"D","option":""}],"myAnswer":["A"],"myAnswers":["A"],"attachmentImages":[],"rightStatus":3,"rightAnswer":["C"],"isRecordCorrected":1,"recordCorrectUserType":5,"degreeRange":8.0,"degreeRangeDesc":"易","questionType":0,"questionSource":1,"source":1,"audioUrl":"","questionSort":1,"analyse":"
∵,∴,∴.
故选C.
","method":null,"childQuestions":[],"knowledges":[{"id":"310615","title":"共轭复数"}],"revision":true,"score":5.0,"myScore":0.0,"scoreList":[0.0,1.0,2.0,3.0,4.0,5.0],"lessons":[],"collected":false,"subjectId":2,"questionNo":1,"questionNoShow":"1","subjective":false,"groupSort":1,"groupName":"单选题","groupInfo":"本题共8小题,共40分","groupDeclare":""},{"id":"1178807127132792160","scoreCriterion":"","cate":1,"cateName":"单选","subjectQuestionType":1020101,"subjectQuestionTypeName":"单选题","questionContent":"
在2025年某地销售的汽车中随机选取1000台,对销售价格与销售数量进行统计,这1000台车辆的销售价格都不小于5万元,但小于30万元,将销售价格分为五组:,,,,(单位:万元).统计后制成的频率分布直方图如图所示.在选取的1000台汽车中,销售价格在内的车辆台数为(  )
\n
","options":[{"index":0,"choice":"A","option":"
800
"},{"index":1,"choice":"B","option":"600"},{"index":2,"choice":"C","option":"700"},{"index":3,"choice":"D","option":"750"}],"myAnswer":["B"],"myAnswers":["B"],"attachmentImages":[],"rightStatus":3,"rightAnswer":["C"],"isRecordCorrected":1,"recordCorrectUserType":5,"degreeRange":7.0,"degreeRangeDesc":"易","questionType":0,"questionSource":1,"source":1,"audioUrl":"","questionSort":2,"analyse":"
由图可得:,∴,
∴销售价格在内的频率为,
∴销售价格在内的车辆台数为.
故选C.
","method":null,"childQuestions":[],"knowledges":[{"id":"311092","title":"频率分布直方图的相关计算"}],"revision":true,"score":5.0,"myScore":0.0,"scoreList":[0.0,1.0,2.0,3.0,4.0,5.0],"lessons":[],"collected":false,"subjectId":2,"questionNo":2,"questionNoShow":"2","subjective":false,"groupSort":1,"groupName":"单选题","groupInfo":"本题共8小题,共40分","groupDeclare":""},{"id":"1176211356273243473","scoreCriterion":"","cate":1,"cateName":"单选","subjectQuestionType":1020101,"subjectQuestionTypeName":"单选题","questionContent":"
甲、乙两位同学暑假计划从吉林省去河北省旅游,他们所搭乘动车的“”座位车厢,如图所示,若这两位同学买到了同一排的座位,则他们的座位正好相邻的概率为(  )
\n
","options":[{"index":0,"choice":"A","option":"
"},{"index":1,"choice":"B","option":""},{"index":2,"choice":"C","option":""},{"index":3,"choice":"D","option":""}],"myAnswer":["C"],"myAnswers":["C"],"attachmentImages":[],"rightStatus":3,"rightAnswer":["D"],"isRecordCorrected":1,"recordCorrectUserType":5,"degreeRange":7.0,"degreeRangeDesc":"易","questionType":0,"questionSource":1,"source":1,"audioUrl":"","questionSort":3,"analyse":"
设事件为“他们的座位正好相邻”,
甲乙二人买到同一排,,,,,5个座位中的两个形成的样本空间为
\n
,共包含10个样本点,
其中事件,包含3个样本点,则有,
所以他们的座位正好相邻的概率为.
故选D.
","method":null,"childQuestions":[],"knowledges":[{"id":"310583","title":"计算古典概型问题的概率"}],"revision":true,"score":5.0,"myScore":0.0,"scoreList":[0.0,1.0,2.0,3.0,4.0,5.0],"lessons":[],"collected":false,"subjectId":2,"questionNo":3,"questionNoShow":"3","subjective":false,"groupSort":1,"groupName":"单选题","groupInfo":"本题共8小题,共40分","groupDeclare":""},{"id":"1176211251046528302","scoreCriterion":"","cate":1,"cateName":"单选","subjectQuestionType":1020101,"subjectQuestionTypeName":"单选题","questionContent":"
已知向量,,若,则(  )
","options":[{"index":0,"choice":"A","option":"
"},{"index":1,"choice":"B","option":"1"},{"index":2,"choice":"C","option":""},{"index":3,"choice":"D","option":""}],"myAnswer":["B"],"myAnswers":["B"],"attachmentImages":[],"rightStatus":3,"rightAnswer":["D"],"isRecordCorrected":1,"recordCorrectUserType":5,"degreeRange":7.0,"degreeRangeDesc":"易","questionType":0,"questionSource":1,"source":1,"audioUrl":"","questionSort":4,"analyse":"
由,得,所以,
又,,则,所以.
故选D.
","method":null,"childQuestions":[],"knowledges":[{"id":"310306","title":"平面向量运算坐标表示的相关计算"}],"revision":true,"score":5.0,"myScore":0.0,"scoreList":[0.0,1.0,2.0,3.0,4.0,5.0],"lessons":[],"collected":false,"subjectId":2,"questionNo":4,"questionNoShow":"4","subjective":false,"groupSort":1,"groupName":"单选题","groupInfo":"本题共8小题,共40分","groupDeclare":""},{"id":"1176211375600604288","scoreCriterion":"","cate":1,"cateName":"单选","subjectQuestionType":1020101,"subjectQuestionTypeName":"单选题","questionContent":"
设,是两个不同的平面,,是两条不同的直线,下列说法正确的是(  )
","options":[{"index":0,"choice":"A","option":"
若,,,则
"},{"index":1,"choice":"B","option":"若,,,则"},{"index":2,"choice":"C","option":"若,,,则"},{"index":3,"choice":"D","option":"若,,,则"}],"myAnswer":["C"],"myAnswers":["C"],"attachmentImages":[],"rightStatus":3,"rightAnswer":["A"],"isRecordCorrected":1,"recordCorrectUserType":5,"degreeRange":6.0,"degreeRangeDesc":"易","questionType":0,"questionSource":1,"source":1,"audioUrl":"","questionSort":5,"analyse":"
对于A,∵,,又,∴,故A选项正确;
对于B,∵,,,∴可绕任意旋转,∴与不一定垂直,故B选项错误;
对于C,∵,,,∴,故C选项错误;
对于D,∵,,,∴可绕任意旋转,∴与不一定垂直,故D选项错误.
故选A.
","method":null,"childQuestions":[],"knowledges":[{"id":"310450","title":"面面垂直的判定"}],"revision":true,"score":5.0,"myScore":0.0,"scoreList":[0.0,1.0,2.0,3.0,4.0,5.0],"lessons":[],"collected":false,"subjectId":2,"questionNo":5,"questionNoShow":"5","subjective":false,"groupSort":1,"groupName":"单选题","groupInfo":"本题共8小题,共40分","groupDeclare":""},{"id":"1176211253194020070","scoreCriterion":"","cate":1,"cateName":"单选","subjectQuestionType":1020101,"subjectQuestionTypeName":"单选题","questionContent":"
中国古代四大名楼鹳雀楼,位于山西省运城市永济市蒲州镇,因唐代诗人王之涣的诗作《登鹳雀楼》而流芳后世.如图,某同学为测量鹳雀楼的高度,在鹳雀楼的正东方向找到一座建筑物,高约为,在地面上点处(,,三点共线)测得建筑物顶部,鹳雀楼顶部的仰角分别为和,在处测得楼顶部的仰角为,则鹳雀楼的高度约为(  )
\n
","options":[{"index":0,"choice":"A","option":"
"},{"index":1,"choice":"B","option":""},{"index":2,"choice":"C","option":""},{"index":3,"choice":"D","option":""}],"myAnswer":["B"],"myAnswers":["B"],"attachmentImages":[],"rightStatus":1,"rightAnswer":["B"],"isRecordCorrected":1,"recordCorrectUserType":5,"degreeRange":6.0,"degreeRangeDesc":"易","questionType":0,"questionSource":1,"source":1,"audioUrl":"","questionSort":6,"analyse":"
由题意,在中,,
在中,,,
∴,由正弦定理,得,
∴在中,.
故选:B.
","method":null,"childQuestions":[],"knowledges":[{"id":"310845","title":"利用正、余弦定理解决高度测量问题"}],"revision":true,"score":5.0,"myScore":5.0,"scoreList":[0.0,1.0,2.0,3.0,4.0,5.0],"lessons":[],"collected":false,"subjectId":2,"questionNo":6,"questionNoShow":"6","subjective":false,"groupSort":1,"groupName":"单选题","groupInfo":"本题共8小题,共40分","groupDeclare":""},{"id":"1195892489857859996","scoreCriterion":"","cate":1,"cateName":"单选","subjectQuestionType":1020101,"subjectQuestionTypeName":"单选题","questionContent":"
在平面内,定点,,,满足,,动点,满足,,则的最大值是(  )
","options":[{"index":0,"choice":"A","option":"
"},{"index":1,"choice":"B","option":""},{"index":2,"choice":"C","option":""},{"index":3,"choice":"D","option":""}],"myAnswer":["C"],"myAnswers":["C"],"attachmentImages":[],"rightStatus":3,"rightAnswer":["B"],"isRecordCorrected":1,"recordCorrectUserType":5,"degreeRange":5.0,"degreeRangeDesc":"中","questionType":0,"questionSource":1,"source":1,"audioUrl":"","questionSort":7,"analyse":"
法一:由,可得为的外心,
又,可得,,
即,
即有,,可得为的垂心,
则为的中心,即为正三角形,
由,即有,
解得,所以的边长为,
以为坐标原点,所在直线为轴建立直角坐标系,
可得,,,
由,可设,
由,可得为的中点,即有,
则
,
当,即时,取得最大值.
\n
\n
法二:如图,根据已知,有,
因此有,,全等,
进而得到为正三角形,计算可得,
\n
\n
根据题意在以为圆心,1为半径的圆上运动,
因此的中点在以的中点为圆心、为半径的圆上运动,
因此的最大值为.
故选:B.
","method":null,"childQuestions":[],"knowledges":[{"id":"310313","title":"向量的模的坐标表示及坐标计算向量的模"}],"revision":true,"score":5.0,"myScore":0.0,"scoreList":[0.0,1.0,2.0,3.0,4.0,5.0],"lessons":[{"courseId":"16185","lessonId":"75001","playTime":"11分56秒","img":"https://static.ewt360.com/upload/ewt/kecheng/2018/12/11/20181211162732140.png","bgImg":"https://static.ewt360.com/upload/ewt/kecheng/2018/12/27/20181227152923200.png","videoTitle":"B利用数形结合思想解平面向量问题专题测试卷-T6","color":"#418282","teacherImg":"http://file.ewt360.com/file/1316391138168431278","url":"/site-study/#/playVideo?courseId=16185&lessonId=75001&from=report_recommend","subjectId":0,"playRatio":"0.0","questionId":"1195892489857859996"}],"collected":false,"subjectId":2,"questionNo":7,"questionNoShow":"7","subjective":false,"groupSort":1,"groupName":"单选题","groupInfo":"本题共8小题,共40分","groupDeclare":""},{"id":"1178807249539383663","scoreCriterion":"","cate":1,"cateName":"单选","subjectQuestionType":1020101,"subjectQuestionTypeName":"单选题","questionContent":"
《九章算术》是我国古代著名的数学著作,书中记载有几何体“刍甍”.现有一个刍甍如图所示,底面为正方形,平面,四边形,为两个全等的等腰梯形,,且,则此刍甍的外接球的表面积为(  )
\n
","options":[{"index":0,"choice":"A","option":"
"},{"index":1,"choice":"B","option":""},{"index":2,"choice":"C","option":""},{"index":3,"choice":"D","option":""}],"myAnswer":["B"],"myAnswers":["B"],"attachmentImages":[],"rightStatus":3,"rightAnswer":["C"],"isRecordCorrected":1,"recordCorrectUserType":5,"degreeRange":5.0,"degreeRangeDesc":"中","questionType":0,"questionSource":1,"source":1,"audioUrl":"","questionSort":8,"analyse":"
如图所示,取,中点,,正方形中心,中点,连接,,,,
根据题意可得平面,,点是的中点,,
在等腰中,,,同理,
则等腰梯形的高为,
根据几何体的结构特征可知,刍甍的外接球的球心在直线上,连接,,,
因为正方形的外接圆的半径,则有,
而,,,
故,故点在线段的延长线上,
即有,则,解得,
则刍甍的外接球的半径为,
则刍甍的外接球的表面积为.
故选C.
\n
","method":null,"childQuestions":[],"knowledges":[{"id":"310421","title":"多面体的结构特征"}],"revision":true,"score":5.0,"myScore":0.0,"scoreList":[0.0,1.0,2.0,3.0,4.0,5.0],"lessons":[{"courseId":"14801","lessonId":"67061","playTime":"8分16秒","img":"https://static.ewt360.com/upload/ewt/kecheng/2018/12/11/20181211162732140.png","bgImg":"https://static.ewt360.com/upload/ewt/kecheng/2018/12/27/20181227152923200.png","videoTitle":"拔尖1+T8","color":"#418282","teacherImg":"http://file.ewt360.com/file/879911599202205696","url":"/site-study/#/playVideo?courseId=14801&lessonId=67061&from=report_recommend","subjectId":0,"playRatio":"0.0","questionId":"1178807249539383663"}],"collected":false,"subjectId":2,"questionNo":8,"questionNoShow":"8","subjective":false,"groupSort":1,"groupName":"单选题","groupInfo":"本题共8小题,共40分","groupDeclare":""}],"rightQuestionsCount":0,"rightRate":0.0},{"index":2,"groupId":61657620,"groupName":"多选题","groupInfo":"本题共3小题,共18分","groupDeclare":"","totalQuestions":3,"totalScore":18.0,"myTotalScore":3.0,"questions":[{"id":"1182074793012652102","scoreCriterion":"","cate":2,"cateName":"多选","subjectQuestionType":1020201,"subjectQuestionTypeName":"多选题","questionContent":"
下列说法中正确的是(  )
","options":[{"index":0,"choice":"A","option":"
三点确定一个平面
"},{"index":1,"choice":"B","option":"
在中,角,,所对应的边分别为,,,若,则为等腰三角形
"},{"index":2,"choice":"C","option":"已知,是非零向量,与所成的角为锐角的充要条件是"},{"index":3,"choice":"D","option":"若满足条件,,的有两个,则实数的取值范围是"}],"myAnswer":["A","C"],"myAnswers":["A","C"],"attachmentImages":[],"rightStatus":3,"rightAnswer":["B","D"],"isRecordCorrected":1,"recordCorrectUserType":5,"degreeRange":6.0,"degreeRangeDesc":"易","questionType":0,"questionSource":1,"source":1,"audioUrl":"","questionSort":9,"analyse":"
A:不共线的三点确定一个平面,故A错;
B:在中,若,则,
\n
所以,所以为等腰三角形,故B正确;
C:与所成的角为锐角的充要条件是且排除与同向共线,故C错;
D:由正弦定理,可得,由题意得:当时,满足条件的有两个,所以,解得,故D正确.
故选:BD.
","method":null,"childQuestions":[],"knowledges":[{"id":"310834","title":"应用正弦定理解三角形"},{"id":"310854","title":"利用平面向量的数量积求夹角"}],"revision":true,"score":6.0,"myScore":0.0,"scoreList":[0.0,1.0,2.0,3.0,4.0,5.0,6.0],"lessons":[],"collected":false,"subjectId":2,"questionNo":9,"questionNoShow":"9","subjective":false,"groupSort":2,"groupName":"多选题","groupInfo":"本题共3小题,共18分","groupDeclare":""},{"id":"1176211253194020071","scoreCriterion":"","cate":2,"cateName":"多选","subjectQuestionType":1020201,"subjectQuestionTypeName":"多选题","questionContent":"
已知事件与事件为互斥事件,是事件的对立事件,是事件的对立事件,若,,则(  )
","options":[{"index":0,"choice":"A","option":"
"},{"index":1,"choice":"B","option":""},{"index":2,"choice":"C","option":""},{"index":3,"choice":"D","option":"事件与事件不独立"}],"myAnswer":["B","C"],"myAnswers":["B","C"],"attachmentImages":[],"rightStatus":3,"rightAnswer":["A","B","D"],"isRecordCorrected":1,"recordCorrectUserType":5,"degreeRange":6.0,"degreeRangeDesc":"易","questionType":0,"questionSource":1,"source":1,"audioUrl":"","questionSort":10,"analyse":"
对于A,,故A正确;
对于B,∵事件与事件为互斥事件,,,∴,故B正确;
对于C,,故C错误;
对于D,,,,∴事件与事件不独立,故D正确.
故选ABD.
","method":null,"childQuestions":[],"knowledges":[{"id":"311104","title":"互斥事件与对立事件关系的辨析"},{"id":"315621","title":"事件的相互独立性"}],"revision":true,"score":6.0,"myScore":0.0,"scoreList":[0.0,1.0,2.0,3.0,4.0,5.0,6.0],"lessons":[],"collected":false,"subjectId":2,"questionNo":10,"questionNoShow":"10","subjective":false,"groupSort":2,"groupName":"多选题","groupInfo":"本题共3小题,共18分","groupDeclare":""},{"id":"1176211356273243512","scoreCriterion":"","cate":2,"cateName":"多选","subjectQuestionType":1020201,"subjectQuestionTypeName":"多选题","questionContent":"
如图甲,在矩形中,,为的中点.将沿直线翻折至的位置,为的中点,如图乙所示,则(  )
\n
","options":[{"index":0,"choice":"A","option":"
翻折过程中,四棱锥必存在外接球,不一定存在内切球
"},{"index":1,"choice":"B","option":"翻折过程中,不存在任何位置的,使得"},{"index":2,"choice":"C","option":"当二面角为时,点到平面的距离为"},{"index":3,"choice":"D","option":"
当四棱锥的体积最大时,以为直径的球面被平面截得的交线长为
"}],"myAnswer":["B","C"],"myAnswers":["B","C"],"attachmentImages":[],"rightStatus":2,"rightAnswer":["B","C","D"],"isRecordCorrected":1,"recordCorrectUserType":5,"degreeRange":4.0,"degreeRangeDesc":"中","questionType":0,"questionSource":1,"source":1,"audioUrl":"","questionSort":11,"analyse":"
对于A,由已知,直角三角形存在以为直径的唯一外接圆,
∵,∴点不在该圆上,所以四边形不存在外接圆,因此四棱锥不存在外接球,故A错误;
对于B,由已知,,,∴,∴,即,假设在翻折过程中,存在位置,如图所示,使得,又∵,平面,平面,∴平面,
又∵平面,∴,
∵在翻折至的位置的过程中,,
∴显然不成立,故假设错误,∴翻折过程中,不存在任何位置的,使得,故B正确;
\n
\n
对于C,取中点,由已知,,∴,∴,
∴是二面角的平面角,
当二面角为时,二面角为,即,
又∵,∴到平面的距离为,
设点到平面的距离为,∵,
∴,∴,
∴,即点到平面的距离为,
∵点为中点,∴点到平面的距离是点到平面距离的,
∴点到平面的距离为,故C正确;
对于D,四棱锥底面梯形的面积为定值,
∴当四棱锥的体积最大时,平面平面,
∵平面平面,平面,
由B选项有,∴平面,
∵平面,∴,
∴,
又∵平面,∴点到平面的距离,
∵点为中点,
∴以为直径的球的半径,球心到平面的距离,
易知,球面被平面截得的交线为圆,其半径,
∴该交线周长为,故D正确.
故选BCD.
","method":null,"childQuestions":[],"knowledges":[{"id":"310457","title":"立体几何中的动态问题"}],"revision":true,"score":6.0,"myScore":3.0,"scoreList":[0.0,1.0,2.0,3.0,4.0,5.0,6.0],"lessons":[{"courseId":"14801","lessonId":"67063","playTime":"8分57秒","img":"https://static.ewt360.com/upload/ewt/kecheng/2018/12/11/20181211162732140.png","bgImg":"https://static.ewt360.com/upload/ewt/kecheng/2018/12/27/20181227152923200.png","videoTitle":"拔尖1+T12","color":"#418282","teacherImg":"http://file.ewt360.com/file/879911599202205696","url":"/site-study/#/playVideo?courseId=14801&lessonId=67063&from=report_recommend","subjectId":0,"playRatio":"0.0","questionId":"1176211356273243512"}],"collected":false,"subjectId":2,"questionNo":11,"questionNoShow":"11","subjective":false,"groupSort":2,"groupName":"多选题","groupInfo":"本题共3小题,共18分","groupDeclare":""}],"rightQuestionsCount":0,"rightRate":0.0},{"index":3,"groupId":61657621,"groupName":"填空题","groupInfo":"本题共3小题,共15分","groupDeclare":"","totalQuestions":3,"totalScore":15.0,"myTotalScore":15.0,"questions":[{"id":"1176211253194020072","scoreCriterion":"","cate":30,"cateName":"填空","subjectQuestionType":1023001,"subjectQuestionTypeName":"填空题","questionContent":"
已知一组样本数据,,,,且,平均数,则该组数据的方差为1.
","options":[],"myAnswer":["https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/f7500c8b-f535-4efb-b864-f00bc8c3b213.jpg"],"myAnswers":null,"attachmentImages":["https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/f7500c8b-f535-4efb-b864-f00bc8c3b213.jpg"],"rightStatus":1,"rightAnswer":["
58.5
"],"isRecordCorrected":1,"recordCorrectUserType":1,"degreeRange":6.0,"degreeRangeDesc":"易","questionType":0,"questionSource":1,"source":1,"audioUrl":"","questionSort":12,"analyse":"
由题意可得,该组数据的方差为

.
","method":null,"childQuestions":[],"knowledges":[{"id":"311075","title":"离散型随机变量的方差与标准差"}],"revision":true,"score":5.0,"myScore":5.0,"scoreList":[0.0,1.0,2.0,3.0,4.0,5.0],"lessons":[],"collected":false,"subjectId":2,"questionNo":12,"questionNoShow":"12","subjective":true,"groupSort":3,"groupName":"填空题","groupInfo":"本题共3小题,共15分","groupDeclare":""},{"id":"1176211356273243476","scoreCriterion":"","cate":30,"cateName":"填空","subjectQuestionType":1023001,"subjectQuestionTypeName":"填空题","questionContent":"
已知在中,角,,所对的边分别为,,,满足,且,则的取值范围为1.
","options":[],"myAnswer":["https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/d3b09270-b861-4f8c-ac99-743dbdf0d47c.jpg"],"myAnswers":null,"attachmentImages":["https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/d3b09270-b861-4f8c-ac99-743dbdf0d47c.jpg"],"rightStatus":1,"rightAnswer":["
"],"isRecordCorrected":1,"recordCorrectUserType":1,"degreeRange":6.0,"degreeRangeDesc":"易","questionType":0,"questionSource":1,"source":1,"audioUrl":"","questionSort":13,"analyse":"
因为,由正弦定理得,
即,而,∴,故,又,∴,
则,同理,
故,又,
\n
∴,故,则.
","method":null,"childQuestions":[],"knowledges":[{"id":"310842","title":"利用正、余弦定理求解边长面积周长取值范围问题"}],"revision":true,"score":5.0,"myScore":5.0,"scoreList":[0.0,1.0,2.0,3.0,4.0,5.0],"lessons":[{"courseId":"14801","lessonId":"67064","playTime":"4分4秒","img":"https://static.ewt360.com/upload/ewt/kecheng/2018/12/11/20181211162732140.png","bgImg":"https://static.ewt360.com/upload/ewt/kecheng/2018/12/27/20181227152923200.png","videoTitle":"拔尖1+T15","color":"#418282","teacherImg":"http://file.ewt360.com/file/879911599202205696","url":"/site-study/#/playVideo?courseId=14801&lessonId=67064&from=report_recommend","subjectId":0,"playRatio":"0.0","questionId":"1176211356273243476"}],"collected":false,"subjectId":2,"questionNo":13,"questionNoShow":"13","subjective":true,"groupSort":3,"groupName":"填空题","groupInfo":"本题共3小题,共15分","groupDeclare":""},{"id":"1176211251046528305","scoreCriterion":"","cate":30,"cateName":"填空","subjectQuestionType":1023001,"subjectQuestionTypeName":"填空题","questionContent":"
在长方体中,,,点为棱上靠近点的三等分点,点是长方形内一动点(含边界),且直线,与平面所成角的大小相等,则线段长度的取值范围为1.
","options":[],"myAnswer":["https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/e9883a80-4b0d-4775-a606-64ab5b5b5eaf.jpg"],"myAnswers":null,"attachmentImages":["https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/e9883a80-4b0d-4775-a606-64ab5b5b5eaf.jpg"],"rightStatus":1,"rightAnswer":["
"],"isRecordCorrected":1,"recordCorrectUserType":1,"degreeRange":5.0,"degreeRangeDesc":"中","questionType":0,"questionSource":1,"source":1,"audioUrl":"","questionSort":14,"analyse":"
如图1所示,连接,作交于,连接.
因为平面,所以为与平面所成的角.
因为平面,所以为与平面所成的角.
因为,与平面所成角的大小相等,所以,
则,又因为,
所以,则点在的中垂线上,即点在线段上运动,如图2,
\n
\n
因为,,为棱上靠近的三等分点,
所以,,则,因为,所以,
又,可得,,,,
当点在点处时,线段的长度取到最大值,最大值为,
当点在点处,线段的长度取到最小值,最小值为,
所以线段的长度的取值范围为.
","method":null,"childQuestions":[],"knowledges":[{"id":"310457","title":"立体几何中的动态问题"}],"revision":true,"score":5.0,"myScore":5.0,"scoreList":[0.0,1.0,2.0,3.0,4.0,5.0],"lessons":[{"courseId":"14801","lessonId":"67065","playTime":"9分56秒","img":"https://static.ewt360.com/upload/ewt/kecheng/2018/12/11/20181211162732140.png","bgImg":"https://static.ewt360.com/upload/ewt/kecheng/2018/12/27/20181227152923200.png","videoTitle":"拔尖1+T16","color":"#418282","teacherImg":"http://file.ewt360.com/file/879911599202205696","url":"/site-study/#/playVideo?courseId=14801&lessonId=67065&from=report_recommend","subjectId":0,"playRatio":"0.0","questionId":"1176211251046528305"}],"collected":false,"subjectId":2,"questionNo":14,"questionNoShow":"14","subjective":true,"groupSort":3,"groupName":"填空题","groupInfo":"本题共3小题,共15分","groupDeclare":""}],"rightQuestionsCount":1,"rightRate":0.0},{"index":4,"groupId":61657622,"groupName":"解答题","groupInfo":"本题共5小题,共77分","groupDeclare":"","totalQuestions":5,"totalScore":77.0,"myTotalScore":77.0,"questions":[{"id":"1176211251046528343","scoreCriterion":"","cate":5,"cateName":"解答","subjectQuestionType":1020501,"subjectQuestionTypeName":"解答题","questionContent":"
如图:用,,,四类不同的元件连接成系统,当元件正常工作且元件,都正常工作,或当元件正常工作且元件正常工作时,系统正常工作.已知元件,,,是否正常工作互相独立,且正常工作的概率依次为,,,.
\n
\n
(1)求元件不正常工作的概率;
(2)求元件,,都正常工作的概率;
(3)求系统正常工作的概率.
","options":[],"myAnswer":["https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/5f503809-079e-44d8-b97f-dff9456e27c3.jpg"],"myAnswers":null,"attachmentImages":["https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/5f503809-079e-44d8-b97f-dff9456e27c3.jpg"],"rightStatus":1,"rightAnswer":["
(1);(2);(3).
"],"isRecordCorrected":1,"recordCorrectUserType":1,"degreeRange":6.0,"degreeRangeDesc":"易","questionType":0,"questionSource":1,"source":1,"audioUrl":"","questionSort":15,"analyse":"
设元件正常工作为事件,元件正常工作为事件,元件正常工作为事件,元件正常工作为事件.
(1)元件正常工作的概率,
所以它不正常工作的概率;
(2)元件,,都正常工作的概率;
(3)系统正常工作可分为,,都正常工作和,正常但,不都正常工作两种情况,
,,都正常工作的概率为,
,正常但,不都正常工作的概率为
,
所以系统正常工作的概率是.
","method":null,"childQuestions":[],"knowledges":[{"id":"315621","title":"事件的相互独立性"}],"revision":true,"score":13.0,"myScore":13.0,"scoreList":[0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0,11.0,12.0,13.0],"lessons":[],"collected":false,"subjectId":2,"questionNo":15,"questionNoShow":"15","subjective":true,"groupSort":4,"groupName":"解答题","groupInfo":"本题共5小题,共77分","groupDeclare":""},{"id":"1176211356273243514","scoreCriterion":"","cate":5,"cateName":"解答","subjectQuestionType":1020501,"subjectQuestionTypeName":"解答题","questionContent":"
某中学为了解高一年级数学文化知识竞赛的得分情况,从参赛的1000名学生中随机抽取了50名学生的成绩进行分析.经统计,这50名学生的成绩全部介于55分和95分之间,将数据按照如下方式分成八组:第一组,第二组,…,第八组,如图是按上述分组方法得到的频率分布直方图的一部分.已知第一组和第八组人数相同,第七组的人数为3人.
\n
\n
(1)求第六组的频率;若比赛成绩由高到低的前15%为优秀等级,试估计该校参赛的高一年级1000名学生的成绩中优秀等级的最低分数(精确到0.1);
(2)若从样本中成绩属于第六组和第八组的所有学生中随机抽取两名学生,记他们的成绩分别为,,设事件:,求事件的概率.
","options":[],"myAnswer":["https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/cef3bd42-e146-4cd4-92f5-4372b79ad1b6.jpg"],"myAnswers":null,"attachmentImages":["https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/cef3bd42-e146-4cd4-92f5-4372b79ad1b6.jpg"],"rightStatus":1,"rightAnswer":["
(1)0.08,81.9分;(2).
"],"isRecordCorrected":1,"recordCorrectUserType":1,"degreeRange":5.0,"degreeRangeDesc":"中","questionType":0,"questionSource":1,"source":1,"audioUrl":"","questionSort":16,"analyse":"
(1)第七组的频率为,
所以第六组的频率为;
因为第七、八两组的频率之和为0.10,第六、七、八组的频率之和为0.18,
设优秀等级的最低分数为,则,
由,解得,
故估计该校参赛的高一年级1000名学生的成绩中优秀等级的最低分数为81.9分;
(2)第六组的人数为4人,设为,,,,第八组的人数为2人,设为,,
随机抽取两名学生,则有,,,,,,,,,,,,,,,共15种情况,
事件:发生当且仅当随机抽取的两名学生不在同一组,
所以事件包含的基本事件为,,,,,,,,共8种情况,
故.
","method":null,"childQuestions":[],"knowledges":[{"id":"310583","title":"计算古典概型问题的概率"}],"revision":true,"score":15.0,"myScore":15.0,"scoreList":[0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0,11.0,12.0,13.0,14.0,15.0],"lessons":[],"collected":false,"subjectId":2,"questionNo":16,"questionNoShow":"16","subjective":true,"groupSort":4,"groupName":"解答题","groupInfo":"本题共5小题,共77分","groupDeclare":""},{"id":"1176211375600604329","scoreCriterion":"","cate":5,"cateName":"解答","subjectQuestionType":1020501,"subjectQuestionTypeName":"解答题","questionContent":"
在斜三角形中,内角,,的对边分别为,,,且满足.
(1)求角的大小;
(2)若,且上的中线长为,求斜三角形的面积.
","options":[],"myAnswer":["https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/62b47b8f-eea8-4d2a-aa20-8aba45f10c61.jpg"],"myAnswers":null,"attachmentImages":["https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/62b47b8f-eea8-4d2a-aa20-8aba45f10c61.jpg"],"rightStatus":1,"rightAnswer":["
(1);(2).
"],"isRecordCorrected":1,"recordCorrectUserType":1,"degreeRange":4.0,"degreeRangeDesc":"中","questionType":0,"questionSource":1,"source":1,"audioUrl":"","questionSort":17,"analyse":"
(1)∵,
∴由正弦定理可得,,
∴,
∵三角形为斜三角形,
∴不为直角,即,∴,
又∵,∴;
(2)方法一:
∵,
∴,
∴,
∴.
方法二:
\n
∵,,
\n
∴由余弦定理可得①,
\n
∵上的中线长为,且,
∴在中,由余弦定理可得,
在中,由余弦定理可得,
又∵,
∴,整理可得②,
∴由①②解得,
∴.
\n
","method":null,"childQuestions":[],"knowledges":[{"id":"310284","title":"三角形的面积公式"},{"id":"310311","title":"极化恒等式在平面向量问题中的应用"}],"revision":true,"score":15.0,"myScore":15.0,"scoreList":[0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0,11.0,12.0,13.0,14.0,15.0],"lessons":[],"collected":false,"subjectId":2,"questionNo":17,"questionNoShow":"17","subjective":true,"groupSort":4,"groupName":"解答题","groupInfo":"本题共5小题,共77分","groupDeclare":""},{"id":"1176211375600604331","scoreCriterion":"","cate":5,"cateName":"解答","subjectQuestionType":1020501,"subjectQuestionTypeName":"解答题","questionContent":"
如图,在正三棱柱中,为上的点,为上的点,,分别为,的中点,平面.
\n
\n
(1)证明:,,,四点共面,且平面平面;
(2)若,,求平面与平面所成锐二面角的余弦值.
","options":[],"myAnswer":["https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/fcd1b2c1-5578-4363-a76e-9bd2af46b30b.jpg"],"myAnswers":null,"attachmentImages":["https://cdn.ewt360.com/resources/mystudy/uploads/2025/7/12/fcd1b2c1-5578-4363-a76e-9bd2af46b30b.jpg"],"rightStatus":1,"rightAnswer":["
(1)证明过程见解析;(2).
"],"isRecordCorrected":1,"recordCorrectUserType":1,"degreeRange":3.0,"degreeRangeDesc":"难","questionType":0,"questionSource":1,"source":1,"audioUrl":"","questionSort":18,"analyse":"
(1)∵在正三棱柱中,,分别为,的中点,
∴,
∵为正三棱柱,∴,∴,
∴,,,四点共面;
∵为正三棱柱,∴为等边三角形,
又为的中点,∴,
在正三棱柱中,有平面平面,
而平面平面,
∴平面,
∵平面平面,平面,
∴,∴平面,
∵平面,∴平面平面.
\n
\n
(2)取的中点,过点作的垂线交于,连接,
易证平面,
又平面,∴,
∵,,∴平面,
\n
又平面,所以,
∴为平面与平面所成二面角的平面角,
∵,,∴,,
由(1)知,,
故四边形为平行四边形,
∴,∴,
由得:
,,
∴,
∴平面与平面所成锐二面角的余弦值为.
","method":null,"childQuestions":[],"knowledges":[{"id":"310938","title":"求二面角"}],"revision":true,"score":17.0,"myScore":17.0,"scoreList":[0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0,11.0,12.0,13.0,14.0,15.0,16.0,17.0],"lessons":[{"courseId":"14801","lessonId":"67066","playTime":"9分42秒","img":"https://static.ewt360.com/upload/ewt/kecheng/2018/12/11/20181211162732140.png","bgImg":"https://static.ewt360.com/upload/ewt/kecheng/2018/12/27/20181227152923200.png","videoTitle":"拔尖1+T22","color":"#418282","teacherImg":"http://file.ewt360.com/file/879911599202205696","url":"/site-study/#/playVideo?courseId=14801&lessonId=67066&from=report_recommend","subjectId":0,"playRatio":"0.0","questionId":"1176211375600604331"}],"collected":false,"subjectId":2,"questionNo":18,"questionNoShow":"18","subjective":true,"groupSort":4,"groupName":"解答题","groupInfo":"本题共5小题,共77分","groupDeclare":""},{"id":"1239541785075703108","scoreCriterion":"","cate":5,"cateName":"解答","subjectQuestionType":1020501,"subjectQuestionTypeName":"解答题","questionContent":"
已知非零向量,,,均用有向线段表示,现定义一个新的向量以及向量间的一种运算“”:.
\n
\n
(1)证明:是这样一个向量:其模是的模的倍,方向为将绕起点按逆时针方向旋转角(为轴正方向按逆时针方向旋转到所成的角,且,并举一个具体的例子说明;
(2)如图1,分别以的边,为一边向外作和,使,.设线段的中点为,证明:;
(3)如图2,设,圆,是圆上一动点,以为边作等边(,,三点按逆时针排列),求的最大值.
","options":[],"myAnswer":null,"myAnswers":null,"attachmentImages":[],"rightStatus":1,"rightAnswer":["
(1)证明见解析,例子不唯一;(2)证明见解析;(3)5.
"],"isRecordCorrected":1,"recordCorrectUserType":1,"degreeRange":3.0,"degreeRangeDesc":"难","questionType":0,"questionSource":1,"source":1,"audioUrl":"","questionSort":19,"analyse":"
(1)证明:设,,
其中,,,分别为轴正方向绕起点按逆时针方向旋转到的方向所成的角,且,,
则,
,
于是,
即,的方向为将轴正方向绕起点按逆时针方向旋转角,
故是这样一个向量:其模是的模的倍,方向为将绕起点按逆时针方向旋转角(为轴正方向按逆时针方向旋转到所成的角,且),
例如,,,则,
,,与轴正方向的夹角为,与轴正方向的夹角为,
所以将的模变为原来的2倍,并按逆时针方向旋转,即可得到;
(2)证明:记,,
根据新定义,可得,
同理,
所以,
而,
所以,
故;
(3)设,,则,
,
所以
,
所以
,
所以当,即时,.
","method":null,"childQuestions":[],"knowledges":[{"id":"317034","title":"平面向量"}],"revision":true,"score":17.0,"myScore":17.0,"scoreList":[0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0,11.0,12.0,13.0,14.0,15.0,16.0,17.0],"lessons":[],"collected":false,"subjectId":2,"questionNo":19,"questionNoShow":"19","subjective":true,"groupSort":4,"groupName":"解答题","groupInfo":"本题共5小题,共77分","groupDeclare":""}],"rightQuestionsCount":1,"rightRate":0.0}],"teacherReviewScore":null,"teacherReviewRank":null,"teacherReviewRankList":["A","B","C","D"],"teacherReviewComment":null,"teacherReviewImageList":[]}} \ No newline at end of file diff --git a/src/get_corret_answer.py b/src/get_corret_answer.py index e319a94..bb4e9e0 100644 --- a/src/get_corret_answer.py +++ b/src/get_corret_answer.py @@ -54,16 +54,14 @@ def get_answer(paperId:str, reportId:str, homeworkId:str, userId:str, token:str) try: # 发送 GET 请求 - response = session.get( - url, - headers=headers, - timeout=15 - ) + response = session.get(url,headers=headers,timeout=15) + + # open('tmp.json','w').write(response.text) # 尝试解析 JSON try: data = json.loads(response.text)['data'] - answer_dict = {} # 改为字典存储 + answer_dict = {} # 遍历所有题目组 for group in data.get('groups', []): @@ -92,9 +90,9 @@ def get_answer(paperId:str, reportId:str, homeworkId:str, userId:str, token:str) if __name__ == '__main__': - paperId='1969526514235999045' - reportId='2040881795217891454' + paperId='1995378695485046992' + reportId='2040988842982768934' homeworkId='10389626' userId='151028179' - token = '151028179-1-89663793316a648f' + token = '' print(get_answer(paperId,reportId,homeworkId,userId,token)) \ No newline at end of file diff --git a/tmp.json b/tmp.json deleted file mode 100644 index 0fbb21e..0000000 --- a/tmp.json +++ /dev/null @@ -1 +0,0 @@ -["C"] \ No newline at end of file From d9231b94a191463ac1aca1ddc16ae8052de90bee Mon Sep 17 00:00:00 2001 From: DingerBtn Date: Sun, 13 Jul 2025 23:12:06 +0800 Subject: [PATCH 05/31] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E7=AD=94=E6=A1=88=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/get_corret_answer.py | 98 --------------------------------- src/get_corret_answer_v2.py | 106 ++++++++++++++++++++++++++++++++++++ 2 files changed, 106 insertions(+), 98 deletions(-) delete mode 100644 src/get_corret_answer.py create mode 100644 src/get_corret_answer_v2.py diff --git a/src/get_corret_answer.py b/src/get_corret_answer.py deleted file mode 100644 index bb4e9e0..0000000 --- a/src/get_corret_answer.py +++ /dev/null @@ -1,98 +0,0 @@ -import json - -import requests -from urllib.parse import urlparse - - - - -def get_answer(paperId:str, reportId:str, homeworkId:str, userId:str, token:str): - """获取指定试卷的单选题和多选题正确答案 - - 通过调用EWT360 API获取指定用户的作业报告,解析并返回题目ID与正确答案的映射 - - 参数除了token都包含在试卷页面的url里了 - - 很多地方写的很不规范,一部分是不得不和 ewt 统一,还其它的看到就改一下吧qwq - - :param paperId: 试卷唯一标识符 - :param reportId: 报告唯一标识符(也不知道这个报告指的是什么) - :param homeworkId: 作业唯一标识符 - :param userId: 用户唯一标识 - :param token: 用户认证令牌 - - :returns: - - 成功时返回格式为 {题目ID: 正确答案} 的字典 - - 没有找到答案时返回'未找到正确答案'字符串 - - 发生错误时返回错误描述字符串 - - :raises ValueError: 当JSON解析失败时返回错误字符串 - :raises requests.exceptions.RequestException: 网络请求失败时返回错误字符串 - """ - # 创建会话对象 - session = requests.Session() - - # 设置 User-Agent - session.headers.update({ - "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36 Edg/138.0.0.0" - }) - - # 添加 token cookie - session.cookies.set(name="token",value=token,domain=".ewt360.com",path="/") - - # 请求 URL - url = f"https://web.ewt360.com/api/answerprod/web/answer/webreport/questionGroup?paperId={paperId}&reportId={reportId}&platform=1&bizCode=205&homeworkId={homeworkId}&userId={userId}" - - # 请求头 - headers = { - "authority": "web.ewt360.com", - "method": "GET", - "path": urlparse(url).path + "?" + urlparse(url).query, - "scheme": "https", - "token": token, - } - - try: - # 发送 GET 请求 - response = session.get(url,headers=headers,timeout=15) - - # open('tmp.json','w').write(response.text) - - # 尝试解析 JSON - try: - data = json.loads(response.text)['data'] - answer_dict = {} - - # 遍历所有题目组 - for group in data.get('groups', []): - # 过滤条件:只处理单选题和多选题 - if group.get('groupName', '') in ['单选题', '多选题']: - # 遍历组中的每个题目 - for question in group.get('questions', []): - # 同时获取题目ID和答案 - q_id = question.get('id') - answer = question.get('rightAnswer') - if q_id and answer: - answer_dict[q_id] = answer - - return answer_dict if answer_dict else '未找到正确答案' - - except ValueError: - return 'json解析失败' - - except requests.exceptions.RequestException as e: - if hasattr(e, 'response') and e.response is not None: - return f'请求失败,错误响应{e.response.text}' - else: - return f"请求失败: {str(e)}" - - - - -if __name__ == '__main__': - paperId='1995378695485046992' - reportId='2040988842982768934' - homeworkId='10389626' - userId='151028179' - token = '' - print(get_answer(paperId,reportId,homeworkId,userId,token)) \ No newline at end of file diff --git a/src/get_corret_answer_v2.py b/src/get_corret_answer_v2.py new file mode 100644 index 0000000..55571e4 --- /dev/null +++ b/src/get_corret_answer_v2.py @@ -0,0 +1,106 @@ +import requests +import json + + +def get_answer(bizCode:str, homeworkId:str, userId:str, paperId:str, reportId:str, questionId:str, token:str): + """获取指定试卷的单选题和多选题正确答案 + + 通过调用EWT360 API获取指定用户的作业报告,解析并返回题目ID与正确答案的映射 + + 很多地方写的很不规范,一部分是不得不和 ewt 统一,还其它的看到就改一下吧qwq + + :param bizCode: 业务ID,见于url + :param homeworkId: 作业ID + :param userId: 用户唯一标识 + :param paperId: 试卷ID + :param reportId: 报告ID + :param questionId: 问题ID + :param token: 用户认证令牌 + + :returns: + - 成功时返回格式为 {题目ID: 正确答案} 的字典 + - 没有找到答案时返回'未找到正确答案'字符串 + - 发生错误时返回错误描述字符串 + + :raises ValueError: 当JSON解析失败时返回错误字符串 + :raises requests.exceptions.RequestException: 网络请求失败时返回错误字符串 + """ + # 创建会话对象并设置User-Agent + session = requests.Session() + session.headers.update({ + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 Edg/116.0.1938.62" + }) + + # 仅添加token cookie + session.cookies.set("token", token, domain=".ewt360.com", path="/") + + url = "https://web.ewt360.com/api/answerprod/web/answer/simple/question/info" + + + # 请求头信息 + headers = { + "authority": "web.ewt360.com", + "method": "POST", + "path": url, + "scheme": "https", + } + + # 请求体数据 + payload = { + "questionId": questionId, + "paperId": paperId, + "reportId": reportId, + "platform": "1", + "bizCode": bizCode + } + + url = "https://web.ewt360.com/api/answerprod/web/answer/simple/question/info" + + + try: + response = session.post( + url, + headers=headers, + json=payload + ) + data = json.loads(response.text)['data'] + + answer_dict = {} + + def parse_questions(questions): + """递归解析题目和子题""" + for question in questions: + # 先提取当前题目答案(无论是否有子题) + if question.get('rightAnswer'): + answer_dict[question['id']] = question['rightAnswer'] + # 然后处理子题 + if question.get('childQuestions'): + parse_questions(question['childQuestions']) + + # 先处理根节点题目自身答案 + if data.get('rightAnswer'): + answer_dict[data['id']] = data['rightAnswer'] + + # 无论是否有子题都尝试解析 + if data.get('childQuestions'): + parse_questions(data['childQuestions']) + + return answer_dict if answer_dict else '未找到正确答案' + + except ValueError: + print("响应解析失败,原始内容:", response.text) + except requests.exceptions.RequestException as e: + print(f"请求失败: {e}") + + + + +if __name__ == '__main__': + bizCode = '205' + homeworkId='10389626' + userId='151028179' + paperId='1969526514235999045' + reportId='2040988842982768934' + questionId='1176211251046524293' + token = '151028179-1-af93b7cbfc70ad17' + print(get_answer(bizCode,homeworkId,userId,paperId,reportId,questionId,token)) \ No newline at end of file From 300edeaf4e53ff42e812285871c58aeb85089cb3 Mon Sep 17 00:00:00 2001 From: DingerBtn Date: Sun, 13 Jul 2025 23:33:01 +0800 Subject: [PATCH 06/31] =?UTF-8?q?=E8=8E=B7=E5=8F=96answer=E7=9A=84?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E6=B7=B1=E5=BA=A6=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/get_corret_answer_v2.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/get_corret_answer_v2.py b/src/get_corret_answer_v2.py index 55571e4..13fd11a 100644 --- a/src/get_corret_answer_v2.py +++ b/src/get_corret_answer_v2.py @@ -63,6 +63,11 @@ def get_answer(bizCode:str, homeworkId:str, userId:str, paperId:str, reportId:st headers=headers, json=payload ) + + # 检查HTTP状态码 + if response.status_code != 200: + return f"API请求失败,状态码: {response.status_code}" + data = json.loads(response.text)['data'] answer_dict = {} @@ -87,12 +92,14 @@ def parse_questions(questions): return answer_dict if answer_dict else '未找到正确答案' - except ValueError: - print("响应解析失败,原始内容:", response.text) + except json.JSONDecodeError: + return f"响应解析失败,原始内容: {response.text[:200]}" # 只返回前200个字符避免过长 + except KeyError: + return f"API响应缺少关键字段,完整响应: {response.text[:200]}" except requests.exceptions.RequestException as e: - print(f"请求失败: {e}") - - + return f"网络请求失败: {type(e).__name__} - {str(e)}" + except Exception as e: + return f"处理过程中发生未预期错误: {type(e).__name__} - {str(e)}" if __name__ == '__main__': From be475d039c3fe511475308106b02ba760d7299ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9D=80=E7=81=AB=E7=9A=84=E5=86=B0=E5=9D=97nya?= <161030746+zhdbk3@users.noreply.github.com> Date: Mon, 14 Jul 2025 17:23:20 +0800 Subject: [PATCH 07/31] =?UTF-8?q?Update=20README.md:=20=E8=A1=A5=E5=85=85?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E9=87=8C=E4=B8=8D=E8=A6=81=E6=9C=89=E4=B8=AD?= =?UTF-8?q?=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index d3d5c9f..c4fb132 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,9 @@ ## 如何使用 +> [!NOTE] +> **不要把本软件或浏览器驱动放在包含中文或其他特殊字符的路径下!** + ### 1. 下载浏览器驱动 请打开您的浏览器,查看它的版本。 From 62dc4c5d36bcf628eaa12a155cde1d8a8e3484e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9D=80=E7=81=AB=E7=9A=84=E5=86=B0=E5=9D=97nya?= <161030746+zhdbk3@users.noreply.github.com> Date: Tue, 15 Jul 2025 11:12:46 +0800 Subject: [PATCH 08/31] =?UTF-8?q?Update=20README.md:=20fix=20#4=20?= =?UTF-8?q?=E5=8F=8D=E6=96=9C=E6=9D=A0=E8=BD=AC=E4=B9=89=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index c4fb132..748f46b 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,9 @@ options: --mute-audio mode: watch ``` +> [!NOTE] +> 填写 `driver_path` 字段时,您可能会使用 Windows 11 右键菜单的“复制文件地址”,这样得到的路径是带引号的。请**删除引号**~~或在左引号前加上 `r` 或把每个 `\` 都换成 `\\`~~。 + ### 3. 启动! 双击运行 `AutoEwt`,然后用您的双手去做更有意义的事! From 970ddac715760ebdb96508164c82bda1a42df52d Mon Sep 17 00:00:00 2001 From: DingerBtn Date: Wed, 16 Jul 2025 00:06:30 +0800 Subject: [PATCH 09/31] =?UTF-8?q?=E8=8E=B7=E5=8F=96=20id=EF=BC=9A=E5=AE=8C?= =?UTF-8?q?=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/get_corret_answer_v2.py | 14 ++++-- src/get_question_id_v2.py | 96 +++++++++++++++++++++++++++++++++++++ 2 files changed, 105 insertions(+), 5 deletions(-) create mode 100644 src/get_question_id_v2.py diff --git a/src/get_corret_answer_v2.py b/src/get_corret_answer_v2.py index 13fd11a..8b458e4 100644 --- a/src/get_corret_answer_v2.py +++ b/src/get_corret_answer_v2.py @@ -67,7 +67,11 @@ def get_answer(bizCode:str, homeworkId:str, userId:str, paperId:str, reportId:st # 检查HTTP状态码 if response.status_code != 200: return f"API请求失败,状态码: {response.status_code}" - + if response.json()['code'] == '2001106': + return f'登陆状态异常,请检查token是否过期或无效' + if json.loads(response.text)['code'] != '200': + return f"API请求失败,ewt状态码:{json.loads(response.text)['code']},消息:{json.loads(response.text)['msg']} " + # print(response.text) data = json.loads(response.text)['data'] answer_dict = {} @@ -106,8 +110,8 @@ def parse_questions(questions): bizCode = '205' homeworkId='10389626' userId='151028179' - paperId='1969526514235999045' - reportId='2040988842982768934' - questionId='1176211251046524293' - token = '151028179-1-af93b7cbfc70ad17' + paperId='1996206103754744180' + reportId='2040663610879271448' + questionId='3244399719505180405' + token = '' print(get_answer(bizCode,homeworkId,userId,paperId,reportId,questionId,token)) \ No newline at end of file diff --git a/src/get_question_id_v2.py b/src/get_question_id_v2.py new file mode 100644 index 0000000..8413fcf --- /dev/null +++ b/src/get_question_id_v2.py @@ -0,0 +1,96 @@ +import requests +import json + + +def get_question_ids(paperId: str, token: str): + """获取试卷中的题目ID信息 + + 通过调用EWT360 API获取指定用户的试卷信息,解析并返回题目ID列表 + + :param paperId: 试卷ID + :param token: 用户认证令牌 + + :returns: + - 成功时返回题目ID列表 + - 发生错误时返回错误描述字符串 + + :raises ValueError: 当JSON解析失败时返回错误字符串 + :raises requests.exceptions.RequestException: 网络请求失败时返回错误字符串 + """ + # 创建会话对象并设置User-Agent + session = requests.Session() + session.headers.update({ + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 Edg/116.0.1938.62" + }) + + # 设置token cookie + session.cookies.set("token", token, domain=".ewt360.com", path="/") + + url = f"https://web.ewt360.com/api/answerprod/common/paper/getPaperQuestionByPaperId?paperId={paperId}" + + # 请求头信息 + headers = { + "authority": "web.ewt360.com", + "method": "GET", + "path": url, + "scheme": "https", + } + + + try: + response = session.get(url,headers=headers,) + + # 检查HTTP状态码 + if response.status_code != 200: + return f"API请求失败,状态码: {response.status_code}" + + if response.json()['code'] == '2001106': + return f'登陆状态异常,请检查token是否过期或无效' + + if json.loads(response.text)['code'] != '200': + return f"API请求失败,ewt状态码:{json.loads(response.text)['code']},消息:{json.loads(response.text)['msg']} " + + + # 解析JSON响应 + json_data = response.json() + + # print(response.text) + # 检查响应是否包含data字段 + if 'data' not in json_data: + return f"API响应缺少data字段,完整响应: {response.text[:200]}" + + def extract_ids(question_list): + ids = [] + if not isinstance(question_list, list): + return ids + for q in question_list: + if not isinstance(q, dict): + continue + sub_list = q.get('subQuestionList') + if isinstance(sub_list, list) and sub_list: + # 有子题时只递归子题,不添加母题id + ids.extend(extract_ids(sub_list)) + else: + # 无子题时添加当前题id + ids.append(q.get('questionId')) + return ids + + data = json_data['data'] + question_list = data.get('questionList', []) + question_ids = extract_ids(question_list) + return question_ids + + except json.JSONDecodeError: + return f"响应解析失败,原始内容: {response.text[:200]}" # 只返回前200个字符避免过长 + except requests.exceptions.RequestException as e: + return f"网络请求失败: {type(e).__name__} - {str(e)}" + except Exception as e: + return f"处理过程中发生未预期错误: {type(e).__name__} - {str(e)}" + +if __name__ == '__main__': + # 测试参数 + # paperId = '1996206103754744180' # 语文 + paperId = '1986397841559642844' # 数学 + token = '' + result = get_question_ids(paperId, token) + print("获取到的题目ID列表:", result) \ No newline at end of file From 7707a5af442e81d038fc638e60dcc62108c94749 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9D=80=E7=81=AB=E7=9A=84=E5=86=B0=E5=9D=97nya?= <161030746+zhdbk3@users.noreply.github.com> Date: Thu, 17 Jul 2025 21:59:55 +0800 Subject: [PATCH 10/31] =?UTF-8?q?Update=20README.md:=20Minecraft=EF=BC=8C?= =?UTF-8?q?=E5=90=AF=E5=8A=A8=EF=BC=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 748f46b..69737a6 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,11 @@ mode: watch 双击运行 `AutoEwt`,然后用您的双手去做更有意义的事! +> [!NOTE] +> 在该程序运行时启动 Minecraft 可能会导致视频被暂停,建议 Minecraft 启动完成之后检查一下视频播放情况,以免造成不必要的损失。 +> 该 bug 作用机理尚不明确,难以稳定复现,且不存在任何日志记录,无法修复,见谅。 +> 如果您找到了稳定复现的方法,欢迎提 issue 报告。 + ## 开发环境 - Python 3.12 From 704b7125259df8e786776655dccbccdffde51777 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9D=80=E7=81=AB=E7=9A=84=E5=86=B0=E5=9D=97nya?= <161030746+zhdbk3@users.noreply.github.com> Date: Thu, 17 Jul 2025 22:00:59 +0800 Subject: [PATCH 11/31] =?UTF-8?q?Update=20README.md:=20=E5=BF=98=E6=8D=A2?= =?UTF-8?q?=E8=A1=8C=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 69737a6..70b9325 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,9 @@ mode: watch > [!NOTE] > 在该程序运行时启动 Minecraft 可能会导致视频被暂停,建议 Minecraft 启动完成之后检查一下视频播放情况,以免造成不必要的损失。 +> > 该 bug 作用机理尚不明确,难以稳定复现,且不存在任何日志记录,无法修复,见谅。 +> > 如果您找到了稳定复现的方法,欢迎提 issue 报告。 ## 开发环境 From f813244ed83a37676ba77221003543caab047557 Mon Sep 17 00:00:00 2001 From: DingerBtn Date: Mon, 21 Jul 2025 12:49:41 +0800 Subject: [PATCH 12/31] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E7=AD=94=E6=A1=88=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- requirements.txt | 3 +- src/{ => AutoPaper}/get_corret_answer_v2.py | 16 ++-- src/AutoPaper/get_info_by_current_url.py | 0 src/AutoPaper/get_question_id_v2.py | 96 +++++++++++++++++++++ src/AutoPaper/get_token_by_se.py | 0 src/get_question_id_v2.py | 96 --------------------- 6 files changed, 106 insertions(+), 105 deletions(-) rename src/{ => AutoPaper}/get_corret_answer_v2.py (87%) create mode 100644 src/AutoPaper/get_info_by_current_url.py create mode 100644 src/AutoPaper/get_question_id_v2.py create mode 100644 src/AutoPaper/get_token_by_se.py diff --git a/requirements.txt b/requirements.txt index a8bab36..1ed6fba 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ selenium~=4.34.2 pyyaml~=6.0.2 -requests~=2.32.4 \ No newline at end of file +requests~=2.32.4 +jsons~=1.1.1 \ No newline at end of file diff --git a/src/get_corret_answer_v2.py b/src/AutoPaper/get_corret_answer_v2.py similarity index 87% rename from src/get_corret_answer_v2.py rename to src/AutoPaper/get_corret_answer_v2.py index 8b458e4..4ccbb00 100644 --- a/src/get_corret_answer_v2.py +++ b/src/AutoPaper/get_corret_answer_v2.py @@ -13,7 +13,7 @@ def get_answer(bizCode:str, homeworkId:str, userId:str, paperId:str, reportId:st :param homeworkId: 作业ID :param userId: 用户唯一标识 :param paperId: 试卷ID - :param reportId: 报告ID + :param reportId: 报告ID,如果需要获取未完成的试卷的答案,需要传入一个已完成的reportId :param questionId: 问题ID :param token: 用户认证令牌 @@ -68,7 +68,7 @@ def get_answer(bizCode:str, homeworkId:str, userId:str, paperId:str, reportId:st if response.status_code != 200: return f"API请求失败,状态码: {response.status_code}" if response.json()['code'] == '2001106': - return f'登陆状态异常,请检查token是否过期或无效' + return f'请求失败,登陆状态异常,请检查token是否过期或无效' if json.loads(response.text)['code'] != '200': return f"API请求失败,ewt状态码:{json.loads(response.text)['code']},消息:{json.loads(response.text)['msg']} " # print(response.text) @@ -99,19 +99,19 @@ def parse_questions(questions): except json.JSONDecodeError: return f"响应解析失败,原始内容: {response.text[:200]}" # 只返回前200个字符避免过长 except KeyError: - return f"API响应缺少关键字段,完整响应: {response.text[:200]}" + return f"请求失败,API响应缺少关键字段,完整响应: {response.text[:200]}" except requests.exceptions.RequestException as e: return f"网络请求失败: {type(e).__name__} - {str(e)}" except Exception as e: - return f"处理过程中发生未预期错误: {type(e).__name__} - {str(e)}" + return f"处理失败,处理过程中发生未预期错误: {type(e).__name__} - {str(e)}" if __name__ == '__main__': bizCode = '205' homeworkId='10389626' - userId='151028179' - paperId='1996206103754744180' - reportId='2040663610879271448' - questionId='3244399719505180405' + userId='' + paperId='1986397841559642844' + reportId='2040988842982768934' + questionId='1176211251046524293' token = '' print(get_answer(bizCode,homeworkId,userId,paperId,reportId,questionId,token)) \ No newline at end of file diff --git a/src/AutoPaper/get_info_by_current_url.py b/src/AutoPaper/get_info_by_current_url.py new file mode 100644 index 0000000..e69de29 diff --git a/src/AutoPaper/get_question_id_v2.py b/src/AutoPaper/get_question_id_v2.py new file mode 100644 index 0000000..0d5b736 --- /dev/null +++ b/src/AutoPaper/get_question_id_v2.py @@ -0,0 +1,96 @@ +import requests +import json + + +def get_question_ids(paperId: str, token: str): + """获取试卷中的题目ID信息 + + 通过调用EWT360 API获取指定用户的试卷信息,解析并返回题目ID列表 + + :param paperId: 试卷ID + :param token: 用户认证令牌 + + :returns: + - 成功时返回题目ID列表 + - 发生错误时返回错误描述字符串 + + :raises ValueError: 当JSON解析失败时返回错误字符串 + :raises requests.exceptions.RequestException: 网络请求失败时返回错误字符串 + """ + # 创建会话对象并设置User-Agent + session = requests.Session() + session.headers.update({ + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 Edg/116.0.1938.62" + }) + + # 设置token cookie + session.cookies.set("token", token, domain=".ewt360.com", path="/") + + url = f"https://web.ewt360.com/api/answerprod/common/paper/getPaperQuestionByPaperId?paperId={paperId}" + + # 请求头信息 + headers = { + "authority": "web.ewt360.com", + "method": "GET", + "path": url, + "scheme": "https", + } + + + try: + response = session.get(url,headers=headers,) + + # 检查HTTP状态码 + if response.status_code != 200: + return f"API请求失败,状态码: {response.status_code}" + + if response.json()['code'] == '2001106': + return f'请求失败,登陆状态异常,请检查token是否过期或无效' + + if json.loads(response.text)['code'] != '200': + return f"API请求失败,ewt状态码:{json.loads(response.text)['code']},消息:{json.loads(response.text)['msg']} " + + + # 解析JSON响应 + json_data = response.json() + + # print(response.text) + # 检查响应是否包含data字段 + if 'data' not in json_data: + return f"请求失败,API响应缺少data字段,完整响应: {response.text[:200]}" + + def extract_ids(question_list): + ids = [] + if not isinstance(question_list, list): + return ids + for q in question_list: + if not isinstance(q, dict): + continue + sub_list = q.get('subQuestionList') + if isinstance(sub_list, list) and sub_list: + # 有子题时只递归子题,不添加母题id + ids.extend(extract_ids(sub_list)) + else: + # 无子题时添加当前题id + ids.append(q.get('questionId')) + return ids + + data = json_data['data'] + question_list = data.get('questionList', []) + question_ids = extract_ids(question_list) + return question_ids + + except json.JSONDecodeError: + return f"响应解析失败,原始内容: {response.text[:200]}" # 只返回前200个字符避免过长 + except requests.exceptions.RequestException as e: + return f"网络请求失败: {type(e).__name__} - {str(e)}" + except Exception as e: + return f"处理失败,处理过程中发生未预期错误: {type(e).__name__} - {str(e)}" + +if __name__ == '__main__': + # 测试参数 + # paperId = '1996206103754744180' # 语文 + paperId = '1986397841559642844' # 数学 + token = '' + result = get_question_ids(paperId, token) + print("获取到的题目ID列表:", result) \ No newline at end of file diff --git a/src/AutoPaper/get_token_by_se.py b/src/AutoPaper/get_token_by_se.py new file mode 100644 index 0000000..e69de29 diff --git a/src/get_question_id_v2.py b/src/get_question_id_v2.py index 8413fcf..e69de29 100644 --- a/src/get_question_id_v2.py +++ b/src/get_question_id_v2.py @@ -1,96 +0,0 @@ -import requests -import json - - -def get_question_ids(paperId: str, token: str): - """获取试卷中的题目ID信息 - - 通过调用EWT360 API获取指定用户的试卷信息,解析并返回题目ID列表 - - :param paperId: 试卷ID - :param token: 用户认证令牌 - - :returns: - - 成功时返回题目ID列表 - - 发生错误时返回错误描述字符串 - - :raises ValueError: 当JSON解析失败时返回错误字符串 - :raises requests.exceptions.RequestException: 网络请求失败时返回错误字符串 - """ - # 创建会话对象并设置User-Agent - session = requests.Session() - session.headers.update({ - "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 Edg/116.0.1938.62" - }) - - # 设置token cookie - session.cookies.set("token", token, domain=".ewt360.com", path="/") - - url = f"https://web.ewt360.com/api/answerprod/common/paper/getPaperQuestionByPaperId?paperId={paperId}" - - # 请求头信息 - headers = { - "authority": "web.ewt360.com", - "method": "GET", - "path": url, - "scheme": "https", - } - - - try: - response = session.get(url,headers=headers,) - - # 检查HTTP状态码 - if response.status_code != 200: - return f"API请求失败,状态码: {response.status_code}" - - if response.json()['code'] == '2001106': - return f'登陆状态异常,请检查token是否过期或无效' - - if json.loads(response.text)['code'] != '200': - return f"API请求失败,ewt状态码:{json.loads(response.text)['code']},消息:{json.loads(response.text)['msg']} " - - - # 解析JSON响应 - json_data = response.json() - - # print(response.text) - # 检查响应是否包含data字段 - if 'data' not in json_data: - return f"API响应缺少data字段,完整响应: {response.text[:200]}" - - def extract_ids(question_list): - ids = [] - if not isinstance(question_list, list): - return ids - for q in question_list: - if not isinstance(q, dict): - continue - sub_list = q.get('subQuestionList') - if isinstance(sub_list, list) and sub_list: - # 有子题时只递归子题,不添加母题id - ids.extend(extract_ids(sub_list)) - else: - # 无子题时添加当前题id - ids.append(q.get('questionId')) - return ids - - data = json_data['data'] - question_list = data.get('questionList', []) - question_ids = extract_ids(question_list) - return question_ids - - except json.JSONDecodeError: - return f"响应解析失败,原始内容: {response.text[:200]}" # 只返回前200个字符避免过长 - except requests.exceptions.RequestException as e: - return f"网络请求失败: {type(e).__name__} - {str(e)}" - except Exception as e: - return f"处理过程中发生未预期错误: {type(e).__name__} - {str(e)}" - -if __name__ == '__main__': - # 测试参数 - # paperId = '1996206103754744180' # 语文 - paperId = '1986397841559642844' # 数学 - token = '' - result = get_question_ids(paperId, token) - print("获取到的题目ID列表:", result) \ No newline at end of file From 165b2040faa2dc7641f19043ef21d793cb449f15 Mon Sep 17 00:00:00 2001 From: DingerBtn Date: Mon, 21 Jul 2025 12:55:27 +0800 Subject: [PATCH 13/31] =?UTF-8?q?=E6=96=B9=E4=BE=BF=E7=94=A8ai=EF=BC=8C?= =?UTF-8?q?=E7=BB=99=E9=85=8D=E7=BD=AE=E8=AF=BB=E5=8F=96=E5=8A=A0=E4=BA=86?= =?UTF-8?q?=E4=B8=AA=E6=A0=B7=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/get_question_id_v2.py | 0 src/main.py | 13 +++++++++++++ 2 files changed, 13 insertions(+) delete mode 100644 src/get_question_id_v2.py diff --git a/src/get_question_id_v2.py b/src/get_question_id_v2.py deleted file mode 100644 index e69de29..0000000 diff --git a/src/main.py b/src/main.py index 3b6415c..1aee8cd 100644 --- a/src/main.py +++ b/src/main.py @@ -24,6 +24,19 @@ handlers=[logging.StreamHandler(), logging.FileHandler(f'log/log_{now}.txt', encoding='utf-8')], ) +''' +配置文件样例: +# 修改时不要删掉冒号后的空格 +browser: 浏览器名称(首字母大写),如 Chrome, Edge 等 +driver_path: 浏览器驱动路径 +username: 用户名 +password: 密码 +list_url: 课程列表页面的链接 +# 浏览器启动时的参数,这里给了个静音 +options: --mute-audio +# AutoEwt 模式,选填 watch(看课)/ test(做试卷) +mode: watch +''' with open('config.yml', encoding='utf-8') as f: config = yaml.load(f, yaml.FullLoader) # 密码可能是纯数字 From a160d52b75ee37b915b61cfc79f1ccd04195ec93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9D=80=E7=81=AB=E7=9A=84=E5=86=B0=E5=9D=97nya?= <161030746+zhdbk3@users.noreply.github.com> Date: Mon, 21 Jul 2025 13:32:06 +0800 Subject: [PATCH 14/31] =?UTF-8?q?Update=20viewer.py:=20=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E5=A4=9A=E4=BD=99=E7=9A=84=E8=AD=A6=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/viewer.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/viewer.py b/src/viewer.py index f371ec9..1ceb818 100644 --- a/src/viewer.py +++ b/src/viewer.py @@ -24,8 +24,6 @@ def __init__(self, config: dict): if self.mode not in ['watch', 'test']: logging.error('mode 只能是 watch 或 test,请检查配置文件!') exit(1) - if self.mode == 'test': - logging.warning('由于技术限制,请保持焦点在浏览器窗口上!') self.username = config['username'] self.password = config['password'] From ab73603e33fa06c0cb54304cbe0ead513c991967 Mon Sep 17 00:00:00 2001 From: DingerBtn Date: Tue, 22 Jul 2025 17:10:44 +0800 Subject: [PATCH 15/31] =?UTF-8?q?=E9=87=8D=E6=9E=84=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/AutoPaper/auto_paper.py | 97 +++++++++++ src/AutoPaper/get_info_by_current_url.py | 31 ++++ src/AutoPaper/get_question_id_v2.py | 2 + src/AutoVideo/auto_video.py | 102 ++++++++++++ src/main.py | 74 ++++----- src/utils.py | 101 ++++++++++++ src/viewer.py | 199 ----------------------- 7 files changed, 362 insertions(+), 244 deletions(-) create mode 100644 src/AutoPaper/auto_paper.py create mode 100644 src/AutoVideo/auto_video.py create mode 100644 src/utils.py delete mode 100644 src/viewer.py diff --git a/src/AutoPaper/auto_paper.py b/src/AutoPaper/auto_paper.py new file mode 100644 index 0000000..8b63b47 --- /dev/null +++ b/src/AutoPaper/auto_paper.py @@ -0,0 +1,97 @@ +# +# Created by 着火的冰块nya (zhdbk3) on 2025/1/23 +# + +import time +import logging +import traceback +from typing import Literal +import random + +from selenium.webdriver.common.by import By +from selenium.webdriver.remote.webelement import WebElement + +from utils import click, click_and_switch, close_and_switch + +class AutoPaper: + def __init__(self, driver, config): + """ + 自动刷试卷程序的主体 + :param driver: 浏览器驱动实例 + :param config: 读取的配置文件 + """ + self.mode: Literal['test'] = config['mode'] + if self.mode != 'test': + logging.error('mode 只能是 test,请检查配置文件!') + exit(1) + + self.driver = driver + self.finish_days_list() + + def finish_days_list(self) -> None: + """完成所有天""" + time.sleep(5) + days = self.driver.find_elements(By.CSS_SELECTOR, 'li[data-active="true"], li[data-active="false"]') + logging.info(f'一共有 {len(days)} 天的任务') + for i in range(len(days)): + logging.info(f'================ 第 {i + 1} / {len(days)} 天 ================') + self.finish_a_day(days[i]) + + def finish_a_day(self, day: WebElement) -> None: + """ + 完成一天的任务 + :param day: 该天在网页上的标签 + :return: None + """ + click(self.driver, day) + time.sleep(2) + btns = self.driver.find_elements( + By.XPATH, + "//div[contains(@class, 'btn-3dDLy')][contains(., '测一测') or contains(., '继续答')]") + unit = '张试卷' + logging.info(f'该天还剩 {len(btns)} {unit}') + for i in range(len(btns)): + logging.info(f'第 {i + 1} / {len(btns)} {unit}') + try: + self.finish_a_test(btns[i]) + except: + logging.error(traceback.format_exc()) + logging.warning('该试卷已跳过') + # 关闭页面,返回首页 + close_and_switch(self.driver) + + def finish_a_test(self, btn: WebElement): + """ + 完成一张试卷 + 选择题随机选一个,大题传一个占位图片文件,并自批为满分 + """ + click_and_switch(self.driver, btn) + + # 完成选择题 + options_uls = self.driver.find_elements(By.CLASS_NAME, 'pm-question-options') + for ul in options_uls: + items = ul.find_elements(By.CSS_SELECTOR, 'li') + # 随机选一个选项 + click(self.driver, random.choice(items)) + time.sleep(0.2) + + time.sleep(1) + + # 提交 + click(self.driver, self.driver.find_element(By.CLASS_NAME, 'ant-btn-primary')) + time.sleep(1) + click(self.driver, self.driver.find_element(By.CLASS_NAME, 'confirm-right')) + time.sleep(5) + + # 自批满分(不一定有此环节) + n = len(self.driver.find_elements(By.CSS_SELECTOR, '.content-left-scroll > ul > li')) + if n != 0: + for i in range(n): + click(self.driver, self.driver.find_element(By.CSS_SELECTOR, '.content-right-scroll > ul > li:last-child')) + time.sleep(2) + click(self.driver, self.driver.find_element(By.CLASS_NAME, 'content-main-footer_submit_btn_full')) + time.sleep(1) + click(self.driver, self.driver.find_element(By.CLASS_NAME, 'confirm-right')) + time.sleep(3) + + close_and_switch(self.driver) \ No newline at end of file diff --git a/src/AutoPaper/get_info_by_current_url.py b/src/AutoPaper/get_info_by_current_url.py index e69de29..bf68e67 100644 --- a/src/AutoPaper/get_info_by_current_url.py +++ b/src/AutoPaper/get_info_by_current_url.py @@ -0,0 +1,31 @@ +from urllib.parse import parse_qs + +def get_info_from_url(paper_url): + """ + 从给定的 URL 中提取查询参数并返回一个字典。 + + :param paper_url: 包含查询参数的 URL 字符串 + :return: 包含 URL 中所有查询参数的字典 + """ + # 找到 ? 的索引位置 + query_start_index = paper_url.find('?') + if query_start_index == -1: + # 如果没有找到 ?,说明没有查询参数,返回空字典 + return {} + # 提取 ? 后面的查询字符串 + query_string = paper_url[query_start_index + 1:] + # 解析查询字符串为字典 + query_params = parse_qs(query_string) + # 将字典的值从列表转换为单个值 + return {key: value[0] for key, value in query_params.items()} + +if __name__ == '__main__': + test_urls = [ + "https://web.ewt360.com/mystudy/#/exam/answer?paperId=1990849016816197771&bizCode=205&platform=1&videoPoint=1&homeworkId=10389626", + ] + + for url in test_urls: + result = get_info_from_url(url) + print(f"测试 URL: {url}") + print(f"解析结果: {result}") + print("-" * 50) \ No newline at end of file diff --git a/src/AutoPaper/get_question_id_v2.py b/src/AutoPaper/get_question_id_v2.py index 0d5b736..2fe9fb3 100644 --- a/src/AutoPaper/get_question_id_v2.py +++ b/src/AutoPaper/get_question_id_v2.py @@ -1,3 +1,5 @@ +# 此模块疑似没有作用,但先保留着,以备不时之需 + import requests import json diff --git a/src/AutoVideo/auto_video.py b/src/AutoVideo/auto_video.py new file mode 100644 index 0000000..25d6ce8 --- /dev/null +++ b/src/AutoVideo/auto_video.py @@ -0,0 +1,102 @@ +# +# Created by 着火的冰块nya (zhdbk3) on 2025/1/23 +# + +import time +import logging +import traceback +from typing import Literal + +from selenium.webdriver.common.by import By +from selenium.webdriver.remote.webelement import WebElement +from selenium.common.exceptions import NoSuchElementException + +from utils import click, click_and_switch, close_and_switch + +class AutoVideo: + def __init__(self, driver, config): + """ + 自动看课程序的主体 + :param driver: 浏览器驱动实例 + :param config: 读取的配置文件 + """ + self.mode: Literal['watch'] = config['mode'] + if self.mode != 'watch': + logging.error('mode 只能是 watch,请检查配置文件!') + exit(1) + + self.driver = driver + self.finish_days_list() + + def finish_days_list(self) -> None: + """完成所有天""" + time.sleep(5) + days = self.driver.find_elements(By.CSS_SELECTOR, 'li[data-active="true"], li[data-active="false"]') + logging.info(f'一共有 {len(days)} 天的任务') + for i in range(len(days)): + logging.info(f'================ 第 {i + 1} / {len(days)} 天 ================') + self.finish_a_day(days[i]) + + def finish_a_day(self, day: WebElement) -> None: + """ + 完成一天的任务 + :param day: 该天在网页上的标签 + :return: None + """ + click(self.driver, day) + time.sleep(2) + btns = self.driver.find_elements( + By.XPATH, + "//div[contains(@class, 'btn-3dDLy') " + "and .//text()[contains(., '学')] " + "and not(.//text()[contains(., '已学完')])]") + unit = '节课' + logging.info(f'该天还剩 {len(btns)} {unit}') + for i in range(len(btns)): + logging.info(f'第 {i + 1} / {len(btns)} {unit}') + try: + self.finish_a_lesson(btns[i]) + except: + # 似乎现在不存在这种特殊情况了,但这些逻辑还是留着吧,防止看一半程序暴毙 + # # 出现特殊情况,则跳过,不影响其他课程的完成 + # # 并不是所有课都是视频,还有 FM、试卷等 + # # 对于 FM,只要点进去了就是完成 + # # 对于试卷,留给人来处理 + logging.error(traceback.format_exc()) + logging.warning('该课已跳过') + logging.warning('如果这是视频课,请报告 bug') + # 关闭页面,返回首页 + close_and_switch(self.driver) + + def finish_a_lesson(self, btn: WebElement) -> None: + """ + 完成一节课,应对各种突发情况 + :param btn: “学”按钮 + :return: None + """ + click_and_switch(self.driver, btn) + + video = self.driver.find_element(By.TAG_NAME, 'video') + + # 有时需要手动点播放 + try: + time.sleep(3) + self.driver.find_element(By.CLASS_NAME, 'vjs-big-play-button').click() + logging.info('手动开始播放视频') + except: + pass + + while not video.get_attribute('ended'): + # 老师敲黑板,帮你暂停一下 + # 看看你在不在认真听课~ + try: + self.driver.find_element(By.XPATH, "//*[contains(text(), '点击通过检查')]").click() + logging.info('点击了检查点') + except NoSuchElementException: + pass + + time.sleep(1) + + logging.info('好诶~完成啦~') + + close_and_switch(self.driver) \ No newline at end of file diff --git a/src/main.py b/src/main.py index 1aee8cd..b378e59 100644 --- a/src/main.py +++ b/src/main.py @@ -2,61 +2,45 @@ # Created by 着火的冰块nya (zhdbk3) on 2025/1/23 # -import os -import datetime -import logging import traceback - -import yaml +from utils import init_logging, read_config, init_driver, login +from AutoVideo.auto_video import AutoVideo +from AutoPaper.auto_paper import AutoPaper from selenium.common.exceptions import StaleElementReferenceException +import logging +import time + +init_logging() -from viewer import Viewer - -# 如果不存在 log 文件夹,则创建 -if not os.path.exists('log'): - os.makedirs('log') -# 初始化日志 -now = datetime.datetime.now().strftime('%Y-%m-%d_%H.%M.%S') -logging.basicConfig( - level=logging.INFO, - format='[%(asctime)s %(levelname)s] %(message)s', - datefmt='%Y-%m-%d %H:%M:%S', - handlers=[logging.StreamHandler(), logging.FileHandler(f'log/log_{now}.txt', encoding='utf-8')], -) - -''' -配置文件样例: -# 修改时不要删掉冒号后的空格 -browser: 浏览器名称(首字母大写),如 Chrome, Edge 等 -driver_path: 浏览器驱动路径 -username: 用户名 -password: 密码 -list_url: 课程列表页面的链接 -# 浏览器启动时的参数,这里给了个静音 -options: --mute-audio -# AutoEwt 模式,选填 watch(看课)/ test(做试卷) -mode: watch -''' -with open('config.yml', encoding='utf-8') as f: - config = yaml.load(f, yaml.FullLoader) - # 密码可能是纯数字 - config['password'] = str(config['password']) - logging.info('成功读取到配置文件') +config = read_config() logging.info('启动!') -num_abnormal_collapse = 0 +retry_count = 0 +retry_interval = 3 # 初始重试间隔为 3 秒 + while True: try: - viewer = Viewer(config) + driver = init_driver(config) + login(driver, config['username'], config['password']) + if config['mode'] == 'watch': + AutoVideo(driver, config) + elif config['mode'] == 'test': + AutoPaper(driver, config) + + break # 如果程序正常执行完毕,退出循环 except StaleElementReferenceException: logging.error(traceback.format_exc()) logging.info('程序崩溃,正在自动重启……') logging.info('这是由于页面自动刷新导致的元素查找错误,是正常现象') - except: + except Exception as e: logging.critical(traceback.format_exc()) - logging.critical('程序异常崩溃,请报告 bug,正在自动重启……') - num_abnormal_collapse += 1 - if num_abnormal_collapse >= 5: - logging.critical('异常崩溃次数过多,已停止程序') - break + logging.critical(f'程序异常崩溃,错误信息: {str(e)},正在自动重启……') + finally: + if 'driver' in locals(): + driver.quit() + + retry_count += 1 + logging.info(f'第 {retry_count} 次重试,将在 {retry_interval} 秒后进行') + time.sleep(retry_interval) + retry_interval *= 2 # 每次重试间隔时间翻倍 \ No newline at end of file diff --git a/src/utils.py b/src/utils.py new file mode 100644 index 0000000..592a5c4 --- /dev/null +++ b/src/utils.py @@ -0,0 +1,101 @@ +# +# 此模块用于存储通用的工具函数 +# + +import os +import datetime +import logging +import time +import yaml +from selenium import webdriver +from selenium.webdriver.remote.webelement import WebElement + +def init_logging(): + # 如果不存在 log 文件夹,则创建 + if not os.path.exists('log'): + os.makedirs('log') + # 初始化日志 + now = datetime.datetime.now().strftime('%Y-%m-%d_%H.%M.%S') + logging.basicConfig( + level=logging.INFO, + format='[%(asctime)s %(levelname)s] %(message)s', + datefmt='%Y-%m-%d %H:%M:%S', + handlers=[logging.StreamHandler(), logging.FileHandler(f'log/log_{now}.txt', encoding='utf-8')], + ) + +def read_config(): + ''' + 配置文件样例: + # 修改时不要删掉冒号后的空格 + browser: 浏览器名称(首字母大写),如 Chrome, Edge 等 + driver_path: 浏览器驱动路径 + username: 用户名 + password: 密码 + list_url: 课程列表页面的链接 + # 浏览器启动时的参数,这里给了个静音 + options: --mute-audio + # AutoEwt 模式,选填 watch(看课)/ test(做试卷) + mode: watch + ''' + if not os.path.exists('config.yml'): + logging.error('配置文件 config.yml 不存在,请检查!') + exit(1) + with open('config.yml', encoding='utf-8') as f: + config = yaml.load(f, yaml.FullLoader) + # 密码可能是纯数字 + config['password'] = str(config['password']) + logging.info('成功读取到配置文件') + return config + +def init_driver(config): + browser = config['browser'] + + options = getattr(webdriver, browser.lower()).options.Options() + options.add_argument(config['options']) + driver = getattr(webdriver, browser)( + service=getattr(webdriver, browser.lower()).service.Service(config['driver_path']), + options=options + ) + driver.maximize_window() + driver.get(config['list_url']) + driver.implicitly_wait(3) + return driver + +def login(driver, username, password): + from selenium.webdriver.common.by import By # 导入 By 类 + logging.info('登录账号……') + # 使用新的定位方式 By.ID + driver.find_element(By.ID, 'login__password_userName').send_keys(username) + driver.find_element(By.ID, 'login__password_password').send_keys(password) + # 使用新的定位方式 By.CLASS_NAME + driver.find_element(By.CLASS_NAME, 'ant-btn-block').submit() + + +def click(driver, btn: WebElement) -> None: + """ + 通过调用 .click(); 事件点击一个按钮,这比直接在 Python 中 .click() 更稳定 + 对于可能被遮挡而无法点击的按钮,应使用此方法 + :param driver: 浏览器驱动实例 + :param btn: 要点击的按钮 + :return: None + """ + driver.execute_script('arguments[0].click();', btn) + +def click_and_switch(driver, btn: WebElement): + """ + 点击按钮并切换到新页面 + :param driver: 浏览器驱动实例 + :param btn: 要点击的按钮 + """ + click(driver, btn) + time.sleep(1) # 给新页面反应一会 + # 切换到当前页面 + handles = driver.window_handles + driver.switch_to.window(handles[1]) + +def close_and_switch(driver): + """关闭当前页面并返回到首页""" + handles = driver.window_handles + driver.close() + driver.switch_to.window(handles[0]) + time.sleep(1) \ No newline at end of file diff --git a/src/viewer.py b/src/viewer.py deleted file mode 100644 index 1ceb818..0000000 --- a/src/viewer.py +++ /dev/null @@ -1,199 +0,0 @@ -# -# Created by 着火的冰块nya (zhdbk3) on 2025/1/23 -# - -import time -import logging -import traceback -from typing import Literal -import random - -from selenium import webdriver -from selenium.webdriver.common.by import By -from selenium.webdriver.remote.webelement import WebElement -from selenium.common.exceptions import NoSuchElementException - - -class Viewer: - def __init__(self, config: dict): - """ - 自动刷课程序的主体 - :param config: 读取的配置文件 - """ - self.mode: Literal['watch', 'test'] = config['mode'] - if self.mode not in ['watch', 'test']: - logging.error('mode 只能是 watch 或 test,请检查配置文件!') - exit(1) - - self.username = config['username'] - self.password = config['password'] - - browser = config['browser'] - - options = getattr(webdriver, browser.lower()).options.Options() - options.add_argument(config['options']) - self.driver: webdriver.Edge = getattr(webdriver, browser)( - service=getattr(webdriver, browser.lower()).service.Service(config['driver_path']), - options=options - ) - self.driver.maximize_window() - self.driver.get(config['list_url']) - self.driver.implicitly_wait(3) - - self.login() - self.finish_days_list() - - def login(self) -> None: - logging.info('登录账号……') - self.driver.find_element(By.ID, 'login__password_userName').send_keys(self.username) - self.driver.find_element(By.ID, 'login__password_password').send_keys(self.password) - self.driver.find_element(By.CLASS_NAME, 'ant-btn-block').submit() - - def click(self, btn: WebElement) -> None: - """ - 通过调用 .click(); 事件点击一个按钮,这比直接在 Python 中 .click() 更稳定 - 对于可能被遮挡而无法点击的按钮,应使用此方法 - :param btn: 要点击的按钮 - :return: None - """ - self.driver.execute_script('arguments[0].click();', btn) - - def finish_days_list(self) -> None: - """完成所有天""" - time.sleep(5) - days = self.driver.find_elements(By.CSS_SELECTOR, 'li[data-active="true"], li[data-active="false"]') - logging.info(f'一共有 {len(days)} 天的任务') - for i in range(len(days)): - logging.info(f'================ 第 {i + 1} / {len(days)} 天 ================') - self.finish_a_day(days[i]) - - def finish_a_day(self, day: WebElement) -> None: - """ - 完成一天的任务 - :param day: 该天在网页上的标签 - :return: None - """ - self.click(day) - time.sleep(2) - if self.mode == 'watch': - btns = self.driver.find_elements( - By.XPATH, - "//div[contains(@class, 'btn-3dDLy') " - "and .//text()[contains(., '学')] " - "and not(.//text()[contains(., '已学完')])]") - unit = '节课' - else: - btns = self.driver.find_elements( - By.XPATH, - "//div[contains(@class, 'btn-3dDLy')][contains(., '测一测') or contains(., '继续答')]") - unit = '张试卷' - logging.info(f'该天还剩 {len(btns)} {unit}') - for i in range(len(btns)): - logging.info(f'第 {i + 1} / {len(btns)} {unit}') - try: - if self.mode == 'watch': - self.finish_a_lesson(btns[i]) - else: - self.finist_a_test(btns[i]) - except: - # 似乎现在不存在这种特殊情况了,但这些逻辑还是留着吧,防止看一半程序暴毙 - # # 出现特殊情况,则跳过,不影响其他课程的完成 - # # 并不是所有课都是视频,还有 FM、试卷等 - # # 对于 FM,只要点进去了就是完成 - # # 对于试卷,留给人来处理 - logging.error(traceback.format_exc()) - logging.warning('该课已跳过') - logging.warning('如果这是视频课,请报告 bug') - # 关闭页面,返回首页 - self.close_and_switch() - - def click_and_switch(self, btn: WebElement): - """ - 点击按钮并切换到新页面 - :param btn: 要点击的按钮 - """ - self.click(btn) - time.sleep(1) # 给新页面反应一会 - # 切换到当前页面 - handles = self.driver.window_handles - self.driver.switch_to.window(handles[1]) - - def close_and_switch(self): - """关闭当前页面并返回到首页""" - handles = self.driver.window_handles - self.driver.close() - self.driver.switch_to.window(handles[0]) - time.sleep(1) - - def finish_a_lesson(self, btn: WebElement) -> None: - """ - 完成一节课,应对各种突发情况 - :param btn: “学”按钮 - :return: None - """ - self.click_and_switch(btn) - - video = self.driver.find_element(By.TAG_NAME, 'video') - - # 有时需要手动点播放 - try: - time.sleep(3) - self.driver.find_element(By.CLASS_NAME, 'vjs-big-play-button').click() - logging.info('手动开始播放视频') - except: - pass - - while not video.get_attribute('ended'): - # 老师敲黑板,帮你暂停一下 - # 看看你在不在认真听课~ - try: - self.driver.find_element(By.XPATH, "//*[contains(text(), '点击通过检查')]").click() - logging.info('点击了检查点') - except NoSuchElementException: - pass - - time.sleep(1) - - logging.info('好诶~完成啦~') - - self.close_and_switch() - - def finist_a_test(self, btn: WebElement): - """ - 完成一张试卷 - 选择题随机选一个,大题传一个占位图片文件,并自批为满分 - """ - self.click_and_switch(btn) - - # 完成选择题 - options_uls = self.driver.find_elements(By.CLASS_NAME, 'pm-question-options') - for ul in options_uls: - items = ul.find_elements(By.CSS_SELECTOR, 'li') - # 随机选一个选项 - self.click(random.choice(items)) - time.sleep(0.2) - - time.sleep(1) - - # # 完成大题 - # 完成个蛋,我研究了一整天怎么上传图片,结果偶然发现其实不需要上传图片也可以自批 qwq - # 气笑了 - - # 提交 - self.click(self.driver.find_element(By.CLASS_NAME, 'ant-btn-primary')) - time.sleep(1) - self.click(self.driver.find_element(By.CLASS_NAME, 'confirm-right')) - time.sleep(5) - - # 自批满分(不一定有此环节) - n = len(self.driver.find_elements(By.CSS_SELECTOR, '.content-left-scroll > ul > li')) - if n != 0: - for i in range(n): - self.click(self.driver.find_element(By.CSS_SELECTOR, '.content-right-scroll > ul > li:last-child')) - time.sleep(2) - self.click(self.driver.find_element(By.CLASS_NAME, 'content-main-footer_submit_btn_full')) - time.sleep(1) - self.click(self.driver.find_element(By.CLASS_NAME, 'confirm-right')) - time.sleep(3) - - self.close_and_switch() From bc33b01c71a912d6e112b6166a384b8c1912bd04 Mon Sep 17 00:00:00 2001 From: DingerBtn Date: Tue, 22 Jul 2025 17:17:42 +0800 Subject: [PATCH 16/31] =?UTF-8?q?=E9=87=8D=E6=9E=84=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/AutoPaper/get_info_by_current_url.py | 0 src/auto_paper/auto_paper.py | 97 +++++++++ .../get_corret_answer_v2.py | 0 src/auto_paper/get_info_by_current_url.py | 31 +++ .../get_question_id_v2.py | 2 + .../get_token_by_se.py | 0 src/auto_video/auto_video.py | 102 +++++++++ src/main.py | 74 +++---- src/utils.py | 101 +++++++++ src/viewer.py | 199 ------------------ 10 files changed, 362 insertions(+), 244 deletions(-) delete mode 100644 src/AutoPaper/get_info_by_current_url.py create mode 100644 src/auto_paper/auto_paper.py rename src/{AutoPaper => auto_paper}/get_corret_answer_v2.py (100%) create mode 100644 src/auto_paper/get_info_by_current_url.py rename src/{AutoPaper => auto_paper}/get_question_id_v2.py (98%) rename src/{AutoPaper => auto_paper}/get_token_by_se.py (100%) create mode 100644 src/auto_video/auto_video.py create mode 100644 src/utils.py delete mode 100644 src/viewer.py diff --git a/src/AutoPaper/get_info_by_current_url.py b/src/AutoPaper/get_info_by_current_url.py deleted file mode 100644 index e69de29..0000000 diff --git a/src/auto_paper/auto_paper.py b/src/auto_paper/auto_paper.py new file mode 100644 index 0000000..8b63b47 --- /dev/null +++ b/src/auto_paper/auto_paper.py @@ -0,0 +1,97 @@ +# +# Created by 着火的冰块nya (zhdbk3) on 2025/1/23 +# + +import time +import logging +import traceback +from typing import Literal +import random + +from selenium.webdriver.common.by import By +from selenium.webdriver.remote.webelement import WebElement + +from utils import click, click_and_switch, close_and_switch + +class AutoPaper: + def __init__(self, driver, config): + """ + 自动刷试卷程序的主体 + :param driver: 浏览器驱动实例 + :param config: 读取的配置文件 + """ + self.mode: Literal['test'] = config['mode'] + if self.mode != 'test': + logging.error('mode 只能是 test,请检查配置文件!') + exit(1) + + self.driver = driver + self.finish_days_list() + + def finish_days_list(self) -> None: + """完成所有天""" + time.sleep(5) + days = self.driver.find_elements(By.CSS_SELECTOR, 'li[data-active="true"], li[data-active="false"]') + logging.info(f'一共有 {len(days)} 天的任务') + for i in range(len(days)): + logging.info(f'================ 第 {i + 1} / {len(days)} 天 ================') + self.finish_a_day(days[i]) + + def finish_a_day(self, day: WebElement) -> None: + """ + 完成一天的任务 + :param day: 该天在网页上的标签 + :return: None + """ + click(self.driver, day) + time.sleep(2) + btns = self.driver.find_elements( + By.XPATH, + "//div[contains(@class, 'btn-3dDLy')][contains(., '测一测') or contains(., '继续答')]") + unit = '张试卷' + logging.info(f'该天还剩 {len(btns)} {unit}') + for i in range(len(btns)): + logging.info(f'第 {i + 1} / {len(btns)} {unit}') + try: + self.finish_a_test(btns[i]) + except: + logging.error(traceback.format_exc()) + logging.warning('该试卷已跳过') + # 关闭页面,返回首页 + close_and_switch(self.driver) + + def finish_a_test(self, btn: WebElement): + """ + 完成一张试卷 + 选择题随机选一个,大题传一个占位图片文件,并自批为满分 + """ + click_and_switch(self.driver, btn) + + # 完成选择题 + options_uls = self.driver.find_elements(By.CLASS_NAME, 'pm-question-options') + for ul in options_uls: + items = ul.find_elements(By.CSS_SELECTOR, 'li') + # 随机选一个选项 + click(self.driver, random.choice(items)) + time.sleep(0.2) + + time.sleep(1) + + # 提交 + click(self.driver, self.driver.find_element(By.CLASS_NAME, 'ant-btn-primary')) + time.sleep(1) + click(self.driver, self.driver.find_element(By.CLASS_NAME, 'confirm-right')) + time.sleep(5) + + # 自批满分(不一定有此环节) + n = len(self.driver.find_elements(By.CSS_SELECTOR, '.content-left-scroll > ul > li')) + if n != 0: + for i in range(n): + click(self.driver, self.driver.find_element(By.CSS_SELECTOR, '.content-right-scroll > ul > li:last-child')) + time.sleep(2) + click(self.driver, self.driver.find_element(By.CLASS_NAME, 'content-main-footer_submit_btn_full')) + time.sleep(1) + click(self.driver, self.driver.find_element(By.CLASS_NAME, 'confirm-right')) + time.sleep(3) + + close_and_switch(self.driver) \ No newline at end of file diff --git a/src/AutoPaper/get_corret_answer_v2.py b/src/auto_paper/get_corret_answer_v2.py similarity index 100% rename from src/AutoPaper/get_corret_answer_v2.py rename to src/auto_paper/get_corret_answer_v2.py diff --git a/src/auto_paper/get_info_by_current_url.py b/src/auto_paper/get_info_by_current_url.py new file mode 100644 index 0000000..bf68e67 --- /dev/null +++ b/src/auto_paper/get_info_by_current_url.py @@ -0,0 +1,31 @@ +from urllib.parse import parse_qs + +def get_info_from_url(paper_url): + """ + 从给定的 URL 中提取查询参数并返回一个字典。 + + :param paper_url: 包含查询参数的 URL 字符串 + :return: 包含 URL 中所有查询参数的字典 + """ + # 找到 ? 的索引位置 + query_start_index = paper_url.find('?') + if query_start_index == -1: + # 如果没有找到 ?,说明没有查询参数,返回空字典 + return {} + # 提取 ? 后面的查询字符串 + query_string = paper_url[query_start_index + 1:] + # 解析查询字符串为字典 + query_params = parse_qs(query_string) + # 将字典的值从列表转换为单个值 + return {key: value[0] for key, value in query_params.items()} + +if __name__ == '__main__': + test_urls = [ + "https://web.ewt360.com/mystudy/#/exam/answer?paperId=1990849016816197771&bizCode=205&platform=1&videoPoint=1&homeworkId=10389626", + ] + + for url in test_urls: + result = get_info_from_url(url) + print(f"测试 URL: {url}") + print(f"解析结果: {result}") + print("-" * 50) \ No newline at end of file diff --git a/src/AutoPaper/get_question_id_v2.py b/src/auto_paper/get_question_id_v2.py similarity index 98% rename from src/AutoPaper/get_question_id_v2.py rename to src/auto_paper/get_question_id_v2.py index 0d5b736..2fe9fb3 100644 --- a/src/AutoPaper/get_question_id_v2.py +++ b/src/auto_paper/get_question_id_v2.py @@ -1,3 +1,5 @@ +# 此模块疑似没有作用,但先保留着,以备不时之需 + import requests import json diff --git a/src/AutoPaper/get_token_by_se.py b/src/auto_paper/get_token_by_se.py similarity index 100% rename from src/AutoPaper/get_token_by_se.py rename to src/auto_paper/get_token_by_se.py diff --git a/src/auto_video/auto_video.py b/src/auto_video/auto_video.py new file mode 100644 index 0000000..25d6ce8 --- /dev/null +++ b/src/auto_video/auto_video.py @@ -0,0 +1,102 @@ +# +# Created by 着火的冰块nya (zhdbk3) on 2025/1/23 +# + +import time +import logging +import traceback +from typing import Literal + +from selenium.webdriver.common.by import By +from selenium.webdriver.remote.webelement import WebElement +from selenium.common.exceptions import NoSuchElementException + +from utils import click, click_and_switch, close_and_switch + +class AutoVideo: + def __init__(self, driver, config): + """ + 自动看课程序的主体 + :param driver: 浏览器驱动实例 + :param config: 读取的配置文件 + """ + self.mode: Literal['watch'] = config['mode'] + if self.mode != 'watch': + logging.error('mode 只能是 watch,请检查配置文件!') + exit(1) + + self.driver = driver + self.finish_days_list() + + def finish_days_list(self) -> None: + """完成所有天""" + time.sleep(5) + days = self.driver.find_elements(By.CSS_SELECTOR, 'li[data-active="true"], li[data-active="false"]') + logging.info(f'一共有 {len(days)} 天的任务') + for i in range(len(days)): + logging.info(f'================ 第 {i + 1} / {len(days)} 天 ================') + self.finish_a_day(days[i]) + + def finish_a_day(self, day: WebElement) -> None: + """ + 完成一天的任务 + :param day: 该天在网页上的标签 + :return: None + """ + click(self.driver, day) + time.sleep(2) + btns = self.driver.find_elements( + By.XPATH, + "//div[contains(@class, 'btn-3dDLy') " + "and .//text()[contains(., '学')] " + "and not(.//text()[contains(., '已学完')])]") + unit = '节课' + logging.info(f'该天还剩 {len(btns)} {unit}') + for i in range(len(btns)): + logging.info(f'第 {i + 1} / {len(btns)} {unit}') + try: + self.finish_a_lesson(btns[i]) + except: + # 似乎现在不存在这种特殊情况了,但这些逻辑还是留着吧,防止看一半程序暴毙 + # # 出现特殊情况,则跳过,不影响其他课程的完成 + # # 并不是所有课都是视频,还有 FM、试卷等 + # # 对于 FM,只要点进去了就是完成 + # # 对于试卷,留给人来处理 + logging.error(traceback.format_exc()) + logging.warning('该课已跳过') + logging.warning('如果这是视频课,请报告 bug') + # 关闭页面,返回首页 + close_and_switch(self.driver) + + def finish_a_lesson(self, btn: WebElement) -> None: + """ + 完成一节课,应对各种突发情况 + :param btn: “学”按钮 + :return: None + """ + click_and_switch(self.driver, btn) + + video = self.driver.find_element(By.TAG_NAME, 'video') + + # 有时需要手动点播放 + try: + time.sleep(3) + self.driver.find_element(By.CLASS_NAME, 'vjs-big-play-button').click() + logging.info('手动开始播放视频') + except: + pass + + while not video.get_attribute('ended'): + # 老师敲黑板,帮你暂停一下 + # 看看你在不在认真听课~ + try: + self.driver.find_element(By.XPATH, "//*[contains(text(), '点击通过检查')]").click() + logging.info('点击了检查点') + except NoSuchElementException: + pass + + time.sleep(1) + + logging.info('好诶~完成啦~') + + close_and_switch(self.driver) \ No newline at end of file diff --git a/src/main.py b/src/main.py index 1aee8cd..768356f 100644 --- a/src/main.py +++ b/src/main.py @@ -2,61 +2,45 @@ # Created by 着火的冰块nya (zhdbk3) on 2025/1/23 # -import os -import datetime -import logging import traceback - -import yaml +from utils import init_logging, read_config, init_driver, login +from auto_video.auto_video import AutoVideo +from auto_paper.auto_paper import AutoPaper from selenium.common.exceptions import StaleElementReferenceException +import logging +import time + +init_logging() -from viewer import Viewer - -# 如果不存在 log 文件夹,则创建 -if not os.path.exists('log'): - os.makedirs('log') -# 初始化日志 -now = datetime.datetime.now().strftime('%Y-%m-%d_%H.%M.%S') -logging.basicConfig( - level=logging.INFO, - format='[%(asctime)s %(levelname)s] %(message)s', - datefmt='%Y-%m-%d %H:%M:%S', - handlers=[logging.StreamHandler(), logging.FileHandler(f'log/log_{now}.txt', encoding='utf-8')], -) - -''' -配置文件样例: -# 修改时不要删掉冒号后的空格 -browser: 浏览器名称(首字母大写),如 Chrome, Edge 等 -driver_path: 浏览器驱动路径 -username: 用户名 -password: 密码 -list_url: 课程列表页面的链接 -# 浏览器启动时的参数,这里给了个静音 -options: --mute-audio -# AutoEwt 模式,选填 watch(看课)/ test(做试卷) -mode: watch -''' -with open('config.yml', encoding='utf-8') as f: - config = yaml.load(f, yaml.FullLoader) - # 密码可能是纯数字 - config['password'] = str(config['password']) - logging.info('成功读取到配置文件') +config = read_config() logging.info('启动!') -num_abnormal_collapse = 0 +retry_count = 0 +retry_interval = 3 # 初始重试间隔为 3 秒 + while True: try: - viewer = Viewer(config) + driver = init_driver(config) + login(driver, config['username'], config['password']) + if config['mode'] == 'watch': + AutoVideo(driver, config) + elif config['mode'] == 'test': + AutoPaper(driver, config) + + break # 如果程序正常执行完毕,退出循环 except StaleElementReferenceException: logging.error(traceback.format_exc()) logging.info('程序崩溃,正在自动重启……') logging.info('这是由于页面自动刷新导致的元素查找错误,是正常现象') - except: + except Exception as e: logging.critical(traceback.format_exc()) - logging.critical('程序异常崩溃,请报告 bug,正在自动重启……') - num_abnormal_collapse += 1 - if num_abnormal_collapse >= 5: - logging.critical('异常崩溃次数过多,已停止程序') - break + logging.critical(f'程序异常崩溃,错误信息: {str(e)},正在自动重启……') + finally: + if 'driver' in locals(): + driver.quit() + + retry_count += 1 + logging.info(f'第 {retry_count} 次重试,将在 {retry_interval} 秒后进行') + time.sleep(retry_interval) + retry_interval *= 2 # 每次重试间隔时间翻倍 \ No newline at end of file diff --git a/src/utils.py b/src/utils.py new file mode 100644 index 0000000..592a5c4 --- /dev/null +++ b/src/utils.py @@ -0,0 +1,101 @@ +# +# 此模块用于存储通用的工具函数 +# + +import os +import datetime +import logging +import time +import yaml +from selenium import webdriver +from selenium.webdriver.remote.webelement import WebElement + +def init_logging(): + # 如果不存在 log 文件夹,则创建 + if not os.path.exists('log'): + os.makedirs('log') + # 初始化日志 + now = datetime.datetime.now().strftime('%Y-%m-%d_%H.%M.%S') + logging.basicConfig( + level=logging.INFO, + format='[%(asctime)s %(levelname)s] %(message)s', + datefmt='%Y-%m-%d %H:%M:%S', + handlers=[logging.StreamHandler(), logging.FileHandler(f'log/log_{now}.txt', encoding='utf-8')], + ) + +def read_config(): + ''' + 配置文件样例: + # 修改时不要删掉冒号后的空格 + browser: 浏览器名称(首字母大写),如 Chrome, Edge 等 + driver_path: 浏览器驱动路径 + username: 用户名 + password: 密码 + list_url: 课程列表页面的链接 + # 浏览器启动时的参数,这里给了个静音 + options: --mute-audio + # AutoEwt 模式,选填 watch(看课)/ test(做试卷) + mode: watch + ''' + if not os.path.exists('config.yml'): + logging.error('配置文件 config.yml 不存在,请检查!') + exit(1) + with open('config.yml', encoding='utf-8') as f: + config = yaml.load(f, yaml.FullLoader) + # 密码可能是纯数字 + config['password'] = str(config['password']) + logging.info('成功读取到配置文件') + return config + +def init_driver(config): + browser = config['browser'] + + options = getattr(webdriver, browser.lower()).options.Options() + options.add_argument(config['options']) + driver = getattr(webdriver, browser)( + service=getattr(webdriver, browser.lower()).service.Service(config['driver_path']), + options=options + ) + driver.maximize_window() + driver.get(config['list_url']) + driver.implicitly_wait(3) + return driver + +def login(driver, username, password): + from selenium.webdriver.common.by import By # 导入 By 类 + logging.info('登录账号……') + # 使用新的定位方式 By.ID + driver.find_element(By.ID, 'login__password_userName').send_keys(username) + driver.find_element(By.ID, 'login__password_password').send_keys(password) + # 使用新的定位方式 By.CLASS_NAME + driver.find_element(By.CLASS_NAME, 'ant-btn-block').submit() + + +def click(driver, btn: WebElement) -> None: + """ + 通过调用 .click(); 事件点击一个按钮,这比直接在 Python 中 .click() 更稳定 + 对于可能被遮挡而无法点击的按钮,应使用此方法 + :param driver: 浏览器驱动实例 + :param btn: 要点击的按钮 + :return: None + """ + driver.execute_script('arguments[0].click();', btn) + +def click_and_switch(driver, btn: WebElement): + """ + 点击按钮并切换到新页面 + :param driver: 浏览器驱动实例 + :param btn: 要点击的按钮 + """ + click(driver, btn) + time.sleep(1) # 给新页面反应一会 + # 切换到当前页面 + handles = driver.window_handles + driver.switch_to.window(handles[1]) + +def close_and_switch(driver): + """关闭当前页面并返回到首页""" + handles = driver.window_handles + driver.close() + driver.switch_to.window(handles[0]) + time.sleep(1) \ No newline at end of file diff --git a/src/viewer.py b/src/viewer.py deleted file mode 100644 index 1ceb818..0000000 --- a/src/viewer.py +++ /dev/null @@ -1,199 +0,0 @@ -# -# Created by 着火的冰块nya (zhdbk3) on 2025/1/23 -# - -import time -import logging -import traceback -from typing import Literal -import random - -from selenium import webdriver -from selenium.webdriver.common.by import By -from selenium.webdriver.remote.webelement import WebElement -from selenium.common.exceptions import NoSuchElementException - - -class Viewer: - def __init__(self, config: dict): - """ - 自动刷课程序的主体 - :param config: 读取的配置文件 - """ - self.mode: Literal['watch', 'test'] = config['mode'] - if self.mode not in ['watch', 'test']: - logging.error('mode 只能是 watch 或 test,请检查配置文件!') - exit(1) - - self.username = config['username'] - self.password = config['password'] - - browser = config['browser'] - - options = getattr(webdriver, browser.lower()).options.Options() - options.add_argument(config['options']) - self.driver: webdriver.Edge = getattr(webdriver, browser)( - service=getattr(webdriver, browser.lower()).service.Service(config['driver_path']), - options=options - ) - self.driver.maximize_window() - self.driver.get(config['list_url']) - self.driver.implicitly_wait(3) - - self.login() - self.finish_days_list() - - def login(self) -> None: - logging.info('登录账号……') - self.driver.find_element(By.ID, 'login__password_userName').send_keys(self.username) - self.driver.find_element(By.ID, 'login__password_password').send_keys(self.password) - self.driver.find_element(By.CLASS_NAME, 'ant-btn-block').submit() - - def click(self, btn: WebElement) -> None: - """ - 通过调用 .click(); 事件点击一个按钮,这比直接在 Python 中 .click() 更稳定 - 对于可能被遮挡而无法点击的按钮,应使用此方法 - :param btn: 要点击的按钮 - :return: None - """ - self.driver.execute_script('arguments[0].click();', btn) - - def finish_days_list(self) -> None: - """完成所有天""" - time.sleep(5) - days = self.driver.find_elements(By.CSS_SELECTOR, 'li[data-active="true"], li[data-active="false"]') - logging.info(f'一共有 {len(days)} 天的任务') - for i in range(len(days)): - logging.info(f'================ 第 {i + 1} / {len(days)} 天 ================') - self.finish_a_day(days[i]) - - def finish_a_day(self, day: WebElement) -> None: - """ - 完成一天的任务 - :param day: 该天在网页上的标签 - :return: None - """ - self.click(day) - time.sleep(2) - if self.mode == 'watch': - btns = self.driver.find_elements( - By.XPATH, - "//div[contains(@class, 'btn-3dDLy') " - "and .//text()[contains(., '学')] " - "and not(.//text()[contains(., '已学完')])]") - unit = '节课' - else: - btns = self.driver.find_elements( - By.XPATH, - "//div[contains(@class, 'btn-3dDLy')][contains(., '测一测') or contains(., '继续答')]") - unit = '张试卷' - logging.info(f'该天还剩 {len(btns)} {unit}') - for i in range(len(btns)): - logging.info(f'第 {i + 1} / {len(btns)} {unit}') - try: - if self.mode == 'watch': - self.finish_a_lesson(btns[i]) - else: - self.finist_a_test(btns[i]) - except: - # 似乎现在不存在这种特殊情况了,但这些逻辑还是留着吧,防止看一半程序暴毙 - # # 出现特殊情况,则跳过,不影响其他课程的完成 - # # 并不是所有课都是视频,还有 FM、试卷等 - # # 对于 FM,只要点进去了就是完成 - # # 对于试卷,留给人来处理 - logging.error(traceback.format_exc()) - logging.warning('该课已跳过') - logging.warning('如果这是视频课,请报告 bug') - # 关闭页面,返回首页 - self.close_and_switch() - - def click_and_switch(self, btn: WebElement): - """ - 点击按钮并切换到新页面 - :param btn: 要点击的按钮 - """ - self.click(btn) - time.sleep(1) # 给新页面反应一会 - # 切换到当前页面 - handles = self.driver.window_handles - self.driver.switch_to.window(handles[1]) - - def close_and_switch(self): - """关闭当前页面并返回到首页""" - handles = self.driver.window_handles - self.driver.close() - self.driver.switch_to.window(handles[0]) - time.sleep(1) - - def finish_a_lesson(self, btn: WebElement) -> None: - """ - 完成一节课,应对各种突发情况 - :param btn: “学”按钮 - :return: None - """ - self.click_and_switch(btn) - - video = self.driver.find_element(By.TAG_NAME, 'video') - - # 有时需要手动点播放 - try: - time.sleep(3) - self.driver.find_element(By.CLASS_NAME, 'vjs-big-play-button').click() - logging.info('手动开始播放视频') - except: - pass - - while not video.get_attribute('ended'): - # 老师敲黑板,帮你暂停一下 - # 看看你在不在认真听课~ - try: - self.driver.find_element(By.XPATH, "//*[contains(text(), '点击通过检查')]").click() - logging.info('点击了检查点') - except NoSuchElementException: - pass - - time.sleep(1) - - logging.info('好诶~完成啦~') - - self.close_and_switch() - - def finist_a_test(self, btn: WebElement): - """ - 完成一张试卷 - 选择题随机选一个,大题传一个占位图片文件,并自批为满分 - """ - self.click_and_switch(btn) - - # 完成选择题 - options_uls = self.driver.find_elements(By.CLASS_NAME, 'pm-question-options') - for ul in options_uls: - items = ul.find_elements(By.CSS_SELECTOR, 'li') - # 随机选一个选项 - self.click(random.choice(items)) - time.sleep(0.2) - - time.sleep(1) - - # # 完成大题 - # 完成个蛋,我研究了一整天怎么上传图片,结果偶然发现其实不需要上传图片也可以自批 qwq - # 气笑了 - - # 提交 - self.click(self.driver.find_element(By.CLASS_NAME, 'ant-btn-primary')) - time.sleep(1) - self.click(self.driver.find_element(By.CLASS_NAME, 'confirm-right')) - time.sleep(5) - - # 自批满分(不一定有此环节) - n = len(self.driver.find_elements(By.CSS_SELECTOR, '.content-left-scroll > ul > li')) - if n != 0: - for i in range(n): - self.click(self.driver.find_element(By.CSS_SELECTOR, '.content-right-scroll > ul > li:last-child')) - time.sleep(2) - self.click(self.driver.find_element(By.CLASS_NAME, 'content-main-footer_submit_btn_full')) - time.sleep(1) - self.click(self.driver.find_element(By.CLASS_NAME, 'confirm-right')) - time.sleep(3) - - self.close_and_switch() From 6206c08be100b99bcd63298427cc095def408c1d Mon Sep 17 00:00:00 2001 From: DingerBtn Date: Tue, 22 Jul 2025 17:56:40 +0800 Subject: [PATCH 17/31] =?UTF-8?q?=E8=8E=B7=E5=8F=96token=EF=BC=9B=E5=90=84?= =?UTF-8?q?=E7=A7=8D=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/AutoVideo/auto_video.py | 102 ------------------------------ src/auto_paper/auto_paper.py | 6 +- src/auto_paper/get_token_by_se.py | 0 src/auto_video/auto_video.py | 4 -- src/main.py | 5 +- src/utils.py | 18 ++++-- 6 files changed, 18 insertions(+), 117 deletions(-) delete mode 100644 src/AutoVideo/auto_video.py delete mode 100644 src/auto_paper/get_token_by_se.py diff --git a/src/AutoVideo/auto_video.py b/src/AutoVideo/auto_video.py deleted file mode 100644 index 25d6ce8..0000000 --- a/src/AutoVideo/auto_video.py +++ /dev/null @@ -1,102 +0,0 @@ -# -# Created by 着火的冰块nya (zhdbk3) on 2025/1/23 -# - -import time -import logging -import traceback -from typing import Literal - -from selenium.webdriver.common.by import By -from selenium.webdriver.remote.webelement import WebElement -from selenium.common.exceptions import NoSuchElementException - -from utils import click, click_and_switch, close_and_switch - -class AutoVideo: - def __init__(self, driver, config): - """ - 自动看课程序的主体 - :param driver: 浏览器驱动实例 - :param config: 读取的配置文件 - """ - self.mode: Literal['watch'] = config['mode'] - if self.mode != 'watch': - logging.error('mode 只能是 watch,请检查配置文件!') - exit(1) - - self.driver = driver - self.finish_days_list() - - def finish_days_list(self) -> None: - """完成所有天""" - time.sleep(5) - days = self.driver.find_elements(By.CSS_SELECTOR, 'li[data-active="true"], li[data-active="false"]') - logging.info(f'一共有 {len(days)} 天的任务') - for i in range(len(days)): - logging.info(f'================ 第 {i + 1} / {len(days)} 天 ================') - self.finish_a_day(days[i]) - - def finish_a_day(self, day: WebElement) -> None: - """ - 完成一天的任务 - :param day: 该天在网页上的标签 - :return: None - """ - click(self.driver, day) - time.sleep(2) - btns = self.driver.find_elements( - By.XPATH, - "//div[contains(@class, 'btn-3dDLy') " - "and .//text()[contains(., '学')] " - "and not(.//text()[contains(., '已学完')])]") - unit = '节课' - logging.info(f'该天还剩 {len(btns)} {unit}') - for i in range(len(btns)): - logging.info(f'第 {i + 1} / {len(btns)} {unit}') - try: - self.finish_a_lesson(btns[i]) - except: - # 似乎现在不存在这种特殊情况了,但这些逻辑还是留着吧,防止看一半程序暴毙 - # # 出现特殊情况,则跳过,不影响其他课程的完成 - # # 并不是所有课都是视频,还有 FM、试卷等 - # # 对于 FM,只要点进去了就是完成 - # # 对于试卷,留给人来处理 - logging.error(traceback.format_exc()) - logging.warning('该课已跳过') - logging.warning('如果这是视频课,请报告 bug') - # 关闭页面,返回首页 - close_and_switch(self.driver) - - def finish_a_lesson(self, btn: WebElement) -> None: - """ - 完成一节课,应对各种突发情况 - :param btn: “学”按钮 - :return: None - """ - click_and_switch(self.driver, btn) - - video = self.driver.find_element(By.TAG_NAME, 'video') - - # 有时需要手动点播放 - try: - time.sleep(3) - self.driver.find_element(By.CLASS_NAME, 'vjs-big-play-button').click() - logging.info('手动开始播放视频') - except: - pass - - while not video.get_attribute('ended'): - # 老师敲黑板,帮你暂停一下 - # 看看你在不在认真听课~ - try: - self.driver.find_element(By.XPATH, "//*[contains(text(), '点击通过检查')]").click() - logging.info('点击了检查点') - except NoSuchElementException: - pass - - time.sleep(1) - - logging.info('好诶~完成啦~') - - close_and_switch(self.driver) \ No newline at end of file diff --git a/src/auto_paper/auto_paper.py b/src/auto_paper/auto_paper.py index 8b63b47..4316b82 100644 --- a/src/auto_paper/auto_paper.py +++ b/src/auto_paper/auto_paper.py @@ -21,10 +21,6 @@ def __init__(self, driver, config): :param config: 读取的配置文件 """ self.mode: Literal['test'] = config['mode'] - if self.mode != 'test': - logging.error('mode 只能是 test,请检查配置文件!') - exit(1) - self.driver = driver self.finish_days_list() @@ -63,7 +59,7 @@ def finish_a_day(self, day: WebElement) -> None: def finish_a_test(self, btn: WebElement): """ 完成一张试卷 - 选择题随机选一个,大题传一个占位图片文件,并自批为满分 + 选择题随机选一个,大题**并不**传一个占位图片文件[doge],并自批为满分 """ click_and_switch(self.driver, btn) diff --git a/src/auto_paper/get_token_by_se.py b/src/auto_paper/get_token_by_se.py deleted file mode 100644 index e69de29..0000000 diff --git a/src/auto_video/auto_video.py b/src/auto_video/auto_video.py index 25d6ce8..36e9443 100644 --- a/src/auto_video/auto_video.py +++ b/src/auto_video/auto_video.py @@ -21,10 +21,6 @@ def __init__(self, driver, config): :param config: 读取的配置文件 """ self.mode: Literal['watch'] = config['mode'] - if self.mode != 'watch': - logging.error('mode 只能是 watch,请检查配置文件!') - exit(1) - self.driver = driver self.finish_days_list() diff --git a/src/main.py b/src/main.py index 768356f..3ea271a 100644 --- a/src/main.py +++ b/src/main.py @@ -22,12 +22,13 @@ while True: try: driver = init_driver(config) - login(driver, config['username'], config['password']) + # 登录并获取 token + token = login(driver, config['username'], config['password']) + print(f"登录成功,Token: {token}") if config['mode'] == 'watch': AutoVideo(driver, config) elif config['mode'] == 'test': AutoPaper(driver, config) - break # 如果程序正常执行完毕,退出循环 except StaleElementReferenceException: logging.error(traceback.format_exc()) diff --git a/src/utils.py b/src/utils.py index 592a5c4..9e02fe4 100644 --- a/src/utils.py +++ b/src/utils.py @@ -9,6 +9,7 @@ import yaml from selenium import webdriver from selenium.webdriver.remote.webelement import WebElement +from selenium.webdriver.common.by import By def init_logging(): # 如果不存在 log 文件夹,则创建 @@ -45,6 +46,9 @@ def read_config(): # 密码可能是纯数字 config['password'] = str(config['password']) logging.info('成功读取到配置文件') + if config['mode'] not in ['watch', 'test']: + logging.error('mode 只能是 watch 或 test,请检查配置文件!') + exit(1) return config def init_driver(config): @@ -62,14 +66,20 @@ def init_driver(config): return driver def login(driver, username, password): - from selenium.webdriver.common.by import By # 导入 By 类 logging.info('登录账号……') - # 使用新的定位方式 By.ID driver.find_element(By.ID, 'login__password_userName').send_keys(username) driver.find_element(By.ID, 'login__password_password').send_keys(password) - # 使用新的定位方式 By.CLASS_NAME driver.find_element(By.CLASS_NAME, 'ant-btn-block').submit() - + # 等待一段时间,确保页面加载完成并生成 token + time.sleep(3) + # 获取所有 cookie + cookies = driver.get_cookies() + token = None + for cookie in cookies: + if cookie['name'] == 'token': + token = cookie['value'] + break + return token def click(driver, btn: WebElement) -> None: """ From 5287f9b1077424cdfbf2bcdd73f694bae527d4ca Mon Sep 17 00:00:00 2001 From: DingerBtn Date: Tue, 22 Jul 2025 18:53:43 +0800 Subject: [PATCH 18/31] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/auto_paper/get_corret_answer_v2.py | 12 +++++------- src/main.py | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/auto_paper/get_corret_answer_v2.py b/src/auto_paper/get_corret_answer_v2.py index 4ccbb00..a58ea94 100644 --- a/src/auto_paper/get_corret_answer_v2.py +++ b/src/auto_paper/get_corret_answer_v2.py @@ -2,16 +2,14 @@ import json -def get_answer(bizCode:str, homeworkId:str, userId:str, paperId:str, reportId:str, questionId:str, token:str): +def get_answer(bizCode:str, paperId:str, reportId:str, questionId:str, token:str): """获取指定试卷的单选题和多选题正确答案 通过调用EWT360 API获取指定用户的作业报告,解析并返回题目ID与正确答案的映射 很多地方写的很不规范,一部分是不得不和 ewt 统一,还其它的看到就改一下吧qwq - :param bizCode: 业务ID,见于url - :param homeworkId: 作业ID - :param userId: 用户唯一标识 + :param bizCode: 业务ID :param paperId: 试卷ID :param reportId: 报告ID,如果需要获取未完成的试卷的答案,需要传入一个已完成的reportId :param questionId: 问题ID @@ -109,9 +107,9 @@ def parse_questions(questions): if __name__ == '__main__': bizCode = '205' homeworkId='10389626' - userId='' + userId='151028179' paperId='1986397841559642844' reportId='2040988842982768934' questionId='1176211251046524293' - token = '' - print(get_answer(bizCode,homeworkId,userId,paperId,reportId,questionId,token)) \ No newline at end of file + token = '151028179-1-' + print(get_answer(bizCode,paperId,reportId,questionId,token)) \ No newline at end of file diff --git a/src/main.py b/src/main.py index 3ea271a..f74fb25 100644 --- a/src/main.py +++ b/src/main.py @@ -24,7 +24,7 @@ driver = init_driver(config) # 登录并获取 token token = login(driver, config['username'], config['password']) - print(f"登录成功,Token: {token}") + logging.info(f"登录成功,Token: {token}") if config['mode'] == 'watch': AutoVideo(driver, config) elif config['mode'] == 'test': From 9bbba0de965ad305ed05d228d3b11d49cdfc9775 Mon Sep 17 00:00:00 2001 From: zhdbk3 Date: Wed, 23 Jul 2025 10:26:02 +0800 Subject: [PATCH 19/31] =?UTF-8?q?=E4=BD=BF=E7=94=A8=20uv?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .python-version | 1 + pyproject.toml | 16 +++ uv.lock | 308 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 325 insertions(+) create mode 100644 .python-version create mode 100644 pyproject.toml create mode 100644 uv.lock diff --git a/.python-version b/.python-version new file mode 100644 index 0000000..e4fba21 --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.12 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..856cca6 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,16 @@ +[project] +name = "autoewt" +version = "0.5.0" +description = "Add your description here" +readme = "README.md" +requires-python = ">=3.12" +dependencies = [ + "jsons~=1.1.1", + "pyyaml~=6.0.2", + "requests~=2.32.4", + "selenium~=4.34.2", +] + +[[tool.uv.index]] +url = "https://mirrors.aliyun.com/pypi/simple" +default = true diff --git a/uv.lock b/uv.lock new file mode 100644 index 0000000..31503f0 --- /dev/null +++ b/uv.lock @@ -0,0 +1,308 @@ +version = 1 +revision = 2 +requires-python = ">=3.12" + +[[package]] +name = "attrs" +version = "25.3.0" +source = { registry = "https://mirrors.aliyun.com/pypi/simple" } +sdist = { url = "https://mirrors.aliyun.com/pypi/packages/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz", hash = "sha256:75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b" } +wheels = [ + { url = "https://mirrors.aliyun.com/pypi/packages/77/06/bb80f5f86020c4551da315d78b3ab75e8228f89f0162f2c3a819e407941a/attrs-25.3.0-py3-none-any.whl", hash = "sha256:427318ce031701fea540783410126f03899a97ffc6f61596ad581ac2e40e3bc3" }, +] + +[[package]] +name = "autoewt" +version = "0.5.0" +source = { virtual = "." } +dependencies = [ + { name = "jsons" }, + { name = "pyyaml" }, + { name = "requests" }, + { name = "selenium" }, +] + +[package.metadata] +requires-dist = [ + { name = "jsons", specifier = "~=1.1.1" }, + { name = "pyyaml", specifier = "~=6.0.2" }, + { name = "requests", specifier = "~=2.32.4" }, + { name = "selenium", specifier = "~=4.34.2" }, +] + +[[package]] +name = "certifi" +version = "2025.7.14" +source = { registry = "https://mirrors.aliyun.com/pypi/simple" } +sdist = { url = "https://mirrors.aliyun.com/pypi/packages/b3/76/52c535bcebe74590f296d6c77c86dabf761c41980e1347a2422e4aa2ae41/certifi-2025.7.14.tar.gz", hash = "sha256:8ea99dbdfaaf2ba2f9bac77b9249ef62ec5218e7c2b2e903378ed5fccf765995" } +wheels = [ + { url = "https://mirrors.aliyun.com/pypi/packages/4f/52/34c6cf5bb9285074dc3531c437b3919e825d976fde097a7a73f79e726d03/certifi-2025.7.14-py3-none-any.whl", hash = "sha256:6b31f564a415d79ee77df69d757bb49a5bb53bd9f756cbbe24394ffd6fc1f4b2" }, +] + +[[package]] +name = "cffi" +version = "1.17.1" +source = { registry = "https://mirrors.aliyun.com/pypi/simple" } +dependencies = [ + { name = "pycparser" }, +] +sdist = { url = "https://mirrors.aliyun.com/pypi/packages/fc/97/c783634659c2920c3fc70419e3af40972dbaf758daa229a7d6ea6135c90d/cffi-1.17.1.tar.gz", hash = "sha256:1c39c6016c32bc48dd54561950ebd6836e1670f2ae46128f67cf49e789c52824" } +wheels = [ + { url = "https://mirrors.aliyun.com/pypi/packages/86/c5/28b2d6f799ec0bdecf44dced2ec5ed43e0eb63097b0f58c293583b406582/cffi-1.17.1-cp312-cp312-win32.whl", hash = "sha256:a08d7e755f8ed21095a310a693525137cfe756ce62d066e53f502a83dc550f65" }, + { url = "https://mirrors.aliyun.com/pypi/packages/50/b9/db34c4755a7bd1cb2d1603ac3863f22bcecbd1ba29e5ee841a4bc510b294/cffi-1.17.1-cp312-cp312-win_amd64.whl", hash = "sha256:51392eae71afec0d0c8fb1a53b204dbb3bcabcb3c9b807eedf3e1e6ccf2de903" }, + { url = "https://mirrors.aliyun.com/pypi/packages/bf/ee/f94057fa6426481d663b88637a9a10e859e492c73d0384514a17d78ee205/cffi-1.17.1-cp313-cp313-win32.whl", hash = "sha256:e03eab0a8677fa80d646b5ddece1cbeaf556c313dcfac435ba11f107ba117b5d" }, + { url = "https://mirrors.aliyun.com/pypi/packages/7c/fc/6a8cb64e5f0324877d503c854da15d76c1e50eb722e320b15345c4d0c6de/cffi-1.17.1-cp313-cp313-win_amd64.whl", hash = "sha256:f6a16c31041f09ead72d69f583767292f750d24913dadacf5756b966aacb3f1a" }, +] + +[[package]] +name = "charset-normalizer" +version = "3.4.2" +source = { registry = "https://mirrors.aliyun.com/pypi/simple" } +sdist = { url = "https://mirrors.aliyun.com/pypi/packages/e4/33/89c2ced2b67d1c2a61c19c6751aa8902d46ce3dacb23600a283619f5a12d/charset_normalizer-3.4.2.tar.gz", hash = "sha256:5baececa9ecba31eff645232d59845c07aa030f0c81ee70184a90d35099a0e63" } +wheels = [ + { url = "https://mirrors.aliyun.com/pypi/packages/d7/a4/37f4d6035c89cac7930395a35cc0f1b872e652eaafb76a6075943754f095/charset_normalizer-3.4.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:0c29de6a1a95f24b9a1aa7aefd27d2487263f00dfd55a77719b530788f75cff7" }, + { url = "https://mirrors.aliyun.com/pypi/packages/ee/8a/1a5e33b73e0d9287274f899d967907cd0bf9c343e651755d9307e0dbf2b3/charset_normalizer-3.4.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cddf7bd982eaa998934a91f69d182aec997c6c468898efe6679af88283b498d3" }, + { url = "https://mirrors.aliyun.com/pypi/packages/66/52/59521f1d8e6ab1482164fa21409c5ef44da3e9f653c13ba71becdd98dec3/charset_normalizer-3.4.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fcbe676a55d7445b22c10967bceaaf0ee69407fbe0ece4d032b6eb8d4565982a" }, + { url = "https://mirrors.aliyun.com/pypi/packages/86/2d/fb55fdf41964ec782febbf33cb64be480a6b8f16ded2dbe8db27a405c09f/charset_normalizer-3.4.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d41c4d287cfc69060fa91cae9683eacffad989f1a10811995fa309df656ec214" }, + { url = "https://mirrors.aliyun.com/pypi/packages/8c/73/6ede2ec59bce19b3edf4209d70004253ec5f4e319f9a2e3f2f15601ed5f7/charset_normalizer-3.4.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4e594135de17ab3866138f496755f302b72157d115086d100c3f19370839dd3a" }, + { url = "https://mirrors.aliyun.com/pypi/packages/09/14/957d03c6dc343c04904530b6bef4e5efae5ec7d7990a7cbb868e4595ee30/charset_normalizer-3.4.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cf713fe9a71ef6fd5adf7a79670135081cd4431c2943864757f0fa3a65b1fafd" }, + { url = "https://mirrors.aliyun.com/pypi/packages/0d/c8/8174d0e5c10ccebdcb1b53cc959591c4c722a3ad92461a273e86b9f5a302/charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:a370b3e078e418187da8c3674eddb9d983ec09445c99a3a263c2011993522981" }, + { url = "https://mirrors.aliyun.com/pypi/packages/58/aa/8904b84bc8084ac19dc52feb4f5952c6df03ffb460a887b42615ee1382e8/charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:a955b438e62efdf7e0b7b52a64dc5c3396e2634baa62471768a64bc2adb73d5c" }, + { url = "https://mirrors.aliyun.com/pypi/packages/c2/26/89ee1f0e264d201cb65cf054aca6038c03b1a0c6b4ae998070392a3ce605/charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:7222ffd5e4de8e57e03ce2cef95a4c43c98fcb72ad86909abdfc2c17d227fc1b" }, + { url = "https://mirrors.aliyun.com/pypi/packages/fd/07/68e95b4b345bad3dbbd3a8681737b4338ff2c9df29856a6d6d23ac4c73cb/charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:bee093bf902e1d8fc0ac143c88902c3dfc8941f7ea1d6a8dd2bcb786d33db03d" }, + { url = "https://mirrors.aliyun.com/pypi/packages/77/1a/5eefc0ce04affb98af07bc05f3bac9094513c0e23b0562d64af46a06aae4/charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:dedb8adb91d11846ee08bec4c8236c8549ac721c245678282dcb06b221aab59f" }, + { url = "https://mirrors.aliyun.com/pypi/packages/37/a0/2410e5e6032a174c95e0806b1a6585eb21e12f445ebe239fac441995226a/charset_normalizer-3.4.2-cp312-cp312-win32.whl", hash = "sha256:db4c7bf0e07fc3b7d89ac2a5880a6a8062056801b83ff56d8464b70f65482b6c" }, + { url = "https://mirrors.aliyun.com/pypi/packages/6c/4f/c02d5c493967af3eda9c771ad4d2bbc8df6f99ddbeb37ceea6e8716a32bc/charset_normalizer-3.4.2-cp312-cp312-win_amd64.whl", hash = "sha256:5a9979887252a82fefd3d3ed2a8e3b937a7a809f65dcb1e068b090e165bbe99e" }, + { url = "https://mirrors.aliyun.com/pypi/packages/ea/12/a93df3366ed32db1d907d7593a94f1fe6293903e3e92967bebd6950ed12c/charset_normalizer-3.4.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:926ca93accd5d36ccdabd803392ddc3e03e6d4cd1cf17deff3b989ab8e9dbcf0" }, + { url = "https://mirrors.aliyun.com/pypi/packages/04/93/bf204e6f344c39d9937d3c13c8cd5bbfc266472e51fc8c07cb7f64fcd2de/charset_normalizer-3.4.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:eba9904b0f38a143592d9fc0e19e2df0fa2e41c3c3745554761c5f6447eedabf" }, + { url = "https://mirrors.aliyun.com/pypi/packages/22/2a/ea8a2095b0bafa6c5b5a55ffdc2f924455233ee7b91c69b7edfcc9e02284/charset_normalizer-3.4.2-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3fddb7e2c84ac87ac3a947cb4e66d143ca5863ef48e4a5ecb83bd48619e4634e" }, + { url = "https://mirrors.aliyun.com/pypi/packages/b6/57/1b090ff183d13cef485dfbe272e2fe57622a76694061353c59da52c9a659/charset_normalizer-3.4.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:98f862da73774290f251b9df8d11161b6cf25b599a66baf087c1ffe340e9bfd1" }, + { url = "https://mirrors.aliyun.com/pypi/packages/e2/28/ffc026b26f441fc67bd21ab7f03b313ab3fe46714a14b516f931abe1a2d8/charset_normalizer-3.4.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c9379d65defcab82d07b2a9dfbfc2e95bc8fe0ebb1b176a3190230a3ef0e07c" }, + { url = "https://mirrors.aliyun.com/pypi/packages/c0/0f/9abe9bd191629c33e69e47c6ef45ef99773320e9ad8e9cb08b8ab4a8d4cb/charset_normalizer-3.4.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e635b87f01ebc977342e2697d05b56632f5f879a4f15955dfe8cef2448b51691" }, + { url = "https://mirrors.aliyun.com/pypi/packages/67/7c/a123bbcedca91d5916c056407f89a7f5e8fdfce12ba825d7d6b9954a1a3c/charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:1c95a1e2902a8b722868587c0e1184ad5c55631de5afc0eb96bc4b0d738092c0" }, + { url = "https://mirrors.aliyun.com/pypi/packages/ec/fe/1ac556fa4899d967b83e9893788e86b6af4d83e4726511eaaad035e36595/charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:ef8de666d6179b009dce7bcb2ad4c4a779f113f12caf8dc77f0162c29d20490b" }, + { url = "https://mirrors.aliyun.com/pypi/packages/2b/ff/acfc0b0a70b19e3e54febdd5301a98b72fa07635e56f24f60502e954c461/charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:32fc0341d72e0f73f80acb0a2c94216bd704f4f0bce10aedea38f30502b271ff" }, + { url = "https://mirrors.aliyun.com/pypi/packages/92/08/95b458ce9c740d0645feb0e96cea1f5ec946ea9c580a94adfe0b617f3573/charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:289200a18fa698949d2b39c671c2cc7a24d44096784e76614899a7ccf2574b7b" }, + { url = "https://mirrors.aliyun.com/pypi/packages/78/be/8392efc43487ac051eee6c36d5fbd63032d78f7728cb37aebcc98191f1ff/charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:4a476b06fbcf359ad25d34a057b7219281286ae2477cc5ff5e3f70a246971148" }, + { url = "https://mirrors.aliyun.com/pypi/packages/44/96/392abd49b094d30b91d9fbda6a69519e95802250b777841cf3bda8fe136c/charset_normalizer-3.4.2-cp313-cp313-win32.whl", hash = "sha256:aaeeb6a479c7667fbe1099af9617c83aaca22182d6cf8c53966491a0f1b7ffb7" }, + { url = "https://mirrors.aliyun.com/pypi/packages/e9/b0/0200da600134e001d91851ddc797809e2fe0ea72de90e09bec5a2fbdaccb/charset_normalizer-3.4.2-cp313-cp313-win_amd64.whl", hash = "sha256:aa6af9e7d59f9c12b33ae4e9450619cf2488e2bbe9b44030905877f0b2324980" }, + { url = "https://mirrors.aliyun.com/pypi/packages/20/94/c5790835a017658cbfabd07f3bfb549140c3ac458cfc196323996b10095a/charset_normalizer-3.4.2-py3-none-any.whl", hash = "sha256:7f56930ab0abd1c45cd15be65cc741c28b1c9a34876ce8c17a2fa107810c0af0" }, +] + +[[package]] +name = "h11" +version = "0.16.0" +source = { registry = "https://mirrors.aliyun.com/pypi/simple" } +sdist = { url = "https://mirrors.aliyun.com/pypi/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz", hash = "sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1" } +wheels = [ + { url = "https://mirrors.aliyun.com/pypi/packages/04/4b/29cac41a4d98d144bf5f6d33995617b185d14b22401f75ca86f384e87ff1/h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86" }, +] + +[[package]] +name = "idna" +version = "3.10" +source = { registry = "https://mirrors.aliyun.com/pypi/simple" } +sdist = { url = "https://mirrors.aliyun.com/pypi/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz", hash = "sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9" } +wheels = [ + { url = "https://mirrors.aliyun.com/pypi/packages/76/c6/c88e154df9c4e1a2a66ccf0005a88dfb2650c1dffb6f5ce603dfbd452ce3/idna-3.10-py3-none-any.whl", hash = "sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3" }, +] + +[[package]] +name = "jsons" +version = "1.1.2" +source = { registry = "https://mirrors.aliyun.com/pypi/simple" } +dependencies = [ + { name = "typish" }, +] +wheels = [ + { url = "https://mirrors.aliyun.com/pypi/packages/d9/a3/50fb6dbe6bef19c346d779ae04618d9bf7c215f5d065e90ca0f05588b089/jsons-1.1.2-py3-none-any.whl", hash = "sha256:7b813225eb4b13b85faa6d911f390f1823b2b94b4bf91598ff056fe21adb25e5" }, +] + +[[package]] +name = "outcome" +version = "1.3.0.post0" +source = { registry = "https://mirrors.aliyun.com/pypi/simple" } +dependencies = [ + { name = "attrs" }, +] +sdist = { url = "https://mirrors.aliyun.com/pypi/packages/98/df/77698abfac98571e65ffeb0c1fba8ffd692ab8458d617a0eed7d9a8d38f2/outcome-1.3.0.post0.tar.gz", hash = "sha256:9dcf02e65f2971b80047b377468e72a268e15c0af3cf1238e6ff14f7f91143b8" } +wheels = [ + { url = "https://mirrors.aliyun.com/pypi/packages/55/8b/5ab7257531a5d830fc8000c476e63c935488d74609b50f9384a643ec0a62/outcome-1.3.0.post0-py2.py3-none-any.whl", hash = "sha256:e771c5ce06d1415e356078d3bdd68523f284b4ce5419828922b6871e65eda82b" }, +] + +[[package]] +name = "pycparser" +version = "2.22" +source = { registry = "https://mirrors.aliyun.com/pypi/simple" } +sdist = { url = "https://mirrors.aliyun.com/pypi/packages/1d/b2/31537cf4b1ca988837256c910a668b553fceb8f069bedc4b1c826024b52c/pycparser-2.22.tar.gz", hash = "sha256:491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6" } +wheels = [ + { url = "https://mirrors.aliyun.com/pypi/packages/13/a3/a812df4e2dd5696d1f351d58b8fe16a405b234ad2886a0dab9183fb78109/pycparser-2.22-py3-none-any.whl", hash = "sha256:c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc" }, +] + +[[package]] +name = "pysocks" +version = "1.7.1" +source = { registry = "https://mirrors.aliyun.com/pypi/simple" } +sdist = { url = "https://mirrors.aliyun.com/pypi/packages/bd/11/293dd436aea955d45fc4e8a35b6ae7270f5b8e00b53cf6c024c83b657a11/PySocks-1.7.1.tar.gz", hash = "sha256:3f8804571ebe159c380ac6de37643bb4685970655d3bba243530d6558b799aa0" } +wheels = [ + { url = "https://mirrors.aliyun.com/pypi/packages/8d/59/b4572118e098ac8e46e399a1dd0f2d85403ce8bbaad9ec79373ed6badaf9/PySocks-1.7.1-py3-none-any.whl", hash = "sha256:2725bd0a9925919b9b51739eea5f9e2bae91e83288108a9ad338b2e3a4435ee5" }, +] + +[[package]] +name = "pyyaml" +version = "6.0.2" +source = { registry = "https://mirrors.aliyun.com/pypi/simple" } +sdist = { url = "https://mirrors.aliyun.com/pypi/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz", hash = "sha256:d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" } +wheels = [ + { url = "https://mirrors.aliyun.com/pypi/packages/86/0c/c581167fc46d6d6d7ddcfb8c843a4de25bdd27e4466938109ca68492292c/PyYAML-6.0.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:c70c95198c015b85feafc136515252a261a84561b7b1d51e3384e0655ddf25ab" }, + { url = "https://mirrors.aliyun.com/pypi/packages/a8/0c/38374f5bb272c051e2a69281d71cba6fdb983413e6758b84482905e29a5d/PyYAML-6.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ce826d6ef20b1bc864f0a68340c8b3287705cae2f8b4b1d932177dcc76721725" }, + { url = "https://mirrors.aliyun.com/pypi/packages/c3/93/9916574aa8c00aa06bbac729972eb1071d002b8e158bd0e83a3b9a20a1f7/PyYAML-6.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1f71ea527786de97d1a0cc0eacd1defc0985dcf6b3f17bb77dcfc8c34bec4dc5" }, + { url = "https://mirrors.aliyun.com/pypi/packages/95/0f/b8938f1cbd09739c6da569d172531567dbcc9789e0029aa070856f123984/PyYAML-6.0.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9b22676e8097e9e22e36d6b7bda33190d0d400f345f23d4065d48f4ca7ae0425" }, + { url = "https://mirrors.aliyun.com/pypi/packages/b9/2b/614b4752f2e127db5cc206abc23a8c19678e92b23c3db30fc86ab731d3bd/PyYAML-6.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:80bab7bfc629882493af4aa31a4cfa43a4c57c83813253626916b8c7ada83476" }, + { url = "https://mirrors.aliyun.com/pypi/packages/d4/00/dd137d5bcc7efea1836d6264f049359861cf548469d18da90cd8216cf05f/PyYAML-6.0.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:0833f8694549e586547b576dcfaba4a6b55b9e96098b36cdc7ebefe667dfed48" }, + { url = "https://mirrors.aliyun.com/pypi/packages/c9/1f/4f998c900485e5c0ef43838363ba4a9723ac0ad73a9dc42068b12aaba4e4/PyYAML-6.0.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8b9c7197f7cb2738065c481a0461e50ad02f18c78cd75775628afb4d7137fb3b" }, + { url = "https://mirrors.aliyun.com/pypi/packages/df/d1/f5a275fdb252768b7a11ec63585bc38d0e87c9e05668a139fea92b80634c/PyYAML-6.0.2-cp312-cp312-win32.whl", hash = "sha256:ef6107725bd54b262d6dedcc2af448a266975032bc85ef0172c5f059da6325b4" }, + { url = "https://mirrors.aliyun.com/pypi/packages/0c/e8/4f648c598b17c3d06e8753d7d13d57542b30d56e6c2dedf9c331ae56312e/PyYAML-6.0.2-cp312-cp312-win_amd64.whl", hash = "sha256:7e7401d0de89a9a855c839bc697c079a4af81cf878373abd7dc625847d25cbd8" }, + { url = "https://mirrors.aliyun.com/pypi/packages/ef/e3/3af305b830494fa85d95f6d95ef7fa73f2ee1cc8ef5b495c7c3269fb835f/PyYAML-6.0.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:efdca5630322a10774e8e98e1af481aad470dd62c3170801852d752aa7a783ba" }, + { url = "https://mirrors.aliyun.com/pypi/packages/45/9f/3b1c20a0b7a3200524eb0076cc027a970d320bd3a6592873c85c92a08731/PyYAML-6.0.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:50187695423ffe49e2deacb8cd10510bc361faac997de9efef88badc3bb9e2d1" }, + { url = "https://mirrors.aliyun.com/pypi/packages/7c/9a/337322f27005c33bcb656c655fa78325b730324c78620e8328ae28b64d0c/PyYAML-6.0.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0ffe8360bab4910ef1b9e87fb812d8bc0a308b0d0eef8c8f44e0254ab3b07133" }, + { url = "https://mirrors.aliyun.com/pypi/packages/a3/69/864fbe19e6c18ea3cc196cbe5d392175b4cf3d5d0ac1403ec3f2d237ebb5/PyYAML-6.0.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:17e311b6c678207928d649faa7cb0d7b4c26a0ba73d41e99c4fff6b6c3276484" }, + { url = "https://mirrors.aliyun.com/pypi/packages/04/24/b7721e4845c2f162d26f50521b825fb061bc0a5afcf9a386840f23ea19fa/PyYAML-6.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:70b189594dbe54f75ab3a1acec5f1e3faa7e8cf2f1e08d9b561cb41b845f69d5" }, + { url = "https://mirrors.aliyun.com/pypi/packages/2b/b2/e3234f59ba06559c6ff63c4e10baea10e5e7df868092bf9ab40e5b9c56b6/PyYAML-6.0.2-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:41e4e3953a79407c794916fa277a82531dd93aad34e29c2a514c2c0c5fe971cc" }, + { url = "https://mirrors.aliyun.com/pypi/packages/fe/0f/25911a9f080464c59fab9027482f822b86bf0608957a5fcc6eaac85aa515/PyYAML-6.0.2-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:68ccc6023a3400877818152ad9a1033e3db8625d899c72eacb5a668902e4d652" }, + { url = "https://mirrors.aliyun.com/pypi/packages/14/0d/e2c3b43bbce3cf6bd97c840b46088a3031085179e596d4929729d8d68270/PyYAML-6.0.2-cp313-cp313-win32.whl", hash = "sha256:bc2fa7c6b47d6bc618dd7fb02ef6fdedb1090ec036abab80d4681424b84c1183" }, + { url = "https://mirrors.aliyun.com/pypi/packages/fa/de/02b54f42487e3d3c6efb3f89428677074ca7bf43aae402517bc7cca949f3/PyYAML-6.0.2-cp313-cp313-win_amd64.whl", hash = "sha256:8388ee1976c416731879ac16da0aff3f63b286ffdd57cdeb95f3f2e085687563" }, +] + +[[package]] +name = "requests" +version = "2.32.4" +source = { registry = "https://mirrors.aliyun.com/pypi/simple" } +dependencies = [ + { name = "certifi" }, + { name = "charset-normalizer" }, + { name = "idna" }, + { name = "urllib3" }, +] +sdist = { url = "https://mirrors.aliyun.com/pypi/packages/e1/0a/929373653770d8a0d7ea76c37de6e41f11eb07559b103b1c02cafb3f7cf8/requests-2.32.4.tar.gz", hash = "sha256:27d0316682c8a29834d3264820024b62a36942083d52caf2f14c0591336d3422" } +wheels = [ + { url = "https://mirrors.aliyun.com/pypi/packages/7c/e4/56027c4a6b4ae70ca9de302488c5ca95ad4a39e190093d6c1a8ace08341b/requests-2.32.4-py3-none-any.whl", hash = "sha256:27babd3cda2a6d50b30443204ee89830707d396671944c998b5975b031ac2b2c" }, +] + +[[package]] +name = "selenium" +version = "4.34.2" +source = { registry = "https://mirrors.aliyun.com/pypi/simple" } +dependencies = [ + { name = "certifi" }, + { name = "trio" }, + { name = "trio-websocket" }, + { name = "typing-extensions" }, + { name = "urllib3", extra = ["socks"] }, + { name = "websocket-client" }, +] +sdist = { url = "https://mirrors.aliyun.com/pypi/packages/b0/e6/646d0a41fb9a64572043c3de80be2a4941f2aeb578f273cf3dae54fc9437/selenium-4.34.2.tar.gz", hash = "sha256:0f6d147595f08c6d4bad87b34c39dcacb4650aedc78e3956c8eac1bb752a3854" } +wheels = [ + { url = "https://mirrors.aliyun.com/pypi/packages/f3/2b/dee1c58bde0a747b2d75fa7282a190885a726fe95b18b8ce1dc52f9c0983/selenium-4.34.2-py3-none-any.whl", hash = "sha256:ea208f7db9e3b26e58c4a817ea9dd29454576d6ea55937d754df079ad588e1ad" }, +] + +[[package]] +name = "sniffio" +version = "1.3.1" +source = { registry = "https://mirrors.aliyun.com/pypi/simple" } +sdist = { url = "https://mirrors.aliyun.com/pypi/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz", hash = "sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" } +wheels = [ + { url = "https://mirrors.aliyun.com/pypi/packages/e9/44/75a9c9421471a6c4805dbf2356f7c181a29c1879239abab1ea2cc8f38b40/sniffio-1.3.1-py3-none-any.whl", hash = "sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2" }, +] + +[[package]] +name = "sortedcontainers" +version = "2.4.0" +source = { registry = "https://mirrors.aliyun.com/pypi/simple" } +sdist = { url = "https://mirrors.aliyun.com/pypi/packages/e8/c4/ba2f8066cceb6f23394729afe52f3bf7adec04bf9ed2c820b39e19299111/sortedcontainers-2.4.0.tar.gz", hash = "sha256:25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88" } +wheels = [ + { url = "https://mirrors.aliyun.com/pypi/packages/32/46/9cb0e58b2deb7f82b84065f37f3bffeb12413f947f9388e4cac22c4621ce/sortedcontainers-2.4.0-py2.py3-none-any.whl", hash = "sha256:a163dcaede0f1c021485e957a39245190e74249897e2ae4b2aa38595db237ee0" }, +] + +[[package]] +name = "trio" +version = "0.30.0" +source = { registry = "https://mirrors.aliyun.com/pypi/simple" } +dependencies = [ + { name = "attrs" }, + { name = "cffi", marker = "implementation_name != 'pypy' and os_name == 'nt'" }, + { name = "idna" }, + { name = "outcome" }, + { name = "sniffio" }, + { name = "sortedcontainers" }, +] +sdist = { url = "https://mirrors.aliyun.com/pypi/packages/01/c1/68d582b4d3a1c1f8118e18042464bb12a7c1b75d64d75111b297687041e3/trio-0.30.0.tar.gz", hash = "sha256:0781c857c0c81f8f51e0089929a26b5bb63d57f927728a5586f7e36171f064df" } +wheels = [ + { url = "https://mirrors.aliyun.com/pypi/packages/69/8e/3f6dfda475ecd940e786defe6df6c500734e686c9cd0a0f8ef6821e9b2f2/trio-0.30.0-py3-none-any.whl", hash = "sha256:3bf4f06b8decf8d3cf00af85f40a89824669e2d033bb32469d34840edcfc22a5" }, +] + +[[package]] +name = "trio-websocket" +version = "0.12.2" +source = { registry = "https://mirrors.aliyun.com/pypi/simple" } +dependencies = [ + { name = "outcome" }, + { name = "trio" }, + { name = "wsproto" }, +] +sdist = { url = "https://mirrors.aliyun.com/pypi/packages/d1/3c/8b4358e81f2f2cfe71b66a267f023a91db20a817b9425dd964873796980a/trio_websocket-0.12.2.tar.gz", hash = "sha256:22c72c436f3d1e264d0910a3951934798dcc5b00ae56fc4ee079d46c7cf20fae" } +wheels = [ + { url = "https://mirrors.aliyun.com/pypi/packages/c7/19/eb640a397bba49ba49ef9dbe2e7e5c04202ba045b6ce2ec36e9cadc51e04/trio_websocket-0.12.2-py3-none-any.whl", hash = "sha256:df605665f1db533f4a386c94525870851096a223adcb97f72a07e8b4beba45b6" }, +] + +[[package]] +name = "typing-extensions" +version = "4.14.1" +source = { registry = "https://mirrors.aliyun.com/pypi/simple" } +sdist = { url = "https://mirrors.aliyun.com/pypi/packages/98/5a/da40306b885cc8c09109dc2e1abd358d5684b1425678151cdaed4731c822/typing_extensions-4.14.1.tar.gz", hash = "sha256:38b39f4aeeab64884ce9f74c94263ef78f3c22467c8724005483154c26648d36" } +wheels = [ + { url = "https://mirrors.aliyun.com/pypi/packages/b5/00/d631e67a838026495268c2f6884f3711a15a9a2a96cd244fdaea53b823fb/typing_extensions-4.14.1-py3-none-any.whl", hash = "sha256:d1e1e3b58374dc93031d6eda2420a48ea44a36c2b4766a4fdeb3710755731d76" }, +] + +[[package]] +name = "typish" +version = "1.9.3" +source = { registry = "https://mirrors.aliyun.com/pypi/simple" } +wheels = [ + { url = "https://mirrors.aliyun.com/pypi/packages/9d/d6/3f56c9c0c12adf61dfcf4ed5c8ffd2c431db8dd85592067a57e8e1968565/typish-1.9.3-py3-none-any.whl", hash = "sha256:03cfee5e6eb856dbf90244e18f4e4c41044c8790d5779f4e775f63f982e2f896" }, +] + +[[package]] +name = "urllib3" +version = "2.5.0" +source = { registry = "https://mirrors.aliyun.com/pypi/simple" } +sdist = { url = "https://mirrors.aliyun.com/pypi/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz", hash = "sha256:3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760" } +wheels = [ + { url = "https://mirrors.aliyun.com/pypi/packages/a7/c2/fe1e52489ae3122415c51f387e221dd0773709bad6c6cdaa599e8a2c5185/urllib3-2.5.0-py3-none-any.whl", hash = "sha256:e6b01673c0fa6a13e374b50871808eb3bf7046c4b125b216f6bf1cc604cff0dc" }, +] + +[package.optional-dependencies] +socks = [ + { name = "pysocks" }, +] + +[[package]] +name = "websocket-client" +version = "1.8.0" +source = { registry = "https://mirrors.aliyun.com/pypi/simple" } +sdist = { url = "https://mirrors.aliyun.com/pypi/packages/e6/30/fba0d96b4b5fbf5948ed3f4681f7da2f9f64512e1d303f94b4cc174c24a5/websocket_client-1.8.0.tar.gz", hash = "sha256:3239df9f44da632f96012472805d40a23281a991027ce11d2f45a6f24ac4c3da" } +wheels = [ + { url = "https://mirrors.aliyun.com/pypi/packages/5a/84/44687a29792a70e111c5c477230a72c4b957d88d16141199bf9acb7537a3/websocket_client-1.8.0-py3-none-any.whl", hash = "sha256:17b44cc997f5c498e809b22cdf2d9c7a9e71c02c8cc2b6c56e7c2d1239bfa526" }, +] + +[[package]] +name = "wsproto" +version = "1.2.0" +source = { registry = "https://mirrors.aliyun.com/pypi/simple" } +dependencies = [ + { name = "h11" }, +] +sdist = { url = "https://mirrors.aliyun.com/pypi/packages/c9/4a/44d3c295350d776427904d73c189e10aeae66d7f555bb2feee16d1e4ba5a/wsproto-1.2.0.tar.gz", hash = "sha256:ad565f26ecb92588a3e43bc3d96164de84cd9902482b130d0ddbaa9664a85065" } +wheels = [ + { url = "https://mirrors.aliyun.com/pypi/packages/78/58/e860788190eba3bcce367f74d29c4675466ce8dddfba85f7827588416f01/wsproto-1.2.0-py3-none-any.whl", hash = "sha256:b9acddd652b585d75b20477888c56642fdade28bdfd3579aa24a4d2c037dd736" }, +] From 5064b42e5735e276351408fefd5f670fb3bc9aca Mon Sep 17 00:00:00 2001 From: zhdbk3 Date: Wed, 23 Jul 2025 10:31:55 +0800 Subject: [PATCH 20/31] =?UTF-8?q?=E7=82=B9=E5=87=BB=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/auto_video/auto_video.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/auto_video/auto_video.py b/src/auto_video/auto_video.py index 36e9443..1cb6486 100644 --- a/src/auto_video/auto_video.py +++ b/src/auto_video/auto_video.py @@ -13,6 +13,7 @@ from utils import click, click_and_switch, close_and_switch + class AutoVideo: def __init__(self, driver, config): """ @@ -86,7 +87,9 @@ def finish_a_lesson(self, btn: WebElement) -> None: # 老师敲黑板,帮你暂停一下 # 看看你在不在认真听课~ try: - self.driver.find_element(By.XPATH, "//*[contains(text(), '点击通过检查')]").click() + self.driver.find_element( + By.XPATH, "//*[contains(text(), '点击通过检查') or contains(text(), 'A')]" + ).click() logging.info('点击了检查点') except NoSuchElementException: pass @@ -95,4 +98,4 @@ def finish_a_lesson(self, btn: WebElement) -> None: logging.info('好诶~完成啦~') - close_and_switch(self.driver) \ No newline at end of file + close_and_switch(self.driver) From 17fad768a04fd656b50623f804baa3b50281c39a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9D=80=E7=81=AB=E7=9A=84=E5=86=B0=E5=9D=97nya?= <161030746+zhdbk3@users.noreply.github.com> Date: Wed, 23 Jul 2025 10:43:17 +0800 Subject: [PATCH 21/31] =?UTF-8?q?Update=20build.yml:=20=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=20MinGW=2064?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 93b5498..a8825a9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -42,10 +42,11 @@ jobs: file-version: ${{ github.event.inputs.version }} product-version: ${{ github.event.inputs.version }} include-data-files: src/config.yml.default=./config.yml.default + mingw64: true - name: 上传工件 uses: actions/upload-artifact@v4 with: name: AutoEwt-v${{ github.event.inputs.version }}-${{ runner.os }} path: | - build/main.dist/* \ No newline at end of file + build/main.dist/* From 1c3c2ca9c5e0043d5e40a64cbfac12c0bc35cfc1 Mon Sep 17 00:00:00 2001 From: zhdbk3 Date: Wed, 23 Jul 2025 11:17:47 +0800 Subject: [PATCH 22/31] =?UTF-8?q?=E5=B0=9D=E8=AF=95=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E8=B7=B3=E8=BF=87=E8=A7=86=E9=A2=91=E8=AF=BE=E7=9A=84=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 2 +- src/auto_video/auto_video.py | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 856cca6..9e629af 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "autoewt" -version = "0.5.0" +version = "0.6.1" description = "Add your description here" readme = "README.md" requires-python = ">=3.12" diff --git a/src/auto_video/auto_video.py b/src/auto_video/auto_video.py index 1cb6486..ce4387d 100644 --- a/src/auto_video/auto_video.py +++ b/src/auto_video/auto_video.py @@ -9,7 +9,7 @@ from selenium.webdriver.common.by import By from selenium.webdriver.remote.webelement import WebElement -from selenium.common.exceptions import NoSuchElementException +from selenium.common.exceptions import NoSuchElementException, ElementNotInteractableException from utils import click, click_and_switch, close_and_switch @@ -87,9 +87,8 @@ def finish_a_lesson(self, btn: WebElement) -> None: # 老师敲黑板,帮你暂停一下 # 看看你在不在认真听课~ try: - self.driver.find_element( - By.XPATH, "//*[contains(text(), '点击通过检查') or contains(text(), 'A')]" - ).click() + self.driver.find_element(By.XPATH, "//*[contains(text(), '点击通过检查')]").click() + click(self.driver, self.driver.find_element(By.XPATH, "//*[contains(text(), 'A')]")) logging.info('点击了检查点') except NoSuchElementException: pass From 4974e7b51e5381ffa74e3f6a658970950645e48d Mon Sep 17 00:00:00 2001 From: zhdbk3 Date: Wed, 23 Jul 2025 11:20:09 +0800 Subject: [PATCH 23/31] =?UTF-8?q?=E5=88=9A=E6=89=8D=E7=9A=84=E5=86=99?= =?UTF-8?q?=E6=B3=95=E4=BC=BC=E4=B9=8E=E4=B8=8D=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/auto_video/auto_video.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/auto_video/auto_video.py b/src/auto_video/auto_video.py index ce4387d..4649fc6 100644 --- a/src/auto_video/auto_video.py +++ b/src/auto_video/auto_video.py @@ -87,8 +87,9 @@ def finish_a_lesson(self, btn: WebElement) -> None: # 老师敲黑板,帮你暂停一下 # 看看你在不在认真听课~ try: - self.driver.find_element(By.XPATH, "//*[contains(text(), '点击通过检查')]").click() - click(self.driver, self.driver.find_element(By.XPATH, "//*[contains(text(), 'A')]")) + click(self.driver, self.driver.find_element( + By.XPATH, "//*[contains(text(), '点击通过检查') or contains(text(), 'A')]" + )) logging.info('点击了检查点') except NoSuchElementException: pass From 374c2e617c119cd559b605a65a12a85e47a9f850 Mon Sep 17 00:00:00 2001 From: zhdbk3 Date: Wed, 23 Jul 2025 11:30:29 +0800 Subject: [PATCH 24/31] =?UTF-8?q?=E5=B0=9D=E8=AF=95=E5=8F=AA=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E5=8F=AF=E8=A7=81=E5=85=83=E7=B4=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/auto_video/auto_video.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/auto_video/auto_video.py b/src/auto_video/auto_video.py index 4649fc6..3f40293 100644 --- a/src/auto_video/auto_video.py +++ b/src/auto_video/auto_video.py @@ -9,7 +9,6 @@ from selenium.webdriver.common.by import By from selenium.webdriver.remote.webelement import WebElement -from selenium.common.exceptions import NoSuchElementException, ElementNotInteractableException from utils import click, click_and_switch, close_and_switch @@ -86,13 +85,12 @@ def finish_a_lesson(self, btn: WebElement) -> None: while not video.get_attribute('ended'): # 老师敲黑板,帮你暂停一下 # 看看你在不在认真听课~ - try: - click(self.driver, self.driver.find_element( - By.XPATH, "//*[contains(text(), '点击通过检查') or contains(text(), 'A')]" - )) - logging.info('点击了检查点') - except NoSuchElementException: - pass + els: list[WebElement] = self.driver.find_elements( + By.XPATH, "//*[contains(text(), '点击通过检查') or contains(text(), 'A')]" + ) + els = [e for e in els if e.is_displayed()] + for e in els: + click(self.driver, e) time.sleep(1) From 55affe35f848ed4f242db3bfc993722b14745ad5 Mon Sep 17 00:00:00 2001 From: zhdbk3 Date: Fri, 25 Jul 2025 11:13:01 +0800 Subject: [PATCH 25/31] =?UTF-8?q?=E4=BA=BA=E5=B7=A5=E9=87=8D=E6=9E=84?= =?UTF-8?q?=E4=B8=BA=E9=9D=A2=E5=90=91=E5=AF=B9=E8=B1=A1=20|=20=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/auto_base.py | 123 ++++++++++++++++++++++ src/auto_paper/auto_paper.py | 48 +++------ src/auto_paper/get_corret_answer_v2.py | 22 ++-- src/auto_paper/get_info_by_current_url.py | 4 +- src/auto_paper/get_question_id_v2.py | 19 ++-- src/auto_video/auto_video.py | 34 ++---- src/main.py | 45 +++++--- src/utils.py | 111 ------------------- uv.lock | 2 +- 9 files changed, 194 insertions(+), 214 deletions(-) create mode 100644 src/auto_base.py delete mode 100644 src/utils.py diff --git a/src/auto_base.py b/src/auto_base.py new file mode 100644 index 0000000..3d8063f --- /dev/null +++ b/src/auto_base.py @@ -0,0 +1,123 @@ +# +# 此模块用于存储通用的工具函数 +# + +import os +import logging +import time +from abc import ABC, abstractmethod +from functools import cache + +import yaml +from selenium import webdriver +from selenium.webdriver.remote.webelement import WebElement +from selenium.webdriver.common.by import By + + +@cache +def read_config() -> dict: + """ + 配置文件样例: + # 修改时不要删掉冒号后的空格 + browser: 浏览器名称(首字母大写),如 Chrome, Edge 等 + driver_path: 浏览器驱动路径 + username: 用户名 + password: 密码 + list_url: 课程列表页面的链接 + # 浏览器启动时的参数,这里给了个静音 + options: --mute-audio + # AutoEwt 模式,选填 watch(看课)/ test(做试卷) + mode: watch + """ + if not os.path.exists('config.yml'): + logging.error('配置文件 config.yml 不存在,请检查!') + exit(1) + with open('config.yml', encoding='utf-8') as f: + config = yaml.load(f, yaml.FullLoader) + # 密码可能是纯数字 + config['password'] = str(config['password']) + logging.info('成功读取到配置文件') + return config + + +class AutoBase(ABC): + def __init__(self): + self.config = read_config() + self.mode = self.config['mode'] + self.driver = self.init_driver() + + self.login() + self.finish_days_list() + + def init_driver(self) -> webdriver.Edge: + browser = self.config['browser'] + + options = getattr(webdriver, browser.lower()).options.Options() + options.add_argument(self.config['options']) + driver = getattr(webdriver, browser)( + service=getattr(webdriver, browser.lower()).service.Service(self.config['driver_path']), + options=options + ) + driver.maximize_window() + driver.get(self.config['list_url']) + driver.implicitly_wait(3) + return driver + + def login(self) -> None: + logging.info('登录账号……') + self.driver.find_element(By.ID, 'login__password_userName').send_keys(self.config['username']) + self.driver.find_element(By.ID, 'login__password_password').send_keys(self.config['password']) + self.driver.find_element(By.CLASS_NAME, 'ant-btn-block').submit() + # 等待一段时间,确保页面加载完成并生成 token + time.sleep(3) + # # 获取所有 cookie + # cookies = self.driver.get_cookies() + # token = None + # for cookie in cookies: + # if cookie['name'] == 'token': + # token = cookie['value'] + # break + + def click(self, btn: WebElement) -> None: + """ + 通过调用 .click(); 事件点击一个按钮,这比直接在 Python 中 .click() 更稳定 + 对于可能被遮挡而无法点击的按钮,应使用此方法 + :param btn: 要点击的按钮 + :return: None + """ + self.driver.execute_script('arguments[0].click();', btn) + + def click_and_switch(self, btn: WebElement) -> None: + """ + 点击按钮并切换到新页面 + :param btn: 要点击的按钮 + """ + self.click(btn) + time.sleep(1) # 给新页面反应一会 + # 切换到当前页面 + handles = self.driver.window_handles + self.driver.switch_to.window(handles[1]) + + def close_and_switch(self) -> None: + """关闭当前页面并返回到首页""" + handles = self.driver.window_handles + self.driver.close() + self.driver.switch_to.window(handles[0]) + time.sleep(1) + + def finish_days_list(self) -> None: + """完成所有天""" + time.sleep(5) + days = self.driver.find_elements(By.CSS_SELECTOR, 'li[data-active="true"], li[data-active="false"]') + logging.info(f'一共有 {len(days)} 天的任务') + for i in range(len(days)): + logging.info(f'================ 第 {i + 1} / {len(days)} 天 ================') + self.finish_a_day(days[i]) + + @abstractmethod + def finish_a_day(self, day: WebElement) -> None: + """ + 完成一天的任务 + :param day: 该天在网页上的标签 + """ + ... diff --git a/src/auto_paper/auto_paper.py b/src/auto_paper/auto_paper.py index 4316b82..c03b5e7 100644 --- a/src/auto_paper/auto_paper.py +++ b/src/auto_paper/auto_paper.py @@ -5,41 +5,17 @@ import time import logging import traceback -from typing import Literal import random from selenium.webdriver.common.by import By from selenium.webdriver.remote.webelement import WebElement -from utils import click, click_and_switch, close_and_switch +from auto_base import AutoBase -class AutoPaper: - def __init__(self, driver, config): - """ - 自动刷试卷程序的主体 - :param driver: 浏览器驱动实例 - :param config: 读取的配置文件 - """ - self.mode: Literal['test'] = config['mode'] - self.driver = driver - self.finish_days_list() - - def finish_days_list(self) -> None: - """完成所有天""" - time.sleep(5) - days = self.driver.find_elements(By.CSS_SELECTOR, 'li[data-active="true"], li[data-active="false"]') - logging.info(f'一共有 {len(days)} 天的任务') - for i in range(len(days)): - logging.info(f'================ 第 {i + 1} / {len(days)} 天 ================') - self.finish_a_day(days[i]) +class AutoPaper(AutoBase): def finish_a_day(self, day: WebElement) -> None: - """ - 完成一天的任务 - :param day: 该天在网页上的标签 - :return: None - """ - click(self.driver, day) + self.click(day) time.sleep(2) btns = self.driver.find_elements( By.XPATH, @@ -54,40 +30,40 @@ def finish_a_day(self, day: WebElement) -> None: logging.error(traceback.format_exc()) logging.warning('该试卷已跳过') # 关闭页面,返回首页 - close_and_switch(self.driver) + self.close_and_switch() def finish_a_test(self, btn: WebElement): """ 完成一张试卷 选择题随机选一个,大题**并不**传一个占位图片文件[doge],并自批为满分 """ - click_and_switch(self.driver, btn) + self.click_and_switch(btn) # 完成选择题 options_uls = self.driver.find_elements(By.CLASS_NAME, 'pm-question-options') for ul in options_uls: items = ul.find_elements(By.CSS_SELECTOR, 'li') # 随机选一个选项 - click(self.driver, random.choice(items)) + self.click(random.choice(items)) time.sleep(0.2) time.sleep(1) # 提交 - click(self.driver, self.driver.find_element(By.CLASS_NAME, 'ant-btn-primary')) + self.click(self.driver.find_element(By.CLASS_NAME, 'ant-btn-primary')) time.sleep(1) - click(self.driver, self.driver.find_element(By.CLASS_NAME, 'confirm-right')) + self.click(self.driver.find_element(By.CLASS_NAME, 'confirm-right')) time.sleep(5) # 自批满分(不一定有此环节) n = len(self.driver.find_elements(By.CSS_SELECTOR, '.content-left-scroll > ul > li')) if n != 0: for i in range(n): - click(self.driver, self.driver.find_element(By.CSS_SELECTOR, '.content-right-scroll > ul > li:last-child')) + self.click(self.driver.find_element(By.CSS_SELECTOR, '.content-right-scroll > ul > li:last-child')) time.sleep(2) - click(self.driver, self.driver.find_element(By.CLASS_NAME, 'content-main-footer_submit_btn_full')) + self.click(self.driver.find_element(By.CLASS_NAME, 'content-main-footer_submit_btn_full')) time.sleep(1) - click(self.driver, self.driver.find_element(By.CLASS_NAME, 'confirm-right')) + self.click(self.driver.find_element(By.CLASS_NAME, 'confirm-right')) time.sleep(3) - close_and_switch(self.driver) \ No newline at end of file + self.close_and_switch() diff --git a/src/auto_paper/get_corret_answer_v2.py b/src/auto_paper/get_corret_answer_v2.py index a58ea94..2a2b005 100644 --- a/src/auto_paper/get_corret_answer_v2.py +++ b/src/auto_paper/get_corret_answer_v2.py @@ -2,7 +2,7 @@ import json -def get_answer(bizCode:str, paperId:str, reportId:str, questionId:str, token:str): +def get_answer(bizCode: str, paperId: str, reportId: str, questionId: str, token: str): """获取指定试卷的单选题和多选题正确答案 通过调用EWT360 API获取指定用户的作业报告,解析并返回题目ID与正确答案的映射 @@ -34,7 +34,6 @@ def get_answer(bizCode:str, paperId:str, reportId:str, questionId:str, token:str url = "https://web.ewt360.com/api/answerprod/web/answer/simple/question/info" - # 请求头信息 headers = { "authority": "web.ewt360.com", @@ -53,7 +52,6 @@ def get_answer(bizCode:str, paperId:str, reportId:str, questionId:str, token:str } url = "https://web.ewt360.com/api/answerprod/web/answer/simple/question/info" - try: response = session.post( @@ -61,7 +59,7 @@ def get_answer(bizCode:str, paperId:str, reportId:str, questionId:str, token:str headers=headers, json=payload ) - + # 检查HTTP状态码 if response.status_code != 200: return f"API请求失败,状态码: {response.status_code}" @@ -87,11 +85,11 @@ def parse_questions(questions): # 先处理根节点题目自身答案 if data.get('rightAnswer'): answer_dict[data['id']] = data['rightAnswer'] - + # 无论是否有子题都尝试解析 if data.get('childQuestions'): parse_questions(data['childQuestions']) - + return answer_dict if answer_dict else '未找到正确答案' except json.JSONDecodeError: @@ -106,10 +104,10 @@ def parse_questions(questions): if __name__ == '__main__': bizCode = '205' - homeworkId='10389626' - userId='151028179' - paperId='1986397841559642844' - reportId='2040988842982768934' - questionId='1176211251046524293' + homeworkId = '10389626' + userId = '151028179' + paperId = '1986397841559642844' + reportId = '2040988842982768934' + questionId = '1176211251046524293' token = '151028179-1-' - print(get_answer(bizCode,paperId,reportId,questionId,token)) \ No newline at end of file + print(get_answer(bizCode, paperId, reportId, questionId, token)) diff --git a/src/auto_paper/get_info_by_current_url.py b/src/auto_paper/get_info_by_current_url.py index bf68e67..18e9e36 100644 --- a/src/auto_paper/get_info_by_current_url.py +++ b/src/auto_paper/get_info_by_current_url.py @@ -1,5 +1,6 @@ from urllib.parse import parse_qs + def get_info_from_url(paper_url): """ 从给定的 URL 中提取查询参数并返回一个字典。 @@ -19,6 +20,7 @@ def get_info_from_url(paper_url): # 将字典的值从列表转换为单个值 return {key: value[0] for key, value in query_params.items()} + if __name__ == '__main__': test_urls = [ "https://web.ewt360.com/mystudy/#/exam/answer?paperId=1990849016816197771&bizCode=205&platform=1&videoPoint=1&homeworkId=10389626", @@ -28,4 +30,4 @@ def get_info_from_url(paper_url): result = get_info_from_url(url) print(f"测试 URL: {url}") print(f"解析结果: {result}") - print("-" * 50) \ No newline at end of file + print("-" * 50) diff --git a/src/auto_paper/get_question_id_v2.py b/src/auto_paper/get_question_id_v2.py index 2fe9fb3..8aa25ef 100644 --- a/src/auto_paper/get_question_id_v2.py +++ b/src/auto_paper/get_question_id_v2.py @@ -38,29 +38,27 @@ def get_question_ids(paperId: str, token: str): "scheme": "https", } - try: - response = session.get(url,headers=headers,) - + response = session.get(url, headers=headers, ) + # 检查HTTP状态码 if response.status_code != 200: return f"API请求失败,状态码: {response.status_code}" - + if response.json()['code'] == '2001106': return f'请求失败,登陆状态异常,请检查token是否过期或无效' - + if json.loads(response.text)['code'] != '200': return f"API请求失败,ewt状态码:{json.loads(response.text)['code']},消息:{json.loads(response.text)['msg']} " - # 解析JSON响应 json_data = response.json() - + # print(response.text) # 检查响应是否包含data字段 if 'data' not in json_data: return f"请求失败,API响应缺少data字段,完整响应: {response.text[:200]}" - + def extract_ids(question_list): ids = [] if not isinstance(question_list, list): @@ -89,10 +87,11 @@ def extract_ids(question_list): except Exception as e: return f"处理失败,处理过程中发生未预期错误: {type(e).__name__} - {str(e)}" + if __name__ == '__main__': # 测试参数 # paperId = '1996206103754744180' # 语文 - paperId = '1986397841559642844' # 数学 + paperId = '1986397841559642844' # 数学 token = '' result = get_question_ids(paperId, token) - print("获取到的题目ID列表:", result) \ No newline at end of file + print("获取到的题目ID列表:", result) diff --git a/src/auto_video/auto_video.py b/src/auto_video/auto_video.py index 3f40293..3b99770 100644 --- a/src/auto_video/auto_video.py +++ b/src/auto_video/auto_video.py @@ -5,41 +5,21 @@ import time import logging import traceback -from typing import Literal from selenium.webdriver.common.by import By from selenium.webdriver.remote.webelement import WebElement -from utils import click, click_and_switch, close_and_switch +from auto_base import AutoBase -class AutoVideo: - def __init__(self, driver, config): - """ - 自动看课程序的主体 - :param driver: 浏览器驱动实例 - :param config: 读取的配置文件 - """ - self.mode: Literal['watch'] = config['mode'] - self.driver = driver - self.finish_days_list() - - def finish_days_list(self) -> None: - """完成所有天""" - time.sleep(5) - days = self.driver.find_elements(By.CSS_SELECTOR, 'li[data-active="true"], li[data-active="false"]') - logging.info(f'一共有 {len(days)} 天的任务') - for i in range(len(days)): - logging.info(f'================ 第 {i + 1} / {len(days)} 天 ================') - self.finish_a_day(days[i]) - +class AutoVideo(AutoBase): def finish_a_day(self, day: WebElement) -> None: """ 完成一天的任务 :param day: 该天在网页上的标签 :return: None """ - click(self.driver, day) + self.click(day) time.sleep(2) btns = self.driver.find_elements( By.XPATH, @@ -62,7 +42,7 @@ def finish_a_day(self, day: WebElement) -> None: logging.warning('该课已跳过') logging.warning('如果这是视频课,请报告 bug') # 关闭页面,返回首页 - close_and_switch(self.driver) + self.close_and_switch() def finish_a_lesson(self, btn: WebElement) -> None: """ @@ -70,7 +50,7 @@ def finish_a_lesson(self, btn: WebElement) -> None: :param btn: “学”按钮 :return: None """ - click_and_switch(self.driver, btn) + self.click_and_switch(btn) video = self.driver.find_element(By.TAG_NAME, 'video') @@ -90,10 +70,10 @@ def finish_a_lesson(self, btn: WebElement) -> None: ) els = [e for e in els if e.is_displayed()] for e in els: - click(self.driver, e) + self.click(e) time.sleep(1) logging.info('好诶~完成啦~') - close_and_switch(self.driver) + self.close_and_switch() diff --git a/src/main.py b/src/main.py index f74fb25..a7b7c9b 100644 --- a/src/main.py +++ b/src/main.py @@ -3,14 +3,28 @@ # import traceback -from utils import init_logging, read_config, init_driver, login -from auto_video.auto_video import AutoVideo -from auto_paper.auto_paper import AutoPaper -from selenium.common.exceptions import StaleElementReferenceException import logging import time +import os +import datetime + +from selenium.common.exceptions import StaleElementReferenceException + +from auto_base import read_config +from auto_video.auto_video import AutoVideo +from auto_paper.auto_paper import AutoPaper -init_logging() +# 如果不存在 log 文件夹,则创建 +if not os.path.exists('log'): + os.makedirs('log') +# 初始化日志 +now = datetime.datetime.now().strftime('%Y-%m-%d_%H.%M.%S') +logging.basicConfig( + level=logging.INFO, + format='[%(asctime)s %(levelname)s] %(message)s', + datefmt='%Y-%m-%d %H:%M:%S', + handlers=[logging.StreamHandler(), logging.FileHandler(f'log/log_{now}.txt', encoding='utf-8')], +) config = read_config() @@ -21,14 +35,14 @@ while True: try: - driver = init_driver(config) - # 登录并获取 token - token = login(driver, config['username'], config['password']) - logging.info(f"登录成功,Token: {token}") - if config['mode'] == 'watch': - AutoVideo(driver, config) - elif config['mode'] == 'test': - AutoPaper(driver, config) + match read_config()['mode']: + case 'watch': + auto = AutoVideo() + case 'test': + auto = AutoPaper() + case _: + logging.error('mode 只能是 watch 或 test,请检查配置文件!') + exit(1) break # 如果程序正常执行完毕,退出循环 except StaleElementReferenceException: logging.error(traceback.format_exc()) @@ -38,10 +52,9 @@ logging.critical(traceback.format_exc()) logging.critical(f'程序异常崩溃,错误信息: {str(e)},正在自动重启……') finally: - if 'driver' in locals(): - driver.quit() + auto.driver.quit() retry_count += 1 logging.info(f'第 {retry_count} 次重试,将在 {retry_interval} 秒后进行') time.sleep(retry_interval) - retry_interval *= 2 # 每次重试间隔时间翻倍 \ No newline at end of file + retry_interval *= 2 # 每次重试间隔时间翻倍 diff --git a/src/utils.py b/src/utils.py deleted file mode 100644 index 9e02fe4..0000000 --- a/src/utils.py +++ /dev/null @@ -1,111 +0,0 @@ -# -# 此模块用于存储通用的工具函数 -# - -import os -import datetime -import logging -import time -import yaml -from selenium import webdriver -from selenium.webdriver.remote.webelement import WebElement -from selenium.webdriver.common.by import By - -def init_logging(): - # 如果不存在 log 文件夹,则创建 - if not os.path.exists('log'): - os.makedirs('log') - # 初始化日志 - now = datetime.datetime.now().strftime('%Y-%m-%d_%H.%M.%S') - logging.basicConfig( - level=logging.INFO, - format='[%(asctime)s %(levelname)s] %(message)s', - datefmt='%Y-%m-%d %H:%M:%S', - handlers=[logging.StreamHandler(), logging.FileHandler(f'log/log_{now}.txt', encoding='utf-8')], - ) - -def read_config(): - ''' - 配置文件样例: - # 修改时不要删掉冒号后的空格 - browser: 浏览器名称(首字母大写),如 Chrome, Edge 等 - driver_path: 浏览器驱动路径 - username: 用户名 - password: 密码 - list_url: 课程列表页面的链接 - # 浏览器启动时的参数,这里给了个静音 - options: --mute-audio - # AutoEwt 模式,选填 watch(看课)/ test(做试卷) - mode: watch - ''' - if not os.path.exists('config.yml'): - logging.error('配置文件 config.yml 不存在,请检查!') - exit(1) - with open('config.yml', encoding='utf-8') as f: - config = yaml.load(f, yaml.FullLoader) - # 密码可能是纯数字 - config['password'] = str(config['password']) - logging.info('成功读取到配置文件') - if config['mode'] not in ['watch', 'test']: - logging.error('mode 只能是 watch 或 test,请检查配置文件!') - exit(1) - return config - -def init_driver(config): - browser = config['browser'] - - options = getattr(webdriver, browser.lower()).options.Options() - options.add_argument(config['options']) - driver = getattr(webdriver, browser)( - service=getattr(webdriver, browser.lower()).service.Service(config['driver_path']), - options=options - ) - driver.maximize_window() - driver.get(config['list_url']) - driver.implicitly_wait(3) - return driver - -def login(driver, username, password): - logging.info('登录账号……') - driver.find_element(By.ID, 'login__password_userName').send_keys(username) - driver.find_element(By.ID, 'login__password_password').send_keys(password) - driver.find_element(By.CLASS_NAME, 'ant-btn-block').submit() - # 等待一段时间,确保页面加载完成并生成 token - time.sleep(3) - # 获取所有 cookie - cookies = driver.get_cookies() - token = None - for cookie in cookies: - if cookie['name'] == 'token': - token = cookie['value'] - break - return token - -def click(driver, btn: WebElement) -> None: - """ - 通过调用 .click(); 事件点击一个按钮,这比直接在 Python 中 .click() 更稳定 - 对于可能被遮挡而无法点击的按钮,应使用此方法 - :param driver: 浏览器驱动实例 - :param btn: 要点击的按钮 - :return: None - """ - driver.execute_script('arguments[0].click();', btn) - -def click_and_switch(driver, btn: WebElement): - """ - 点击按钮并切换到新页面 - :param driver: 浏览器驱动实例 - :param btn: 要点击的按钮 - """ - click(driver, btn) - time.sleep(1) # 给新页面反应一会 - # 切换到当前页面 - handles = driver.window_handles - driver.switch_to.window(handles[1]) - -def close_and_switch(driver): - """关闭当前页面并返回到首页""" - handles = driver.window_handles - driver.close() - driver.switch_to.window(handles[0]) - time.sleep(1) \ No newline at end of file diff --git a/uv.lock b/uv.lock index 31503f0..f751c83 100644 --- a/uv.lock +++ b/uv.lock @@ -13,7 +13,7 @@ wheels = [ [[package]] name = "autoewt" -version = "0.5.0" +version = "0.6.1" source = { virtual = "." } dependencies = [ { name = "jsons" }, From 0d441c1907758b3a2bb7073cb994eddb10040c9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=96=9B=E5=AE=9A=E8=B0=94=E7=9A=84=E6=8C=89=E9=92=AE?= Date: Sat, 26 Jul 2025 13:13:04 +0800 Subject: [PATCH 26/31] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=A8=A1=E5=BC=8F=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config.yml.default | 4 ++-- src/main.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/config.yml.default b/src/config.yml.default index 379b134..53c5a86 100644 --- a/src/config.yml.default +++ b/src/config.yml.default @@ -6,5 +6,5 @@ password: 密码 list_url: 课程列表页面的链接 # 浏览器启动时的参数,这里给了个静音 options: --mute-audio -# AutoEwt 模式,选填 watch(看课)/ test(做试卷) -mode: watch +# AutoEwt 模式,选填 video(看课)/ paper(做试卷) +mode: video diff --git a/src/main.py b/src/main.py index a7b7c9b..c6347ea 100644 --- a/src/main.py +++ b/src/main.py @@ -36,12 +36,12 @@ while True: try: match read_config()['mode']: - case 'watch': + case 'video': auto = AutoVideo() - case 'test': + case 'paper': auto = AutoPaper() case _: - logging.error('mode 只能是 watch 或 test,请检查配置文件!') + logging.error('mode 只能是 video 或 paper,请检查配置文件!') exit(1) break # 如果程序正常执行完毕,退出循环 except StaleElementReferenceException: From f94a596888ac15019bf02980d2640671daad359d Mon Sep 17 00:00:00 2001 From: zhdbk3 Date: Sat, 26 Jul 2025 14:12:04 +0800 Subject: [PATCH 27/31] =?UTF-8?q?=E9=80=89=E6=8B=A9=E9=A2=98=E9=80=89?= =?UTF-8?q?=E6=AD=A3=E7=A1=AE=E7=AD=94=E6=A1=88=20|=20=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E8=B5=B7=E5=A7=8B=E5=A4=A9=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 7 +++++++ src/auto_base.py | 25 +++++++++++++++---------- src/auto_paper/__init__.py | 0 src/auto_paper/auto_paper.py | 30 +++++++++++++++++++++++++++--- src/auto_video/__init__.py | 0 src/config.yml.default | 7 +++++++ src/main.py | 3 ++- 7 files changed, 58 insertions(+), 14 deletions(-) create mode 100644 src/auto_paper/__init__.py create mode 100644 src/auto_video/__init__.py diff --git a/README.md b/README.md index 70b9325..9f38954 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,13 @@ list_url: 课程列表页面的链接 options: --mute-audio # AutoEwt 模式,选填 watch(看课)/ test(做试卷) mode: watch +# 是否 (true / false) 给选择题选择正确答案 +choose_correctly: true +# 如果 choose_correctly 为 true,请填写 report_id 字段,否则可以不动 +# 一张**已经完成**的试卷的 reportId(请到浏览器上方链接中获取该参数的值) +report_id: reportId +# 从第几天开始扫描(用于开发者调试程序方便,当然用户也可以设置,每次启动能省一丢丢时间) +day_to_start_on: 1 ``` > [!NOTE] diff --git a/src/auto_base.py b/src/auto_base.py index 3d8063f..9b77e2d 100644 --- a/src/auto_base.py +++ b/src/auto_base.py @@ -46,7 +46,7 @@ def __init__(self): self.mode = self.config['mode'] self.driver = self.init_driver() - self.login() + self.token = self.login() self.finish_days_list() def init_driver(self) -> webdriver.Edge: @@ -63,20 +63,25 @@ def init_driver(self) -> webdriver.Edge: driver.implicitly_wait(3) return driver - def login(self) -> None: + def login(self) -> str: + """ + 登录 + :return: token + """ logging.info('登录账号……') self.driver.find_element(By.ID, 'login__password_userName').send_keys(self.config['username']) self.driver.find_element(By.ID, 'login__password_password').send_keys(self.config['password']) self.driver.find_element(By.CLASS_NAME, 'ant-btn-block').submit() # 等待一段时间,确保页面加载完成并生成 token time.sleep(3) - # # 获取所有 cookie - # cookies = self.driver.get_cookies() - # token = None - # for cookie in cookies: - # if cookie['name'] == 'token': - # token = cookie['value'] - # break + # 获取所有 cookie + cookies = self.driver.get_cookies() + token = None + for cookie in cookies: + if cookie['name'] == 'token': + token = cookie['value'] + break + return token def click(self, btn: WebElement) -> None: """ @@ -110,7 +115,7 @@ def finish_days_list(self) -> None: time.sleep(5) days = self.driver.find_elements(By.CSS_SELECTOR, 'li[data-active="true"], li[data-active="false"]') logging.info(f'一共有 {len(days)} 天的任务') - for i in range(len(days)): + for i in range(self.config['day_to_start_on'] - 1, len(days)): logging.info(f'================ 第 {i + 1} / {len(days)} 天 ================') self.finish_a_day(days[i]) diff --git a/src/auto_paper/__init__.py b/src/auto_paper/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/auto_paper/auto_paper.py b/src/auto_paper/auto_paper.py index c03b5e7..e9c5dd6 100644 --- a/src/auto_paper/auto_paper.py +++ b/src/auto_paper/auto_paper.py @@ -11,6 +11,8 @@ from selenium.webdriver.remote.webelement import WebElement from auto_base import AutoBase +from .get_corret_answer_v2 import get_answer +from .get_info_by_current_url import get_info_from_url class AutoPaper(AutoBase): @@ -39,12 +41,34 @@ def finish_a_test(self, btn: WebElement): """ self.click_and_switch(btn) + # 获取当前 URL 各参数 + params = get_info_from_url(self.driver.current_url) + biz_code = params['bizCode'] + paper_id = params['paperId'] + + # 统一获取答案 + # API 无法直接获取母题的子题的答案,故在此统一获取 + answers: dict[str, list[str]] = {} + questions = self.driver.find_elements(By.CSS_SELECTOR, '.pm-question > .pm-question-content') + for q in questions: + q_id = q.get_attribute('id')[13:] # 截断前面的 ewt-question- + answers |= get_answer(biz_code, paper_id, str(self.config['report_id']), q_id, self.token) + time.sleep(0.2) + # 完成选择题 options_uls = self.driver.find_elements(By.CLASS_NAME, 'pm-question-options') for ul in options_uls: - items = ul.find_elements(By.CSS_SELECTOR, 'li') - # 随机选一个选项 - self.click(random.choice(items)) + if not self.config['choose_correctly']: + # 随机选一个选项 + items = ul.find_elements(By.CSS_SELECTOR, 'li') + self.click(random.choice(items)) + else: + # 选择正确答案 + q_id = ul.find_element(By.XPATH, './ancestor::*[2]').get_attribute('id')[13:] + for letter in answers[q_id]: + self.click(ul.find_element( + By.XPATH, f".//span[contains(@class, 'pm-tag-letter') and text()='{letter}']" + )) time.sleep(0.2) time.sleep(1) diff --git a/src/auto_video/__init__.py b/src/auto_video/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/config.yml.default b/src/config.yml.default index 379b134..83be2e7 100644 --- a/src/config.yml.default +++ b/src/config.yml.default @@ -8,3 +8,10 @@ list_url: 课程列表页面的链接 options: --mute-audio # AutoEwt 模式,选填 watch(看课)/ test(做试卷) mode: watch +# 是否 (true / false) 给选择题选择正确答案 +choose_correctly: true +# 如果 choose_correctly 为 true,请填写 report_id 字段,否则可以不动 +# 一张**已经完成**的试卷的 reportId(请到浏览器上方链接中获取该参数的值) +report_id: reportId +# 从第几天开始扫描(用于开发者调试程序方便,当然用户也可以设置,每次启动能省一丢丢时间) +day_to_start_on: 1 diff --git a/src/main.py b/src/main.py index a7b7c9b..b5dda2b 100644 --- a/src/main.py +++ b/src/main.py @@ -52,7 +52,8 @@ logging.critical(traceback.format_exc()) logging.critical(f'程序异常崩溃,错误信息: {str(e)},正在自动重启……') finally: - auto.driver.quit() + if 'auto' in locals(): + auto.driver.quit() retry_count += 1 logging.info(f'第 {retry_count} 次重试,将在 {retry_interval} 秒后进行') From f543639697f893f4f29649bd76e53739f9a41b59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=96=9B=E5=AE=9A=E8=B0=94=E7=9A=84=E6=8C=89=E9=92=AE?= Date: Sat, 26 Jul 2025 15:17:54 +0800 Subject: [PATCH 28/31] =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E5=88=B0=E6=9C=80=E4=B8=8B|=E6=8F=90?= =?UTF-8?q?=E7=A4=BAheadless=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config.yml.default | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config.yml.default b/src/config.yml.default index 93ff2e7..b1f8f65 100644 --- a/src/config.yml.default +++ b/src/config.yml.default @@ -4,8 +4,6 @@ driver_path: 浏览器驱动路径 username: 用户名 password: 密码 list_url: 课程列表页面的链接 -# 浏览器启动时的参数,这里给了个静音 -options: --mute-audio # AutoEwt 模式,选填 video(看课)/ paper(做试卷) mode: video # 是否 (true / false) 给选择题选择正确答案 @@ -15,3 +13,5 @@ choose_correctly: true report_id: reportId # 从第几天开始扫描(用于开发者调试程序方便,当然用户也可以设置,每次启动能省一丢丢时间) day_to_start_on: 1 +# 浏览器启动时的参数,这里给了个静音(--mute-audio),参数还有:无头——隐藏浏览器窗口(--headless) +options: --mute-audio \ No newline at end of file From 19997c05d150f8a46af8d8f8259b4b57f3e40b50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9D=80=E7=81=AB=E7=9A=84=E5=86=B0=E5=9D=97nya?= <161030746+zhdbk3@users.noreply.github.com> Date: Sat, 26 Jul 2025 17:52:49 +0800 Subject: [PATCH 29/31] =?UTF-8?q?Update=20README.md:=20=E5=BF=98=E6=94=B9?= =?UTF-8?q?=20README=20=E4=B8=AD=E7=9A=84=E9=85=8D=E7=BD=AE=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9f38954..ca5cc3b 100644 --- a/README.md +++ b/README.md @@ -50,8 +50,8 @@ password: 密码 list_url: 课程列表页面的链接 # 浏览器启动时的参数,这里给了个静音 options: --mute-audio -# AutoEwt 模式,选填 watch(看课)/ test(做试卷) -mode: watch +# AutoEwt 模式,选填 video(看课)/ paper(做试卷) +mode: video # 是否 (true / false) 给选择题选择正确答案 choose_correctly: true # 如果 choose_correctly 为 true,请填写 report_id 字段,否则可以不动 From 6286cfe370756472aad5a1f883060cb5a17db401 Mon Sep 17 00:00:00 2001 From: zhdbk3 Date: Thu, 31 Jul 2025 13:25:02 +0800 Subject: [PATCH 30/31] =?UTF-8?q?=E8=A1=A5=E5=85=85=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=90=8E=E7=AD=89=E5=BE=85=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/auto_base.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/auto_base.py b/src/auto_base.py index 9b77e2d..0a6b223 100644 --- a/src/auto_base.py +++ b/src/auto_base.py @@ -102,6 +102,7 @@ def click_and_switch(self, btn: WebElement) -> None: # 切换到当前页面 handles = self.driver.window_handles self.driver.switch_to.window(handles[1]) + time.sleep(3) def close_and_switch(self) -> None: """关闭当前页面并返回到首页""" From 08933c1f5035a6d8be8ac477675b10df0b44b7f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=96=9B=E5=AE=9A=E8=B0=94=E7=9A=84=E6=8C=89=E9=92=AE?= Date: Fri, 6 Feb 2026 19:54:43 +0800 Subject: [PATCH 31/31] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=B7=E8=AF=BE?= =?UTF-8?q?=E5=92=8C=E5=88=B7=E8=AF=95=E5=8D=B7=E2=80=9C=E5=8E=BB=E5=AD=A6?= =?UTF-8?q?=E4=B9=A0=E2=80=9D=E6=8C=89=E9=92=AEXPath?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ewt对此有更新,此前版本失效 --- src/auto_paper/auto_paper.py | 2 +- src/auto_video/auto_video.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/auto_paper/auto_paper.py b/src/auto_paper/auto_paper.py index e9c5dd6..e3ab478 100644 --- a/src/auto_paper/auto_paper.py +++ b/src/auto_paper/auto_paper.py @@ -21,7 +21,7 @@ def finish_a_day(self, day: WebElement) -> None: time.sleep(2) btns = self.driver.find_elements( By.XPATH, - "//div[contains(@class, 'btn-3dDLy')][contains(., '测一测') or contains(., '继续答')]") + "//div[contains(@class, 'btn-AoqsA')][contains(., '测一测') or contains(., '继续答')]") unit = '张试卷' logging.info(f'该天还剩 {len(btns)} {unit}') for i in range(len(btns)): diff --git a/src/auto_video/auto_video.py b/src/auto_video/auto_video.py index 3b99770..2d2ddbb 100644 --- a/src/auto_video/auto_video.py +++ b/src/auto_video/auto_video.py @@ -23,7 +23,7 @@ def finish_a_day(self, day: WebElement) -> None: time.sleep(2) btns = self.driver.find_elements( By.XPATH, - "//div[contains(@class, 'btn-3dDLy') " + "//div[contains(@class, 'btn-AoqsA') " "and .//text()[contains(., '学')] " "and not(.//text()[contains(., '已学完')])]") unit = '节课'