# 疫情防控通自动打卡 这是一个基于selenium/google-chrome/chromedirver的自动打卡器 请基于学习使用此工具 ## 环境依赖 Ubuntu可以执行`install.sh`配置环境,或者配置以下: 1. google-chrome 2. 对应版本的chromedriver 3. python3 4. 图形化界面或Xvbf ## 使用 ### 配置用户信息 `users.json`如下,需要填写`punch`: 1. 学号 2. 密码 3. 地理位置(纬度,经度,精度) 4. 是否在校 5. 是否在中高风险地区 **可选**填写`contact`: 1. 邮箱 2. 企业微信userid ```json [ { "punch": { "username": "你的学号", "password": "你的密码", "geolocation": { "latitude": 22.770456841071805, "longitude": 113.58015470450839, "accuracy": 20.0 }, "at_school": false, "risky": false }, "contact" : { "mail": "你的邮箱", "wechat": "你的企业微信userid" } } ] ``` ### 配置提醒(可选) `conf.json`配置 1. smtp服务器 2. 企业微信 ```json { "smtp": { "sender": "发送名 <发送信息邮箱>", "server": "smtp.163.com", "port": 465, "user": "发送信息邮箱", "password": "授权码" }, "wechat": { "corpid": "企业id", "corpsecret": "企业密码", "agentid": "agentid" } } ``` ### 运行 ```shell python3 punch.py users.json ``` 如果没有图形化界面,或者希望隐藏google-chrome,可以使用`punch.sh`,这会自动调用Xvbf ```shell bash punch.sh users.json ```