Loading... ~~实际上今天是开发这个的第二天了 然后是第n次5点了~~ # 原因: 由于handsome自带的播放器需要经常更换cookie(对于我) 然后为了避免一次次的重新打开浏览器登录拿cookie 故写脚本 # 运行环境: 1. Python 3(3.6+为最佳) 2. Python的一些库: - `selenium`(`Windows 10:4.1.3,CentOS 7:3.141.0`) - `pyzbar`(`Windows 10 & CentOS 7:0.1.9`) - `qrcode`(`Windows 10 & CentOS 7:7.3.1`) - `qrcode-terminal`(`Windows 10 & CentOS 7:0.8`) - `Pillow`(`Windows 10:9.1.0,CentOS 7:8.4.0`) 3. `Chrome` 以及对应的 `ChromeDriver` (`Windows 10:100.0.4896.60,CentOS 7:99.0.4844.84`) CentOS 7下的Chrome安装 ```bash wget http://dl.google.com/linux/chrome/rpm/stable/x86_64//google-chrome-stable-99.0.4844.84-1.x86_64.rpm sudo yum localinstall google-chrome-stable-99.0.4844.84-1.x86_64.rpm ``` CentOS 7下ChromeDriver安装:我直接`yum install chromedrive`了 Windows 10我直接安装普通Chrome然后添加`Path`了 ChromeDriver的话是用`https://chromedriver.storage.googleapis.com` 找到对应版本安装 4. CentOS 7还要安装zbar库 ```bash sudo yum install zbar-devel sudo yum install zbar ``` 然后就差不多了,就疯狂Coding了N天 然后就出成果了 之后可能会做: * [ ] 优化扫码的判断 * [ ] 浏览器是否显示的配置 * [ ] 引入配置文件 * [ ] 使用Action编译 最后修改:2022 年 04 月 21 日 © 允许规范转载 打赏 赞赏作者 支付宝微信 赞 0 如果觉得我的文章对你有用,请随意赞赏