8000 GitHub - GongLinHI/SHU-Lesson-Click: 上海大学研究生选课脚本
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

GongLinHI/SHU-Lesson-Click

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SHU 研究生选课脚本

Requirements

  • Python 3.9+
  • pandas
  • selenium
  • pyyaml

以及 Google Chrome 浏览器

Usage

  1. 安装依赖

  2. 修改 config.yaml 文件,填入自己的学号、密码、选课批次

您可能需要自行复制一份 config.yaml.template 文件,并将其命名为 config.yaml

  1. 编辑 shadow.py 文件,设置您自己的规则

  2. 编辑 main.py 文件,设置您需要选的课程

from lesson import LessonQuery
from spider import LessonSpider

if __name__ == "__main__":
    spider = LessonSpider()
    spider.login()
    spider.to_taget_page()

    lesson1 = LessonQuery('公共课', "公共体育")
    spider.query_lesson(lesson1)

    lesson2 = LessonQuery('公共课', "学术英语写作与交流", school="管理学院")
    spider.query_lesson(lesson2)

当前代码中,我们选择了两门课程,分别是公共体育学术英语写作与交流。 关于LessonQuery类的参数,您可以参考lesson.py文件中的注释。

  1. 运行 main.py 文件
python main.py

About

上海大学研究生选课脚本

Resources

Stars

Watchers

Forks

Languages

0