wuditken / millionheroes Goto Github PK
View Code? Open in Web Editor NEW百万英雄/冲顶大会/芝士超人答题助手
Home Page: https://github.com/wuditken/MillionHeroes
百万英雄/冲顶大会/芝士超人答题助手
Home Page: https://github.com/wuditken/MillionHeroes
(D:\Anaconda2\envs\py3) F:\codes\git_repo\MillionHeroes>python hero.py
/sdcard/screenshot.png: 1 file pulled. 5.0 MB/s (390229 bytes in 0.075s)
xx:(720, 1280)
8.我们常说的“1080P”中的字母“P”指的是?
百度软广,当前代码版本不予摘要
百度软广,当前代码版本不予摘要
程序用时:2.194499969482422秒
如上,搜索结果并没有用。
但我用的是汉王ocr识别,tesseract太慢了。
hero.py中的第6行 os.system("adb pull /sdcard/screenshot.png ./screenshot.png") 使用了相对路径
而后续的第15行 im = Image.open(r"D:\screenshot.png") 却使用一个指向d盘的绝对路径造成open失败,希望修改。
同时建议将第23行和第27行也改为相对路径。
搜索结果放在前(问题关键词突出显示),推荐答案放在最后面,这样方便查找结果和做出选择!
百度知道里头是没有硬广告的
连续运行两次程序,不同的题目。第二次还是显示第一次的结果。这是什么原因呢?
简易在选项字母后面附上选项文字,有一道题 程序ocr识别a选项错误了
8.《射雕英雄传》中西毒欧阳锋曾使用哪一种毒药杀海中的鲨
A:鱼? B:蛇毒 C:蜂毒选项 出现次数
A: 5
B: 16
C: 0推荐答案:B
此次识别出现了错误 原本a蛇毒 b蜂毒 ,正确答案也是a蛇毒(即推荐中的b),不过一看控制台是b……
简易在A B C后面还是附上文字
对于否定式提问(例如xxx不包含xxx,xxx没有哪一个,不是xxx的是),这个应该帮助不大😂,基本就对不了,或许针对此类问题,应该识别出否定词,然后反着出现次数推荐
我在我的计算机本地测试时发现:
os.system("adb shell /system/bin/screencap -p /sdcard/screenshot.png")
os.system("adb pull /sdcard/screenshot.png d:/screenshot.png")
在手机上存有截图但并没有导出到我的电脑D盘,猜测可能和绝对路径有关?我也不清楚。
建议将第二句修改成:os.system("adb pull /sdcard/screenshot.png ")
直接导入到代码所在文件夹,后续的读取、写入图片的路径修改成相对路径,即./screenshot.png即可。
ImageGrab.grab((49, 90, 358, 446))
部分题目是问的“不是的”“不包含的”,此时大部分时刻应该选出现次数最少的,建议增加题目否定答案参考。
使用mac报这个错误
Failed loading language 'chi_sim'
Tesseract couldn't load any languages!
增加一个判定屏幕是否出现答题框的模块,出现答题框后自动触发截图模块,然后实现自动截图,自动查找。
改成d:/test/xxx.png即可
Traceback (most recent call last): File "hero.py", line 56, in <module> results = baiduSearch.search(keyword) File "D:\MillionHeroes-master\baiduSearch\search.py", line 8, in search results = process.page(page) File "D:\MillionHeroes-master\baiduSearch\process.py", line 46, in page result_set = result_set.find_all('div', class_='c-container') # 结果class固定,其余为硬广 AttributeError: 'NoneType' object has no attribute 'find_all'
一开始运行正常,尝试几次之后突然出现错误。
result_set = result_set.find_all('div', class_='c-container') # 结果class固定,其余为硬广
AttributeError: 'NoneType' object has no attribute 'find_all'
from aip import AipOcr
ModuleNotFoundError: No module named 'aip'
如果要匹配答案,自动点选,就要AI训练了。会复杂很多了。
请问有朋友遇到下面这个问题吗?
我用的PyCharm运行的,可能和PyCharm项目的 Virtualenv 有关,但是我没搞明白!
希望大神指点一下,谢谢
E:\Dev\MyMH\venv\Scripts\python.exe E:/Dev/MyMH/hero.py
Traceback (most recent call last):
File "E:/Dev/MyMH/hero.py", line 3, in
from aip import AipOcr
File "E:\Dev\Python\venv\Lib\site-packages\aip_init_.py", line 6, in
from ocr import AipOcr
ModuleNotFoundError: No module named 'ocr'
出现字符不能解析的情况
2.
Traceback (most recent call last): File "hero.py", line 56, in results = baiduSearch.search(keyword) File "D:\MillionHeroes-master\baiduSearch\search.py", line 8, in search results = process.page(page) File "D:\MillionHeroes-master\baiduSearch\process.py", line 46, in page result_set = result_set.find_all('div', class_='c-container') # 结果class固定,其余为硬广 AttributeError: 'NoneType' object has no attribute 'find_all'
出现找不到内容的情况
Traceback (most recent call last):
File "hero.py", line 1, in
import urllib.request, sys,base64,json,os,time,pyperclip,baiduSearch
ModuleNotFoundError: No module named 'pyperclip'
错误信息如上
建议使用 adb shell screencap -p > screenshot.png 截图,在本机测试可以提高0.6S
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.