설명 없음

ignatz f8ce68855d Merge branch 'master' of https://git.ignatz.xyz/ignatz/ncov-robot 3 년 전
lib cf715a924b ncov-auto-punch 3 년 전
robot 1b3e0833e1 选择密码登录 3 년 전
.gitignore ebd0e085af 更新gitignore 3 년 전
README.md 8b96ba5eff README更新 3 년 전
conf.py f03ae43843 修改conf文件加载 3 년 전
install.sh cf715a924b ncov-auto-punch 3 년 전
punch.py e0d2a9a50d 一些小修改 3 년 전
punch.sh ef26929507 rename 3 년 전
requirements.txt cf715a924b ncov-auto-punch 3 년 전

README.md

疫情防控通自动打卡

这是一个基于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
[
    {
        "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. 企业微信
{
    "smtp": {
        "sender": "发送名 <发送信息邮箱>",
        "server": "smtp.163.com",
        "port": 465,
        "user": "发送信息邮箱",
        "password": "授权码"
    },
    "wechat": {
        "corpid": "企业id",
        "corpsecret": "企业密码",
        "agentid": "agentid"
    }
}

运行

python3 punch.py users.json

如果没有图形化界面,或者希望隐藏google-chrome,可以使用punch.sh,这会自动调用Xvbf

bash punch.sh users.json