lisztomania-p / learning-power Goto Github PK
View Code? Open in Web Editor NEW学习强国 自动化 百分百正确、瞬间答题,分值45分
License: MIT License
学习强国 自动化 百分百正确、瞬间答题,分值45分
License: MIT License
D:\learning-power-1.0>python main.py
Traceback (most recent call last):
File "main.py", line 14, in
from inside.Options.Options_Manage import OPTIONS_MANAGE
File "D:\learning-power-1.0\inside\Options\Options_Manage.py", line 10, in
from inside.Baidu_AI.Baidu_AI_Manage import BAIDU_AI_MANAGE
File "D:\learning-power-1.0\inside\Baidu_AI\Baidu_AI_Manage.py", line 10, in
from inside.Baidu_AI.Baidu_AI_Tools import BAIDU_AI_TOOLS
File "D:\learning-power-1.0\inside\Baidu_AI\Baidu_AI_Tools.py", line 11, in
import cv2
ModuleNotFoundError: No module named 'cv2'
D:\learning-power-1.0>
大佬请帮忙看看
@lisztomania-Zero 感谢提供了这个repo,新年快乐。我最新版本的好像有的时候会卡在最后一题,就进度一直80%不走了。重复的话有的时候就能行,大概四次有一次可以顺利过。我看到在#27 里面也有人提这个问题,所以就发个issue佛系看看有没有类似的同志或者什么解决的办法。
没有 就卡住了的话能几个小时都还是没有任何报错 每次都是我自己结束
Originally posted by @freshn in #44 (comment)
我跟你的问题一摸一样,答题的时候就卡到最后一题,文章视频什么的都正常。
PS D:\软件安装包\learning-power-master\learning-power-master> python main.py
检测到谷歌浏览器未安装,无法进行本程序
都安装完了,还是提示这个,谷歌浏览器是必须卸载再重新安一边你的那个同版本吗,db.db这个文件夹也没生成
Starting ChromeDriver 88.0.4324.96 (68dba2d8a0b149a1d3afac56fa74648032bcf46b-refs/branch-heads/4324@{#1784}) on port 9515
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
安装的那个谷歌浏览器exe文件打开就是这样的提示,也是正常安装了啊
很懵,求大佬解答,看一下您的 邮箱呗
之前用的还行 自己答题 用程序走一下123任务就OK了 突然看见更新了 下载了新版就一直出问题
是否静音(Y/n):y
是否显示自动化过程(y/N):n
是否持久化登录(Y/n):y
Traceback (most recent call last):
File "main.py", line 24, in
MITMDUMP().Open()
File "C:\Users\woode\Desktop\pythonlol\learning-power-master\inside\Task\Mitmdump\Mitmdump.py", line 36, in Open
self.__mitmdump = subprocess.Popen(
File "C:\Users\woode\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 854, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\woode\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 1307, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] 系统找不到指定的文件。
[init_driver.py]
添加权限操作(只添加这一句)
os.chmod(DRIVER_FILE, 755)
driver = webdriver.Chrome(
desired_capabilities=caps,
executable_path=DRIVER_FILE,
)
[answer.py]
做如下修改(文本不匹配,进行修改匹配):将 (1) 修改成 (2)
(1) if self.__answer_topic_desc in answer['body'].replace('()', ''):
(2) if self.__answer_topic_desc.replace('\n', '') in answer['body'].replace('()', '').replace('--|--', '来源:'):
[answer.py]
做如下修改(对标点符号进行替换):将 (1) 修改成 (2)
(1) if correct['content'] == desc:
(2) if correct['content'].replace("“", "").replace("”", "") == desc:
以上修改在mac系统都是可行的,其他不敢保证。大佬有需要我可以直接提PR
Traceback (most recent call last):
File "main.py", line 23, in
OPTIONS_MANAGE.Init_Options()
File "/Users/**/Desktop/learning-power-master/inside/Options/Options_Manage.py", line 97, in Init_Options
cls.__Baidu_AI()
File "/Users/zrz/Desktop/learning-power-master/inside/Options/Options_Manage.py", line 77, in __Baidu_AI
with open(PATH().Baidu_AI_On, 'w', encoding='utf-8') as f:
FileNotFoundError: [Errno 2] No such file or directory: '~/Desktop/learning-power-master/inside/Task/Mitmdump/Intercept/on'
Traceback (most recent call last):
File "main.py", line 22, in
os.system(command=SYSTEM().Clear)
TypeError: system() got an unexpected keyword argument 'command'
C:\1>pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple
Looking in indexes: https://mirrors.aliyun.com/pypi/simple
ERROR: Could not find a version that satisfies the requirement mitmproxy~=6.0.2
ERROR: No matching distribution found for mitmproxy~=6.0.2
你好,非常感谢你的软件。
我使用其他几个选项都正常工作。
但在尝试播放视频的时候失败了。
浏览器显示.json结尾的文件下载失败,请问您有什么建议吗?
运行后如果 选择“是否显示自动化过程(y/N):y”,打开浏览器后,不显示图片,也不切换二维码页面,如果复制链接,重新打开浏览器,手动点击一切正常,也可以显示二维码。
E:\PythonWork\learning-power-master\venv\Scripts\python.exe E:/PythonWork/learning-power-master/main.py
是否静音(Y/n):y
是否显示自动化过程(y/N):n
是否持久化登录(Y/n):y
Traceback (most recent call last):
File "E:\PythonWork\learning-power-master\main.py", line 28, in
if LOGIN(task_driver=driver.Task).Login():
File "E:\PythonWork\learning-power-master\inside\Login\Login.py", line 324, in Login
return self._Login()
File "E:\PythonWork\learning-power-master\inside\Login\Login.py", line 277, in _Login
qr = self.__Get_QR()
File "E:\PythonWork\learning-power-master\inside\Login\Login.py", line 82, in __Get_QR
qr_iframe = self.__QR_Iframe()
File "E:\PythonWork\learning-power-master\inside\Login\Login.py", line 59, in __QR_Iframe
return self.__wait.until(iframe_Ec)
File "E:\PythonWork\learning-power-master\venv\lib\site-packages\selenium\webdriver\support\wait.py", line 80, in until
raise TimeoutException(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message:
两个专项答题的bug,由于点太小,就不提PR了,请作者fix:
已经得分的专项答题会重复答题,但是不会重复得分,所以需要将已得分的专题踢掉
analysis.py __init_topic
for topics in code['data_str']['list']:
if not topics['overdue'] and topics['achievement']['correct'] != USER_PROJECT_ANSWER_TASKS:
self.__topic_list.append(topics)
有种题型是选择型判断题,提示里面的信息不是标红的直接为答案,需要判断下是否一致,不一致才是错误
answer.py __do_choosable
t_answers = [correct['content'] for correct in answer['answers']]
if len(t_answers) > 0:
is_tstm = t_answers[0] == '正确'
if is_tstm:
label = 'A' if descs[0] in self.__answer_topic_desc else 'B'
self.__answer_choosables[label].click()
time.sleep(0.1)
else:
for correct in answer['answers']:
for desc in descs:
if correct['content'] == desc:
self.__answer_choosables[correct['label']].click()
time.sleep(0.1)
经过配置工作已经正常,但答题时最后一步提交网页会弹出验证(手动拖动滑块),把验证滑块拖到最右边也验证失败,刷新也没作用,我是不是要careful了233333
File "C:\Users\hellsion\Desktop\learning-power-master\learning-power-master\main.py", line 19, in
task_manage = Task_Manage(driver=driver)
File "C:\Users\hellsion\Desktop\learning-power-master\learning-power-master\task\task_manage.py", line 48, in init
self.__refresh_user_msg()
File "C:\Users\hellsion\Desktop\learning-power-master\learning-power-master\task\task_manage.py", line 59, in __refresh_user_msg
self.__user_msg[USER_KEYS[4]] = analysis_msg.task_bar
File "C:\Users\hellsion\Desktop\learning-power-master\learning-power-master\tools\analysis.py", line 115, in task_bar
task_bar[TASK_ID[task['ruleId']]] = task
KeyError: 21
不会自动选答案,不会自动下一题
驱动已更换,请指教,谢谢!
同事有两三个左右,但是设置自动登录的话,打开默认就自动登录了, 咋切换账号= =。
我尝试在开一个命令,也不行,也无法一个刷完后,在重新登录一个
专项:历史上的阅兵(含有视频),开了百度AI识别,然后还在不停的做了很多个专项,还好没提交
pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple
然后就出现如下信息
Could not fetch URL https://mirrors.aliyun.com/pypi/simple/mitmproxy/: There was
a problem confirming the ssl certificate: HTTPSConnectionPool(host='mirrors.ali
yun.com', port=443): Max retries exceeded with url: /pypi/simple/mitmproxy/ (Cau
sed by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] ce
rtificate verify failed: unable to get local issuer certificate (_ssl.c:1124)'))
) - skipping
ERROR: Could not find a version that satisfies the requirement mitmproxy~=6.0.2
(from -r requirements.txt (line 1)) (from versions: none)
ERROR: No matching distribution found for mitmproxy~=6.0.2 (from -r requirements
.txt (line 1))
Could not fetch URL https://mirrors.aliyun.com/pypi/simple/pip/: There was a pro
blem confirming the ssl certificate: HTTPSConnectionPool(host='mirrors.aliyun.co
m', port=443): Max retries exceeded with url: /pypi/simple/pip/ (Caused by SSLEr
ror(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate ve
rify failed: unable to get local issuer certificate (_ssl.c:1124)'))) - skipping
请教大佬,是版本问题吗?
Traceback (most recent call last):
File "main.py", line 12, in
from inside.Driver.Driver_Manage import DRIVER_MANAGE
File "D:\Program Files\learning-power-1.0\inside\Driver\Driver_Manage.py", line 13, in
from inside.Config.Api import API
File "D:\Program Files\learning-power-1.0\inside\Config\Api.py", line 9, in
from ping3 import ping
ModuleNotFoundError: No module named 'ping3'
可是读文章,专项答题,别的不能用
按照 README 说明,无论是用 pip 默认源还是用阿里源,都会提示找不到 mitmproxy:
ERROR: Could not find a version that satisfies the requirement mitmproxy~=6.0.2
ERROR: No matching distribution found for mitmproxy~=6.0.2
但是实际上 mitmproxy 是有这个版本的 。于是先尝试使用 pip install mitmproxy
安装,结果安装的是 /usr/local/lib/python3.7/dist-packages (5.3.0)
我检查了自己的 pip 版本, pip --version
,得到的结果是 pip 21.0.1 from /usr/local/lib/python3.7/dist-packages/pip (python 3.7)
看起来好像也没什么问题。。。。所以是哪里出错了。
python3 -m pip install -r requirements.txt 结果也是一样的。
RT
驱动下载成功放到driver文件夹里的了,连接服务器后提示找不到chromedriver 二进制文件
请选择任务:
1、文章 2、视频 3、每日答题 4、每周答题 5、专项答题(此项有点BUG)
选择(选项请使用空格隔开,退出输入0):4
Traceback (most recent call last):
File "main.py", line 23, in
task_manage.start()
File "C:\Users\54075\Desktop\learning-power-master\task\task_manage.py", line 314, in start
self.__accomplish_weekly_answer()
File "C:\Users\54075\Desktop\learning-power-master\task\task_manage.py", line 294, in __accomplish_weekly_answer
self.__do_weekly_answer_task()
File "C:\Users\54075\Desktop\learning-power-master\task\task_manage.py", line 242, in __do_weekly_answer_task
num = self.__weekly_task.get_topic()
File "C:\Users\54075\Desktop\learning-power-master\tools\analysis.py", line 287, in get_topic
index: int = get_random.get_random_int(0, topic_num - 1)
File "C:\Users\54075\Desktop\learning-power-master\tools\get_random.py", line 15, in get_random_int
return random.randint(a=a, b=b)
File "C:\Users\54075\AppData\Local\Programs\Python\Python38-32\lib\random.py", line 248, in randint
return self.randrange(a, b+1)
File "C:\Users\54075\AppData\Local\Programs\Python\Python38-32\lib\random.py", line 226, in randrange
raise ValueError("empty range for randrange() (%d, %d, %d)" % (istart, istop, width))
ValueError: empty range for randrange() (0, 0, 0)
是否静音(Y/n):y
是否显示自动化过程(y/N):y
是否持久化登录(Y/n):b
是否使用百度AI(y/N):y
Traceback (most recent call last):
File "main.py", line 24, in <module>
MITMDUMP().Open()
File "F:\下载\learning-power-1.1\inside\Task\Mitmdump\Mitmdump.py", line 37, in Open
['mitmdump', '-q', '-p', '8080', '-s', PATH().Script]
File "C:\Python37\lib\subprocess.py", line 769, in __init__
restore_signals, start_new_session)
File "C:\Python37\lib\subprocess.py", line 1172, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] 系统找不到指定的文件。
请问下,这个问题是怎么回事?我用的是win10的,python3.7
答题: 50%|██████████████ | 5/10 [00:01<00:01, 4.31题/s]Traceback (most recent call last):
File "C:\Users\MLong\Downloads\learning-power-master\main.py", line 33, in
task.Task()
File "C:\Users\MLong\Downloads\learning-power-master\inside\Task\Task_Manage.py", line 214, in Task
self.__Check_Project_Answer()
File "C:\Users\MLong\Downloads\learning-power-master\inside\Task\Task_Manage.py", line 192, in __Check_Project_Answer
temp.Do(link=API().Project_Answer_Topic.geturl().format(num=iid))
File "C:\Users\MLong\Downloads\learning-power-master\inside\Task\Task_Answer.py", line 178, in Do
self.__Do()
File "C:\Users\MLong\Downloads\learning-power-master\inside\Task\Task_Answer.py", line 156, in __Do
topic_submit.click()
AttributeError: 'NoneType' object has no attribute 'click'
Traceback (most recent call last):
File "mmm.py", line 12, in
from inside.Driver.Driver_Manage import DRIVER_MANAGE
File "C:\bb\AutoXue3\learning-power-master\inside\Driver\Driver_Manage.py", line 13, in
from inside.Config.Api import API
File "C:\bb\AutoXue3\learning-power-master\inside\Config\Api.py", line 9, in
from ping3 import ping
ModuleNotFoundError: No module named 'ping3'
环境:MacOS
选择每日答题,一直循环答题,分数没有增加。
专项答题得分:0/10.0
专项答题得分:0/10.0
专项答题得分:0/10.0
专项答题得分:0/10.0
专项答题得分:0/10.0
专项答题得分:0/10.0
专项答题得分:0/10.0
专项答题得分:0/10.0
专项答题得分:0/10.0
专项答题得分:0/10.0
专项答题得分:0/10.0
专项答题得分:0/10.0
专项答题得分:0/10.0
专项答题得分:0/10.0
专项答题得分:0/10.0
专项答题得分:0/10.0
专项答题得分:0/10.0
专项答题得分:0/10.0
专项答题得分:0/10.0
专项答题得分:0/10.0
专项答题得分:0/10.0
专项答题得分:0/10.0
专项答题得分:0/10.0
专项答题得分:0/10.0
专项答题得分:0/10.0
专项答题得分:0/10.0
专项答题得分:0/10.0
专项答题得分:0/10.0
抓取答案完成
检测到提交,注入中
检测到本次提交为干扰
检测到提交,注入中
注入成功
Traceback (most recent call last):
File "tools/learning-power/inside/Task/Task_Answer.py", line 178, in Do
self.__Do()
File "tools/learning-power/inside/Task/Task_Answer.py", line 156, in __Do
topic_submit.click()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/selenium/webdriver/remote/webelement.py", line 80, in click
self._execute(Command.CLICK_ELEMENT)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/selenium/webdriver/remote/webelement.py", line 633, in _execute
return self._parent.execute(command, params)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element ... is not clickable at point (574, 580). Other element would receive the click:
选择的是全部都做1 2 3 4 5,大概做到30分的时候,提示
要选读文章:6.0分 视听学习:6.0分 专项答题:0分 每周答题:0分 每日答题:5.0分
分享:0分 收藏:0分 登录:1.0分 我要选读文章-时长:6.0分 订阅:0分
视听学习时长:6.0分 发表观点:0分 连续学习达标:0分 挑战答题:0分 参加调查问卷活动:0分
本地频道:0分 强国运动:0分 积分补发:0分 争上游答题:0分 【积分优化】一次性调整:0分
违规扣减:0分 双人对战:0分 问卷调查活动:0分
Traceback (most recent call last):
File "C:\Users\hellsion\Desktop\learning-power-master\main.py", line 33, in
task.Task()
File "C:\Users\hellsion\Desktop\learning-power-master\inside\Task\Task_Manage.py", line 206, in Task
self.__Check_Weekly_Answer()
File "C:\Users\hellsion\Desktop\learning-power-master\inside\Task\Task_Manage.py", line 164, in __Check_Weekly_Answer
temp.Do(link=API().Weekly_Answer_Topic.geturl().format(num=iid))
File "C:\Users\hellsion\Desktop\learning-power-master\inside\Task\Task_Answer.py", line 168, in Do
seq = int(self.Topic_Seq().split('/')[-1])
ValueError: invalid literal for int() with base 10: ''
不知道是什么问题。是不是因为每周答题或者专项答题没有了?哎。在吐槽一下,以前留的每周答题,还有专项答题全部过期了。这个改版真的是醉了。
D:\learning-power-master>python main.py
Traceback (most recent call last):
File "main.py", line 12, in
from inside.Driver.Driver_Manage import DRIVER_MANAGE
File "D:\learning-power-master\inside\Driver\Driver_Manage.py", line 11, in
from selenium.webdriver.chrome.webdriver import WebDriver
ModuleNotFoundError: No module named 'selenium'
目前的是正式版谷歌浏览器.但是版本号不是94.是Google Chrome 已是最新版本
版本 88.0.4324.104(正式版本) (64 位)
但是这个driver自动更新的.应该也不至于啊?
出错详情如下:
是否静音(Y/n):y
是否显示自动化过程(y/N):n
是否持久化登录(Y/n):y
检测到驱动未下载
驱动自动下载中
chromedriver_win32.zip: 100%|████| 4.59M/4.59M [00:00<00:00, 5.55MB/s]
驱动自动下载完毕
文件大小为4.378110885620117MB
Traceback (most recent call last):
File "C:\Users\hellsion\Desktop\learning-power-master\main.py", line 27, in
network.Init(driver=driver.Task)
File "C:\Users\hellsion\Desktop\learning-power-master\inside\Driver\Driver_Manage.py", line 86, in Task
return DRIVER_INIT().Task_Driver
File "C:\Users\hellsion\Desktop\learning-power-master\inside\Driver\Driver_Init.py", line 93, in Task_Driver
self.__instances['Task'] = Chrome(
File "C:\Users\hellsion\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 76, in init
RemoteWebDriver.init(
File "C:\Users\hellsion\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in init
self.start_session(capabilities, browser_profile)
File "C:\Users\hellsion\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "C:\Users\hellsion\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Users\hellsion\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: Chrome version must be between 70 and 73
(Driver info: chromedriver=73.0.3683.68 (47787ec04b6e38e22703e856e101e840b65afe72),platform=Windows NT 10.0.17763 x86_64)
iMac:learning-power-master $ python main.py
/bin/sh: google-chrome: command not found
检测到谷歌浏览器未安装,无法进行本程序
是否静音(Y/n):y
是否显示自动化过程(y/N):y
是否持久化登录(Y/n):y
是否使用百度AI(y/N):y
Traceback (most recent call last):
File "D:\xuexi\learning-power-1.1\main.py", line 24, in
MITMDUMP().Open()
File "D:\xuexi\learning-power-1.1\inside\Task\Mitmdump\Mitmdump.py", line 36, in Open
self.__mitmdump = subprocess.Popen(
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.496.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 947, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.496.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 1416, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] 系统找不到指定的文件。
我是从win商店安装Python
RT
linux的chromedriver,随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.