Code Monkey home page Code Monkey logo

autocheckin's Introduction

AutoCheckIn

防疫签到的一些处理方法(Python version)
因为无教师账号,教师签到暂且不做,目前学生签到无问题

Preview

alt

Run

App.py or AutoCheckIn.exe 同级目录下面创建一个 config.json 文件
可以添加多个用户消息,方便批量打卡ヾ(≧▽≦*)o

[
    {
        "loginName": "student id",
        "yzxx": "student name",
        "loginType": 0,
        "checkIn":{}, //签到的数据
        "paper":{} // 问卷的数据
        // 推荐通过下面方式获取数据,增加可信度
    },
    {
        "loginName": "student id",
        "yzxx": "student name",
        "loginType": 0,
        "checkIn":{}, //签到的数据
        "paper":{} // 问卷的数据
        // 推荐通过下面方式获取数据,增加可信度
    }
]
  1. 登录网站: https://fxgl.jx.edu.cn/4136010406/
  2. F12 打开 console
  3. 进入每日签到界面
  4. console 输入 submits 定位代码打上断点,进行一次提交,卡住时终端输入 console.log(JSON.stringify(param))
  5. 将输出的数据用来覆盖 config.json 里面的 checkIn 的值
  6. 进入问卷调查界面
  7. console 输入 submit
  8. 双击查看代码
  9. 2683 行打上断点,然后手动提交,卡住时终端输入 console.log(JSON.stringify(param))
  10. 将输出的数据用来覆盖 config.json 里面的 paper 的值
  11. 前往 https://npm.taobao.org/mirrors/chromedriver/ 下载对应版本的 chromedriver
  12. chromedriver 添加到环境变量 (Linux 可直接通过软件源安装: sudo apt install chromedriver chromium -y)
  13. Run: *.exe
  14. 提交测试通过以后,可以选择 添加定时任务,并且执行后可以选择保留窗口,方便查错。

Example

  • 使用 Ubuntu18.04 定时任务进行打卡
  1. sudo apt-get update -y && sudo apt install python3 git -y
  2. git clone https://github.com/IITII/AutoCheckIn.git && cd AutoCheckIn
  3. pip install -r requirements.txt or pip install -r requirements.txt -i -i https://pypi.tuna.tsinghua.edu.cn/simple
  4. python3 App.py or python3 App.py >> log.log

每日 9.30 自动打卡,日志写入 ./log.log

  1. 添加定时任务: echo "30 9 * * * cd $(pwd) && python3 ./App.py >> ./log.log 2>&1" /var/spool/cron/crontabs/$(whoami)
  2. 查看定时任务: crontab -l

一些注意事项

  1. 目前只支持 Chrome ,暂时没有支持其他浏览器的计划

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.