Coder Social home page Coder Social logo

sjtu-autoelect's Introduction

SJTU-autoelect

Language License

Features

  • Auto relogin when session expired.
  • Refresh page periodically to check course availibility and auto elect designated course.
  • Resolve course conflict correctly.

Usage

  • Download corresponding chromedriver from https://chromedriver.chromium.org/downloads and save it in DRIVERS folder. ( Check OS and Chrome version! )
  • Set your username and password in getcookie_inte.py.
  • Run pip install -r requirements.txt.
  • Run python autoelect.py $COURSE_TYPE $COURSE_CODE $COURSE_KEYWORD1 $COURSE_KEYWORD2.

Arguments

  • COURSE_TYPE: Course type, 01 for "主修课程", 10 for "通识课".
  • COURSE_CODE: Course code, e.g. EE234.
  • COURSE_KEYWORD1: Course keyword 1, e.g. 张三.
  • COURSE_KEYWORD2: Course keyword 2 ( Optional ), e.g. 星期一第11-13节.

Make sure the keywords you provided are sufficient to locate the exact course!

Example

python autoelect.py 01 EE234 张三

Notes

  • This program is not intended to work when server payload is high. Thus, you should only use it to catch the seats which others has cancelled recently.
  • Uncomment line option.add_argument('--headless') to hide the chrome window.
  • Opening several processes concurrently is possible.
  • For Windows users, you may need to rename chromedriver.exe into chromedriver and install tesseract with python support.

Todos

  • Add support for course election with priority.
  • Optimize program logic.
  • Send requests instead of emulating user behaviors.

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.