Giter VIP home page Giter VIP logo

sustc-sakura-spider's Introduction

sustc-sakura-spider

开始之前

你需要一些准备工作

  • 一个普通的 python 3 运行环境

  • requests bs4 lxml包,一般来说你可以使用以下命令安装。

    pip install requests bs4 lxml

Application

  • 爬取南科大教务系统的课程表信息并转存为ics文件。
  • 在电脑或手机上打开ics文件可以把课程信息快速添加进日历app

Usage

  • 先在根目录执行 python3 server.py,看到 Server started listening不要关闭窗口
  • 再在根目录执行 python3 interactive.py
  • 根据提示输入学号、密码、学期、学期起始日、开始周、结束周
  • 运行完成后会在根目录下生成 WeekXX-XX-of-XXXXXX.ics

Hints

  • 如果想自动化此过程,可查看 client.py 了解详细请求逻辑
  • 建议先试试单独取一周课表,确认无误后再尝试导入整个学期
  • 对于某些奇怪的学期(例如国庆放假导致的某个教学周被跳过),需要分开两次生成,并对前后两段选取不同的学期起始日
  • 执行过多可能导致 IP 被临时封禁,换 IP / 换电脑 / 等待10min 即可解封

Change log

v0.2.0 (2019-06-22 22:23:00 GMT+08:00)

By nekonull (@jerrylususu)

  • 域名从 sustc 更换为 sustech
  • 重写了 README.MD
  • 增加了交互式客户端
  • 增加学期选择
  • 增加多周支持
  • 增加状态信息输出

v0.1.0 (2018-03-08 16:46:30 GMT+08:00)

  • 能够登陆CAS系统获取JSESSIONID值
  • 能够使用JSESSIONID值登陆教务系统爬取课程表并保存至本地的class.ics文件

sustc-sakura-spider's People

Contributors

jerrylususu avatar licia-tia avatar

Watchers

 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.