当前位置:网站首页>基于微信小程序开发的我最在行的小游戏
基于微信小程序开发的我最在行的小游戏
2022-07-07 22:53:00 【biyezuopinvip】
资源下载地址:https://download.csdn.net/download/sheziqiong/85949477
资源下载地址:https://download.csdn.net/download/sheziqiong/85949477
1.准备
- Node.js 9.x 以上
- MongoDB
- 安装依赖
npm i
2.功能
抓请求之前,请完全删除小程序,重新搜索小程序名字进入。因为你之前登录过,后续抓不到登录请求了
2.1爬取题库
爬题思路:不断进行好友对战获取题目,随意提交答案会返回正确答案,存入数据库,重复的忽略
分别使用两个微信号登录游戏,抓登录的请求 https://puzzle-gateway.zaih.com/pauthp/jwt
复制返回的 access_token
和 account_id
,填入 src/crawl.js 中
执行 npm run crawl
开始自动爬取
如果出现带 leave
单词的提示,说明上一局是异常退出的。只要关掉脚本,重新再运行就好了。
爬题需要一定的时间,也可以直接导入我爬好的题库 MongoShell BSON(.json)(12.2k 个题目,持续更新)
数据库名为 wzzh
,导入命令,注意你的文件路径
mongoimport -d wzzh -c questions --file ~/Downloads/questions.json --jsonArray --drop
2.2答题辅助
用你要答题的号登录游戏,抓登录的请求 https://puzzle-gateway.zaih.com/pauthp/jwt
复制返回的 access_token
和 account_id
,填入 src/robot.js 中
再修改其中的 theme
为你要答题的分类索引
执行 npm run robot
开始智能答题,答题过程是全自动的
如果本题不在题库里,会调用 game-helper/answer 搜索答案
自动提交搜索结果数最多的答案(提高胜率),同时会自动将本题正确答案记录到题库中
你只需要关注终端打印的信息即可,如果有报错,请提 issue 反馈给我们
3.截图
资源下载地址:https://download.csdn.net/download/sheziqiong/85949477
资源下载地址:https://download.csdn.net/download/sheziqiong/85949477
边栏推荐
- 51 communicates with the Bluetooth module, and 51 drives the Bluetooth app to light up
- How to measure whether the product is "just needed, high frequency, pain points"
- The difference between -s and -d when downloading packages using NPM
- When creating body middleware, express Is there any difference between setting extended to true and false in urlencoded?
- 韦东山第三期课程内容概要
- 取消select的默认样式的向下箭头和设置select默认字样
- Usage of limit and offset (Reprint)
- Is it safe to open an account on the official website of Huatai Securities?
- 如果在构造函数中抛出异常,最好的做法是防止内存泄漏?
- Deep dive kotlin collaboration (the end of 23): sharedflow and stateflow
猜你喜欢
Tapdata 的 2.0 版 ,开源的 Live Data Platform 现已发布
STM32F1與STM32CubeIDE編程實例-旋轉編碼器驅動
Binder核心API
大数据开源项目,一站式全自动化全生命周期运维管家ChengYing(承影)走向何方?
去了字节跳动,才知道年薪 40w 的测试工程师有这么多?
从服务器到云托管,到底经历了什么?
Relevant methods of sorting arrays in JS (if you want to understand arrays, it's enough to read this article)
They gathered at the 2022 ecug con just for "China's technological power"
应用实践 | 数仓体系效率全面提升!同程数科基于 Apache Doris 的数据仓库建设
Deep dive kotlin synergy (XXII): flow treatment
随机推荐
【转载】解决conda安装pytorch过慢的问题
Database query - what is the highest data?
韦东山第三期课程内容概要
【obs】Impossible to find entrance point CreateDirect3D11DeviceFromDXGIDevice
Common selectors are
Qt添加资源文件,为QAction添加图标,建立信号槽函数并实现
智慧监管入场,美团等互联网服务平台何去何从
接口测试要测试什么?
Service Mesh的基本模式
51 communicates with the Bluetooth module, and 51 drives the Bluetooth app to light up
Tapdata 的 2.0 版 ,开源的 Live Data Platform 现已发布
Which securities company has a low, safe and reliable account opening commission
炒股开户怎么最方便,手机上开户安全吗
C# 泛型及性能比较
《因果性Causality》教程,哥本哈根大学Jonas Peters讲授
Single machine high concurrency model design
动态库基本原理和使用方法,-fPIC 选项的来龙去脉
[programming questions] [scratch Level 2] March 2019 garbage classification
大数据开源项目,一站式全自动化全生命周期运维管家ChengYing(承影)走向何方?
The method of server defense against DDoS, Hangzhou advanced anti DDoS IP section 103.219.39 x