# study-china学习强国 **Repository Path**: iceman123/study-china ## Basic Information - **Project Name**: study-china学习强国 - **Description**: python+selenium+adb控制安卓手机自动登录账号,扫码登录网页版进行试听学习等得分操作。仅供学习,不用于商业 - **Primary Language**: Python - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 5 - **Created**: 2023-11-14 - **Last Updated**: 2023-11-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # study-china学习强国 #### 介绍 python+selenium+adb控制安卓手机自动登录账号,扫码登录网页版进行试听学习等得分操作。仅供学习,不用于商业 #### 软件架构 软件架构说明 我的软件版本: Windows 10 专业版 python -> 3.10.5 Android Debug Bridge(adb) -> 1.0.36 Selenium 安装教程:https://python-selenium-zh.readthedocs.io/zh_CN/latest/1.%E5%AE%89%E8%A3%85/ #### 使用说明 1. 如未安装Android Debug Bridge(adb),在打开软件时输入0,进行下一步,需要手动扫码登录网页版学习强国 2. chromedriver_108.exe、账号密码.txt 和 main.exe 要放在相同的目录下。结果在“运行结果.txt”文件里查看。chromedriver时根据你电脑上的谷歌浏览器版本来自行下载,下载地址:http://chromedriver.storage.googleapis.com/index.html 3. chrome-win文件夹里装的是chromium,使用这个则需要在main.py里修改newBrower方法。 把 service = ChromeService(executable_path=".\chromedriver_108.exe") # 设置谷歌浏览器driver的目录所在 改为 service = ChromeService(executable_path="./chrome-win/chromedriver_101.exe") 但在我的测试中使用chromium偶尔会闪退导致代码报错,所以不使用chromium 4. 如您已下载好adb,请在账号密码.txt文件里写入学习强国的账号密码(手机连接电脑,且选择->传输文件。选择仅充电的话是控制不了手机的) 5. 如有问题可+v:18978429109,请备注好添加原因 6. 软件使用pyinstaller打包成exe文件在window上使用:pyinstaller安装教程:https://zhuanlan.zhihu.com/p/470301078 (打包命令操作:pyinstaller -F .\main.py) 注意:打包完成后会自动生成dist文件夹,此时需要把根目录的 (账号密码.txt) 和 (chrome-win) 这两个文件复制到dist目录下,跟main.exe在同一目录