70

GitHub - wuditken/MillionHeroes: 百万英雄/冲顶大会/芝士超人答题助手

 6 years ago
source link: https://github.com/wuditken/MillionHeroes
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
master

Go to file

Code

Files

Permalink

Latest commit message
Commit time
January 15, 2018 15:26
January 12, 2018 18:03

百万英雄答题助手


用的是python3.6版本

参考微信跳一跳助手,使用adb截图。

把问题区域裁剪出来后用百度的ocr识别出文本,然后调用百度搜索(把搜索到的前两个答案显示在屏幕)

整个程序运行完估计5秒左右,还可以有时间答题(---)

1,安装ADB 驱动,可以到这里下载
安装 ADB 后,请在环境变量里将 adb 的安装路径保存到 PATH 变量里,确保 adb 命令可以被识别到

2.需要安装模块 在命令行输入(pip install 模块名称) 模块名称: baidu-aip lxml Pillow requests bs4

3.在hero.py里填写自己百度ocr的APPid
百度ocr:http://ai.baidu.com/tech/ocr/general

4.连接手机
运行python hero.py (搜索百度的内容)
或test文件下的hero.py(搜素内容并统计词频)
(只支持安卓手机)

截图

一开始也想要tesseract来识别,但是经过测试太慢了要用10秒左右。

大家有时间的话可以试试把它弄成全自动的

有一个思路 就是把问题的选项答案也给识别出来,然后把百度搜出来的答案匹配选项答案,如果有答案直接一个模拟点击.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK