{"id":13610961,"url":"https://github.com/smileboywtu/MillionHeroAssistant","last_synced_at":"2025-04-13T01:34:01.532Z","repository":{"id":28232002,"uuid":"116679937","full_name":"smileboywtu/MillionHeroAssistant","owner":"smileboywtu","description":"百万 / 冲顶 / 芝士 / UC  / 万能 答题助手（知识图谱更加专业，自动推荐答案， Android手机自动屏幕适配，模拟器支持，多开)","archived":false,"fork":false,"pushed_at":"2022-12-08T14:42:19.000Z","size":69577,"stargazers_count":528,"open_issues_count":18,"forks_count":179,"subscribers_count":39,"default_branch":"master","last_synced_at":"2024-08-01T19:56:05.271Z","etag":null,"topics":["adb","android","baidu","ios","ocr","python3","xigua"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/smileboywtu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-08T13:26:04.000Z","updated_at":"2024-06-11T02:21:13.000Z","dependencies_parsed_at":"2022-08-07T13:15:32.331Z","dependency_job_id":null,"html_url":"https://github.com/smileboywtu/MillionHeroAssistant","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smileboywtu%2FMillionHeroAssistant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smileboywtu%2FMillionHeroAssistant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smileboywtu%2FMillionHeroAssistant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smileboywtu%2FMillionHeroAssistant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smileboywtu","download_url":"https://codeload.github.com/smileboywtu/MillionHeroAssistant/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223558446,"owners_count":17165133,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adb","android","baidu","ios","ocr","python3","xigua"],"created_at":"2024-08-01T19:01:50.002Z","updated_at":"2025-04-13T01:34:01.526Z","avatar_url":"https://github.com/smileboywtu.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"## 万能答题助手\n\n参考了微信跳一跳助手的思路，通过截取手机上面的题目，利用[百度文字识别](https://cloud.baidu.com/product/ocr/general)识别问题和答案。\n\n## 运行 \n### 开启浏览器同步支持：\n![](./wechatcode/main-1.png)\n\n### 支持任意游戏模式：\n![](./wechatcode/run-21-1.png)\n![](./wechatcode/main-2.png)\n\n### 科普性知识测试\n\n#### 回锅肉属于什么菜系\n![](./wechatcode/run-6.png)\n#### 北京奥运会是什么时候\n![](./wechatcode/run-7.png)\n\n\n### 简洁版本：\n![](./wechatcode/run-5.png)\n![](./wechatcode/run-1.png)\n![](./wechatcode/run-2.png)\n\n# 我什么都不会勒，但是想带女友打怪升级\n\n真有一个办法，提供了小白版本：\n\n- 无需下载配置复杂的工具链\n- 专人协助\n- 一键运行\n\n小白版本是基于目前的主干分支开发的，继承了主干分支的功能，主要是使用上面的配置的东西变少了，专门提供给不太懂技术的小白，大神请使用开源代码折腾。\n\n~~**小白版本** 目前是需要收取一定的费用，价格是19.9（万能版本），如果只玩主流的四个，价格是9.9，请走捐赠入口捐赠后联系，或者加微信也可以，微信在最下面。~~\n\n**由于时间的问题，没时间维护这个小白了，所以小白版本停止发售。**\n\n\n# 只有 iphone, 没有 android 手机怎么办？\n\n简单靠谱的办法是使用模拟器。\n\n1. 首先还是要下载adb工具，下文有介绍\n2. 下载[夜神](https://www.yeshen.com/)模拟器并安装\n3. 安装完成后，打开 cmd, 检查是否有模拟器设备 `adb devices`\n4. 在模拟器中安装答题应用\n5. 运行答题辅助脚本`python main.py`,如果有问题下文有解决办法，请参照安装步骤\n\n## **支持捐赠**\n\n- [微信入口](./wechatcode/wechatpay.png)\n- [支付宝](./wechatcode/alipay.jpg)\n\n捐赠后请给我留言，如下福利：\n\n- 项目结束后，整体讲解\n- 免安装版提供支持，已完成，无需任何下载\n- 无条件辅助安装包\n\n## 开课了，有想要学习的可以加入圈子，长期更新\n\n微信小程序：\n\n![芥末圈子](./wechatcode/python.png)\n\n## 百度OCR\n\n**notice**: 百度的注册开发者后，创建应用就可以看见自己的 key 和 secret 。\n\n\n## 部署\n\n1. 从python官网安装python3.6环境\n2. pip install -r requirements.txt\n3. 创建默认的临时文件夹mkdir -p screenshots\n4. 修改默认的配置文件`config.yaml`,配置文件夹中可以配置临时数据目录和appcode\n\n\n## ADB工具配置\n\n以 linux 为例：\n\n1. 下载 android-platform-tools，访问[google](https://developer.android.google.cn/studio/releases/platform-tools.html)下载，默认 mac，windows， linux 均支持\n2. 配置环境变量，进入 platform 目录下面`export PATH=$(pwd):PATH`配置 adb 工具到系统的 path 下面\n3. 手机打开开发者模式\n4. 使用usb连接手机后信任，`adb devices`来检查是否有自己的设备，确认已经连接\n5. 接下来就进入百万英雄，等待有题目的时候就运行`python main.py`即可\n\n\n## Win 打包方法\n\n1. 安装`pyinstaller`工具\n``` shell\npip install pyinstaller\n```\n\n2. 打包\n``` shell\npyinstaller main.spec\n```\n\n打包完成后，在dist文件夹下面会有打包后的release.\n\n## Release\n\n\u003e- 2018/2/18: 开源pyinstaller的配置文件\n\u003e- 2018/1/23: 使用多线程，改善mac上面的卡顿问题\n\u003e- 2018/1/22: 增加数据同步设置\n\u003e- 2018/1/21: 增加问题备份，增加搜狗，增加图片放缩，加速，游戏切换，自适应\n\u003e- 2018/1/18: 增加uc辅助，另外修复统计bug\n\u003e- 2018/1/15: 增加芝士大会的支持，另外增加特别关键字\n\u003e- 2018/1/14: 新增知识库功能, 内置adb，小白版一键运行\n\u003e- 2018/1/13: 增加浏览器支持，修复部分bug\n\u003e- 2018/1/12: 更改搜索策略，自动决策，减少python依赖\n\u003e- 2018/1/11: 结巴分词预编译和多核分词优化\n\u003e- 2018/1/10： 增加ios分支，修复master文本摘要bug\n\u003e- 2018/1/9： 修复答案获取bug，增加长文本信息摘要算法，增加百度OCR\n\u003e- 2018/1/9： 使用相似度猜测答案，请切换分支使用\n\n\n## 分支说明\n\n- master: 主要是 Android 手机使用，支持汉王 / 百度识别 / ocrspace\n- knearby: 根据文本关联度思想，答案更加清晰，目前只支持百度识别\n\n\n## V2 文本关联相似度分析\n\n对于答题这样的项目，首先一个问题，然后有三个答案可以选择，能不能通过分别统计问题与三个答案的关联度来选择出正确的答案，由于数据采集是来自百度的，可能会受到部分广告数据的影响，但是在集合相当大的情况下，关联度还是会呈现正相关。\n\n假设题目是： \n\n*中国历史上著名的科举制度开始于那个朝代？*\n- 汉朝\n- 唐朝\n- 隋朝\n\n我们先用百度分别搜索`汉朝`，`唐朝`，`隋朝`，得到如下数据：\n\n朝代 | 搜索出的数量（来自百度为您找到相关结果约）\n---- | ------------------------------------------\n汉朝 | 17900000\n唐朝 | 30500000\n隋朝 | 16600000\n\n然后我们在用`题目` + 答案的方式，搜索示例：\n\n`中国历史上著名的科举制度开始于那个朝代？ 汉朝` 得到三次的搜索结果：\n\n 关键字  | 搜索出的数量（来自百度为您找到相关结果约）\n-------- | ------------------------------------------\nQ + 汉朝 | 602000\nQ + 唐朝 | 837000\nQ + 隋朝 | 658000\n\n关联度计算方式：\n\n``` shell\nK = count(Q\u0026A) / (count(Q) * count(A))\n```\n\n关联度如下：\n\n答案 | 关联度\n---- | ------\n汉朝 | 0.0336\n唐朝 | 0.0274\n隋朝 | 0.0396\n\n\n## 贡献者（不分先后）\n\n- [uniqhj](https://github.com/UniqHu)\n- wangfpp\n- [using1174](https://github.com/Using1174)\n- [kakalote2008\t](https://github.com/kakalote2008)\n- [lonelam](https://github.com/lonelam)\n- [luyiming](https://github.com/luyiming)\n- [Snownee](https://github.com/Snownee)\n\n## 参考项目\n\n- [wuditken/MillionHeroes](https://github.com/wuditken/MillionHeroes)\n- [lingfengsan/MillionHero](https://github.com/lingfengsan/MillionHero)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmileboywtu%2FMillionHeroAssistant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmileboywtu%2FMillionHeroAssistant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmileboywtu%2FMillionHeroAssistant/lists"}