the main python script is forked from https://github.com/windiboy/BUAAAutoUpdate
This repository is created just for learning, and everyone who use it should not violate relevant regulations.
- Fork this repository. (Of course you should log in first!!!)
- You should get FORM_DATA first at this step.
- The tutorial refers to BUAAAutoUpdate.
- 使用电脑端chrome浏览器,打开并登录北航师生报平安系统
- 如果无法获取定位,可以参考Chrome 自定位置。
- 按F12打开控制台,切换到网络栏(network)。在页面中填好全部信息之后,点击提交,然后查看
network
标签中的save
项。点击后查看Headers
标签,点击Form Data
右侧的view source
,复制备用。
- Add four action secrets in Settings->Security->Secrets->Actions->New repository secret as follow:
- The four names are: STUDENTID, PASSWORD, SERVER_SEC, FORM_DATA
- STUDENTID is your BUAA SSO Account ID, namely your student id.
- PASSWORD is the password of your BUAA SSO Account.
- SERVER_SEC is your Wechat_Key provided by ServerChan. If you don't have the key, you can just fill in any legal string as its value.
- FORM_DATA is got from Step 2.
- Open Action in your forked repository, and you should enable the workflow named BUAAAutoUpdate Action Ver.
- The default configuration is scheduled to run the workflow at 16:26 (UTC +8:00) every day, and you can also run it manually as follow image in the Action page.
- If you want to change the scheduled time, you can edit file ./.github/workflows/main.yml at line 12.
- If you don't know how to use cron, you can refer to this page.