devin-kung / xxqg Goto Github PK
View Code? Open in Web Editor NEW学习强国 xxqg 无人值守自动看视频、看文章、自动答题(每日答题、每周答题、专项答题),45分/天
License: MIT License
学习强国 xxqg 无人值守自动看视频、看文章、自动答题(每日答题、每周答题、专项答题),45分/天
License: MIT License
谷歌浏览器是92.0.4515.107 ,执行插件,提示有chromedriver更新,更新完就报错,发现自动更新了93的chromedriver,后来卸载浏览器装93开发者版浏览器也是报错。
--> 当前chromedriver不是最新,准备进行更新
--> chromedriver下载成功
--> 解压成功
--> 压缩包已删除
--> chromedriver更新成功
Traceback (most recent call last):
File "xuexi.py", line 113, in
File "custom\xuexi_chrome.py", line 10, in init
File "selenium\webdriver\chrome\webdriver.py", line 76, in init
File "selenium\webdriver\remote\webdriver.py", line 157, in init
File "selenium\webdriver\remote\webdriver.py", line 252, in start_session
File "selenium\webdriver\remote\webdriver.py", line 321, in execute
File "selenium\webdriver\remote\errorhandler.py", line 242, in check_response
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 93
Current browser version is 92.0.4515.107 with binary path C:\Program Files\Google\Chrome\Application\chrome.exe
--> 程序异常,请尝试重启脚本
--> 当前版本:1.0.8.1
请按任意键继续. . .
以上是自动更新chromedriver后的报错。
Traceback (most recent call last):
File "xuexi.py", line 113, in
File "custom\xuexi_chrome.py", line 10, in init
File "selenium\webdriver\chrome\webdriver.py", line 76, in init
File "selenium\webdriver\remote\webdriver.py", line 157, in init
File "selenium\webdriver\remote\webdriver.py", line 252, in start_session
File "selenium\webdriver\remote\webdriver.py", line 321, in execute
File "selenium\webdriver\remote\errorhandler.py", line 242, in check_response
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 93
Current browser version is 92.0.4515.107 with binary path C:\Program Files\Google\Chrome\Application\chrome.exe
--> 程序异常,请尝试重启脚本
--> 当前版本:1.0.8.1
请按任意键继续. . .
以上是更新chromedriver后重启再次执行的报错。
没有开每周答题的时间开关,出现这个错误提示,重开还提示。
->请在5分钟丙扫码完成登录>登录成功|每日登录|选读文章|视频数量|视频时长|每日答题|每周答题|专项答题|今日累计积分|成长总积分|1分/1分 |12分/12分 |6分/6分|6分/6分|5分/5分|0分/5分|0分/10分|30分|14847分>当前题目进度:1/5最大概率选项:AB当前题自进度:2/5最大概率选项:C当前题自进度:3/5最大概萃选项:A当前题自进度:4/5最大概率选项:A当前题自进度:5/5最大概率选项:ABCD-->
答题结束Alert Text:{Alert text:
Message:unexpected alert open:fAlert text:}(Session info:chrome=88.0.4324.182)>程序异常,请尝试重启脚本HOLE请按任意键继续
1.0.4.0每次运行每周答题答第五题结束就会出错退出。也没有得到每周答题的积分。
设置是
{
"浏览文章": "true",
"观看视频": "true",
"自动答题": "true",
"每日答题": "true",
"每周答题": "true",
"专项答题": "true"
}
谷歌浏览器版本:chrome=88.0.4324.190
错误提示:
│ 每日登录 │ 选读文章 │ 视频数量 │ 视频时长 │ 每日答题 │ 每周答题 │ 专项答题 │ 今日累计积分 │ 成长总积分 │
├──────────┼───────────┼──────────┼──────────┼──────────┼──────────┼──────────┼──────────────┼────────────┤
│ 1分/1分 │ 12分/12分 │ 6分/6分 │ 6分/6分 │ 5分/5分 │ 0分/5分 │ 0分/10分 │ 30分 │ 14887分 │
└──────────┴───────────┴──────────┴──────────┴──────────┴──────────┴──────────┴──────────────┴────────────┘
--> 当前题目进度:1/5
--> 最大概率选项: A B
--> 当前题目进度:2/5
--> 最大概率选项: C
--> 当前题目进度:3/5
--> 最大概率选项: A
--> 当前题目进度:4/5
--> 最大概率选项: A
--> 当前题目进度:5/5
--> 最大概率选项: A B C D
--> 答题结束
Alert Text: {Alert text :
Message: unexpected alert open: {Alert text : }
(Session info: chrome=88.0.4324.190)
--> 程序异常,请尝试重启脚本
连续运行了多次,每次都出这个错误。
最近(1.0.6.0)以来,专项时不时会出现9分,程序检查积分时发现分数不够,会自动开始新一轮答题,造成第二轮只得1分。这样其实有点浪费分数,因为第二轮的题目得1分以后不能重复得分,能否把专项答题的规则改成每日一次?
个人意见,仅供参考,不喜勿喷。
谢谢作者的努力!
Traceback (most recent call last):
File "xuexi.py", line 134, in
File "xuexi.py", line 36, in user_login
File "userOperation\login.py", line 15, in login
File "selenium\webdriver\remote\webdriver.py", line 394, in find_element_by_xpath
File "selenium\webdriver\remote\webdriver.py", line 976, in find_element
File "selenium\webdriver\remote\webdriver.py", line 321, in execute
File "selenium\webdriver\remote\errorhandler.py", line 242, in check_response
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"/html/body/div[1]/div/div[2]/div[2]/div[1]/div/div/div/iframe"}
(Session info: chrome=91.0.4472.77)
Traceback (most recent call last):
File "xuexi.py", line 114, in
File "xuexi.py", line 44, in run
File "userOperation\check.py", line 70, in check_task
IndexError: list index out of range
--> 程序异常,请尝试重启脚本
浏览器窗口和程序窗口能最小化后台运行就好了。
方便摸鱼啊
教科书般的代码范本,流程清晰,连我这种半拉子都能看懂。作者一定是python大佬,该项目值得学习。
首先非常感谢大家的支持与反馈
但在反馈问题时请注意以下几点,这样有助于更快速的定位问题和解决问题
- 提issue前请先看一下该问题是否已经有人提出过了,请不要重复提相同的问题
- 反馈bug的时候请描述清楚出现问题的过程、浏览器的截图(如果有的话)和控制台输出的日志
感谢大家的理解!
Message: no such element: Unable to locate element: {"method":"xpath","selector":"/html/body/div[1]/div/div[2]/div/div[3]/div[2]/div[2]/div[3]/div[1]/div[2]"}
(Session info: chrome=91.0.4472.77)
能否生成一份EXE
Traceback (most recent call last):
File "xuexi.py", line 134, in
File "xuexi.py", line 36, in user_login
File "userOperation\login.py", line 17, in login
File "selenium\webdriver\remote\webdriver.py", line 394, in find_element_by_xpath
File "selenium\webdriver\remote\webdriver.py", line 978, in find_element
File "selenium\webdriver\remote\webdriver.py", line 321, in execute
File "selenium\webdriver\remote\errorhandler.py", line 242, in check_response
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"/html/body/div/div/div[1]"}
(Session info: chrome=93.0.4577.63)
--> 程序异常,请尝试重启脚本
--> 当前版本:1.0.8.2
WIN7 32位系统无法运行吗?提示版本不兼容?
没有exe文件
HTTPSConnectionPool(host='www.xuexi.cn', port=443): Max retries exceeded with url: /lgdata/u1ght1omn2.json (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1122)')))
--> 程序异常,请尝试重启脚本
好像是我这网络的问题
下载最新的1.30版本的,运行脚本,其他都正常,每日答题也正常,就是每周答题和专项答题,一进答题界面就会跳转到每日答题那里,然后就提示提交已到上限。
[Errno 2] No such file or directory: './data/exam_temp.json'
--> 程序异常,请尝试重启脚本
Traceback (most recent call last):
File "G:\autoxuexi-2.1.0\xxqg-master\xuexi.py", line 115, in
os.remove(exam_temp_Path)
FileNotFoundError: [WinError 3] 系统找不到指定的路径。: './data/exam_temp.json'
Traceback (most recent call last):
File "urllib3\connectionpool.py", line 699, in urlopen
File "urllib3\connectionpool.py", line 382, in make_request
File "urllib3\connectionpool.py", line 1010, in validate_conn
File "urllib3\connection.py", line 411, in connect
File "urllib3\util\ssl.py", line 428, in ssl_wrap_socket
File "urllib3\util\ssl.py", line 472, in _ssl_wrap_socket_impl
File "ssl.py", line 500, in wrap_socket
File "ssl.py", line 1040, in _create
File "ssl.py", line 1309, in do_handshake
ConnectionResetError: [WinError 10054] 远程主机强迫关闭了一个现有的连接。
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "requests\adapters.py", line 439, in send
File "urllib3\connectionpool.py", line 755, in urlopen
File "urllib3\util\retry.py", line 531, in increment
File "urllib3\packages\six.py", line 734, in reraise
File "urllib3\connectionpool.py", line 699, in urlopen
File "urllib3\connectionpool.py", line 382, in make_request
File "urllib3\connectionpool.py", line 1010, in validate_conn
File "urllib3\connection.py", line 411, in connect
File "urllib3\util\ssl.py", line 428, in ssl_wrap_socket
File "urllib3\util\ssl.py", line 472, in _ssl_wrap_socket_impl
File "ssl.py", line 500, in wrap_socket
File "ssl.py", line 1040, in _create
File "ssl.py", line 1309, in do_handshake
urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接 。', None, 10054, None))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "xuexi.py", line 92, in
File "operation\check_version.py", line 24, in check
File "operation\check_version.py", line 14, in get_latest_version
File "requests\api.py", line 76, in get
File "requests\api.py", line 61, in request
File "requests\sessions.py", line 542, in request
File "requests\sessions.py", line 655, in send
File "requests\adapters.py", line 498, in send
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None))
--> 程序异常,请尝试重启脚本
--> 当前版本:1.0.8.0
请按任意键继续. . .
Traceback (most recent call last):
File "operation\get_chromedriver.py", line 13, in do
File "operation\get_chromedriver.py", line 66, in get_version
IndexError: list index out of range
chrome是最新版本 chromedriver也是对应的版本 大神求解答
Traceback (most recent call last):
File "xuexi.py", line 114, in
File "xuexi.py", line 44, in run
File "userOperation\check.py", line 51, in check_task
File "selenium\webdriver\remote\webdriver.py", line 333, in get
File "selenium\webdriver\remote\webdriver.py", line 321, in execute
File "selenium\webdriver\remote\errorhandler.py", line 241, in check_response
selenium.common.exceptions.UnexpectedAlertPresentException: Alert Text: {Alert text :
Message: unexpected alert open: {Alert text : }
(Session info: chrome=91.0.4472.77)
每周答题遇到视频问题时会报错退出。
比如对战之类的
4人赛和双人赛支持就好了,能连接到手机APP更棒~
毕竟这个在手机APP上才具有完全的功能
Traceback (most recent call last):
File "xuexi.py", line 114, in
File "xuexi.py", line 44, in run
File "userOperation\check.py", line 51, in check_task
File "selenium\webdriver\remote\webdriver.py", line 333, in get
File "selenium\webdriver\remote\webdriver.py", line 321, in execute
File "selenium\webdriver\remote\errorhandler.py", line 241, in check_response
selenium.common.exceptions.UnexpectedAlertPresentException: Alert Text: {Alert text :
Message: unexpected alert open: {Alert text : }
(Session info: chrome=91.0.4472.77)
--> 程序异常,请尝试重启脚本
希望可以加入日期检测,固定每周几答题,不用手动修改配置json
网上其他的都没有你的好!维护一下吧QAQ
报错如下:
Traceback (most recent call last):
File "E:/xxqg-1.0.8.0/xuexi.py", line 116, in
exam_temp_Path = './data/exam_temp.json'
应该是/data/exam_temp.json文件没有,这个文件能发一下吗?
win 10操作系统,错误信息如下,似乎是找不到视频控件
Traceback (most recent call last):
File "xuexi.py", line 136, in
File "xuexi.py", line 59, in run
File "operation\watch_video.py", line 27, in watch_video
File "selenium\webdriver\remote\webdriver.py", line 394, in find_element_by_xpath
File "selenium\webdriver\remote\webdriver.py", line 976, in find_element
File "selenium\webdriver\remote\webdriver.py", line 321, in execute
File "selenium\webdriver\remote\errorhandler.py", line 242, in check_response
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"/html/body/div/div/section/div/div/div/div/div[2]/section/div/div/div/div/div/div/div/div[1]/div[2]/div/div[1]/div[1]/div/video"}
(Session info: chrome=92.0.4515.159)
作者您好!WIN10 32位系统提示版本不兼容,你编译的软件只能在64位系统下运行吗?
能不能编译个32位版本的呀?
Traceback (most recent call last):
File "xuexi.py", line 113, in
File "custom\xuexi_chrome.py", line 11, in init
File "selenium\webdriver\chrome\webdriver.py", line 81, in init
File "selenium\webdriver\remote\webdriver.py", line 157, in init
File "selenium\webdriver\remote\webdriver.py", line 252, in start_session
File "selenium\webdriver\remote\webdriver.py", line 321, in execute
File "selenium\webdriver\remote\errorhandler.py", line 242, in check_response
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot create temp dir for user data dir
--> 程序异常,请尝试重启脚本
--> 当前版本:1.0.8.2
请按任意键继续. . .
建议碰到视频问题后跳过这一部分继续执行其他答题。
要不每次碰到有视频答题的问题就会一直卡壳
保持自动登录状态下,没有每日登录的分数。其它的44分全有,这个bug,感觉容易暴露啊
def get_ans_from_db(question):
"""
:param question:
:return:
"""
try:
import sqlite3
conn = sqlite3.connect('./data/tiku.db')
sql = "select answer from tiku where question like '%" + question + "%'"
cursor = conn.cursor()
values = cursor.execute(sql).fetchall()
if len(values) > 0:
return values[0][0]
else:
return '不知道'
except:
return '不知道'
经过分析,browser.execute_script('arguments[0].scrollIntoView();', login_QR_box)
会导致QR在内框iframe内滚动
去掉切换到内部iframe,并改成browser.execute_script('arguments[0].scrollIntoView();', iframe)
解决问题
Traceback (most recent call last):
File "xuexi.py", line 113, in
File "custom\xuexi_chrome.py", line 14, in init
File "selenium\webdriver\chrome\webdriver.py", line 81, in init
File "selenium\webdriver\remote\webdriver.py", line 157, in init
File "selenium\webdriver\remote\webdriver.py", line 252, in start_session
File "selenium\webdriver\remote\webdriver.py", line 321, in execute
File "selenium\webdriver\remote\errorhandler.py", line 242, in check_response
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 94
Current browser version is 93.0.4577.63 with binary path C:\Program Files\Google\Chrome\Application\chrome.exe
--> 程序异常,请尝试重启脚本
--> 当前版本:1.0.8.3
请按任意键继续. . . 2021-9-9
--> 程序当前版本号:1.0.8.2,最新版本号:1.0.8.3,该版本可能已过时,建议下载最新版本以获得更好的体验!
--> 下载地址:https://github.com/PRaichu/xxqg/releases/latest
--> 当然,你也可以选择不更新,这不会影响当前程序的使用!
Traceback (most recent call last):
File "xuexi.py", line 113, in
File "custom\xuexi_chrome.py", line 11, in init
File "selenium\webdriver\chrome\webdriver.py", line 81, in init
File "selenium\webdriver\remote\webdriver.py", line 157, in init
File "selenium\webdriver\remote\webdriver.py", line 252, in start_session
File "selenium\webdriver\remote\webdriver.py", line 321, in execute
File "selenium\webdriver\remote\errorhandler.py", line 242, in check_response
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 94
Current browser version is 93.0.4577.63 with binary path C:\Program Files\Google\Chrome\Application\chrome.exe
--> 程序异常,请尝试重启脚本
--> 当前版本:1.0.8.2
请按任意键继续. . . 2021-9-9
--> 请在5分钟内完成登录
--> 登录成功
Message: no such element: Unable to locate element: {"method":"xpath","selector":"/html/body/div[1]/div/div[2]/div/div[3]/div[2]/div[2]/div[3]/div[1]/div[2]"}
(Session info: chrome=90.0.4430.212)
--> 程序异常,请尝试重启脚本
chromedriver.exe 是和系统版本一致的 90.0.4430.xxx
换其他XXQG账号登录,没有问题,就是某一个账号一直出现这样的问题,以前都正常
用的1.04、1.05,都有是这样
TAT 你拯救了一个国企上班族的劳累的心灵
PRaichu 我的超人
不知道你是否在墙内,在的话一定要保重啊!!
被逮到估计会判刑吧...
Traceback (most recent call last):
File "xuexi.py", line 113, in
File "custom\xuexi_chrome.py", line 10, in init
File "selenium\webdriver\chrome\webdriver.py", line 76, in init
File "selenium\webdriver\remote\webdriver.py", line 157, in init
File "selenium\webdriver\remote\webdriver.py", line 252, in start_session
File "selenium\webdriver\remote\webdriver.py", line 321, in execute
File "selenium\webdriver\remote\errorhandler.py", line 242, in check_response
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary
--> 程序异常,请尝试重启脚本
--> 当前版本:1.0.8.1
请按任意键继续. . .
--> 请在5分钟内完成登录
--> 登录成功
┌────────┬────────┬────────┬────────┬───────┬────────┬───────┬────────┬───────┐
│ 每日 … │ 选读 … │ 视频 … │ 视频 … │ 每日… │ 每周 … │ 专项… │ 今日 … │ 成长… │
├────────┼────────┼────────┼────────┼───────┼────────┼───────┼────────┼───────┤
│ 1分/1… │ 12分/… │ 6分/6… │ 6分/6… │ 5分/… │ 0分/5… │ 0分/… │ 33分 │ 1106… │
└────────┴────────┴────────┴────────┴───────┴────────┴───────┴────────┴───────┘
Message: stale element reference: element is not attached to the page document
(Session info: chrome=88.0.4324.146)
--> 程序异常,请尝试重启脚本
----------------------------------------------------------------------------------------------------------------------------------------------上面这个报错是什么原因?调试发现是在每周答题切换至第2页报错,辛苦大神看下。
Traceback (most recent call last):
File "urllib3\connectionpool.py", line 696, in urlopen
File "urllib3\connectionpool.py", line 964, in prepare_proxy
File "urllib3\connection.py", line 359, in connect
File "urllib3\connection.py", line 496, in connect_tls_proxy
File "urllib3\util\ssl.py", line 432, in ssl_wrap_socket
File "urllib3\util\ssl.py", line 474, in _ssl_wrap_socket_impl
File "ssl.py", line 500, in wrap_socket
File "ssl.py", line 1040, in _create
File "ssl.py", line 1309, in do_handshake
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1122)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "requests\adapters.py", line 439, in send
File "urllib3\connectionpool.py", line 755, in urlopen
File "urllib3\util\retry.py", line 573, in increment
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='www.xuexi.cn', port=443): Max retries exceeded with url: /lgdata/u1ght1omn2.json (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1122)')))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "xuexi.py", line 110, in
File "getData\get_article.py", line 18, in get_article
File "requests\api.py", line 76, in get
File "requests\api.py", line 61, in request
File "requests\sessions.py", line 542, in request
File "requests\sessions.py", line 655, in send
File "requests\adapters.py", line 514, in send
requests.exceptions.SSLError: HTTPSConnectionPool(host='www.xuexi.cn', port=443): Max retries exceeded with url: /lgdata/u1ght1omn2.json (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1122)')))
--> 程序异常,请尝试重启脚本
__/\\\\\\\\\\\\\____/\\\________/\\\__________/\\\\\\\\\\\\__/\\\\\\\\\\\\_____/\\\\\\\\\\\\\\\_
_\/\\\/////////\\\_\///\\\____/\\\/_________/\\\//////////__\/\\\////////\\\__\/\\\///////////__
_\/\\\_______\/\\\___\///\\\/\\\/__________/\\\_____________\/\\\______\//\\\_\/\\\_____________
_\/\\\\\\\\\\\\\\______\///\\\/___________\/\\\____/\\\\\\\_\/\\\_______\/\\\_\/\\\\\\\\\\\_____
_\/\\\/////////\\\_______\/\\\____________\/\\\___\/////\\\_\/\\\_______\/\\\_\/\\\///////______
_\/\\\_______\/\\\_______\/\\\____________\/\\\_______\/\\\_\/\\\_______\/\\\_\/\\\_____________
_\/\\\_______\/\\\_______\/\\\____________\/\\\_______\/\\\_\/\\\_______/\\\__\/\\\_____________
_\/\\\\\\\\\\\\\/________\/\\\____________\//\\\\\\\\\\\\/__\/\\\\\\\\\\\\/___\/\\\_____________
_\/////////////__________\///______________\////////////____\////////////_____\///______________
请按任意键继续. . .
请问是怎么设置的是直接修改true改为数字吗?
exe文件执行,如图计算机丢失api-ms-win-croe-path-l1-1-0.dll。py代码运行,报错== RESTART: C:\Users\Administrator\Desktop\xxqg-master(1)\xxqg-master\xuexi.py =
Traceback (most recent call last):
File "C:\Users\Administrator\Desktop\xxqg-master(1)\xxqg-master\operation\get_chromedriver.py", line 13, in do
version = get_version(program_path)
File "C:\Users\Administrator\Desktop\xxqg-master(1)\xxqg-master\operation\get_chromedriver.py", line 66, in get_version
return version_info.split(' ')[1]
IndexError: list index out of range
--> 程序异常,请确保你的chrome浏览器是最新版本,然后重启脚本
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.