Giter Site home page Giter Site logo

ganz2016 / tjuptautoattendance Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kevin-beta/tjuptautoattendance

0.0 0.0 0.0 25 KB

北洋园PT自动签到

Home Page: https://www.tjupt.org/attendance.php

License: GNU General Public License v3.0

Python 100.00%

tjuptautoattendance's Introduction

TJUPT Auto Attendance / 北洋园PT自动签到

北洋园PT的签到图片来自 豆瓣电影 的海报,因此可通过查询豆瓣的方式实现自动签到。

用法

GitHub Actions

  1. Fork此项目,在顶部“Settings”标签中找到“Actions”→“General”→“Actions permissions”,选择“Allow all actions and reusable workflows”,然后在顶部“Actions”标签中选择“I understand my workflows, go ahead and enable them”。
  2. 在顶部“Settings”标签中找到“Secrets”→“Actions”,使用“New repository secret”新建两个秘钥:
  • “USERNAME”,填写用户名;
  • “PASSWORD”,填写密码。
  1. 此时GitHub Actions已启用,将会在北京时间每天00:00(UTC 16:00)、12:00(UTC 04:00)开始执行(由于GitHub Actions自身限制,执行时间可能会推迟15分钟左右)。
  2. 也可选择手动执行,在顶部“Actions”标签中选择“Auto Attendance”→“Run workflow”→“Run workflow”。

本地执行

  1. 将本项目Clone到本地,将“config”文件夹下的“config.template.ini”复制一份为“config.ini”,然后修改“config.ini”中的用户名和密码。
  2. 安装依赖项:在本项目根目录下执行pip install -r requirements.txt
  3. 在本项目根目录下执行python main.py
  4. 如需自动运行,可设置定时任务,例如Ubuntu下可使用Cron:
0 0,12 * * * cd /home/username/TjuptAutoAttendance && python3 main.py >> /home/username/TjuptAutoAttendance/out.log 2>&1

已知问题

  • 由于本项目代码依赖于豆瓣的 API,可能存在不稳定而导致未找到正确选项签到失败的情况。暂时的解决方案为增加尝试签到的次数。
  • 如果出现断签,请手动登录网站并选择是否补签。

tjuptautoattendance's People

Contributors

xzonn avatar

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.