开发/收集 中国科学院大学 各种事务的自动化脚本
已有脚本:
- 选课
- 监听成绩
期待贡献,添加更多有趣的脚本,kill TodoList item
Warning:
由于
选课系统
只能单点登录,如果同时运行两个脚本,或者在运行脚本的时候登陆网页端,他们之前会争抢会话。脚本默认在会话失效后再次自动获取,所以在刷课和监听成绩的过程中,如果您需要浏览选课系统的网页端,需要先暂停脚本。
kill -STOP $pid # suspend kill -CONT $pid # resume
Pull project:
git clone https://github.com/zhangxu3486432/UCAS-Affair-Scripts.git
Enter the working directory:
cd UCAS-Affair-Scripts
Install dependency:
pip3 install -r deploy/requirements.txt
Set in the settings.py
Set http://sep.ucas.ac.cn/
UserName and PassWord
USERNAME = ''
PASSWORD = ''
In the off-campus network login need to fill in the
Verification Code
. First login to save cookies insep.cookie
, so that you can facilitate deployment in the server.
python3 login.py
The Verification Code
picture is saved in verification.png, open the picture identification key and fill it in terminal.
As you can see, this Verification Code
is 7351
.
Fill the 7351
in terminal and press enter.
-
Set the courses which you want to take
Examples:
COURSES = ['自然语言处理', '机器人智能控制', '积极心理学']
-
Fill in the college to which the course you choose belongs
Examples:
COLLEGES = ['人工智能学院', '心理学系']
-
Run
python3 take_courses.py
-
Set email info
if you want to monitor your grads, you need to set it
SEND_EMAIL = '' SEND_EMAIL_PWD = '' RECEIVE_EMAIL = ''
-
Run
python3 monitor_grades.py
- Test and adapt to more python versions
- Shuttle Bus Reservation
- Build Docker Image
- Automatic Identification Verification Code