Giter Club home page Giter Club logo

pkugradecheck's Introduction

pkuGradeCheck

Peking University grades auto-checker using data from http://dean.pku.edu.cn

Many students are having a hard time checking their grades after final exams. They nervously login to check whether new grades come out every minute.

This program written in Python will automatically recognize the validation code, login, check if there are changes in the grade list, and send an e-mail to you if necessary.

Environment

Python 3

requests

numpy

PIL or pillow

Main Parameters

in getGrade.py:

  1. sender: string, mailbox uesrname.
  2. passcode: string, mailbox password.
  3. smtpserver: string, smtp server of your mailbox.
  4. receiver: string, mailbox address you want to receive an email indicating new grades sent by the program.
  5. pku_username: string, your pku school number.
  6. pku_password: string, your pku_dean password.
  7. interval: number, the time interval between two auto-checks (seconds).

Validation Code Recognition

The proc.py module helps you recognize the specific dean validation code. Here is how it works:

  1. Split characters
  2. Match with each character

Accuracy: 57%, enough for auto-login because it can retry several times.

Finite State Machine

The program features a finite state machine to maintain the states, which can increase the stability.

There are three states, namely login, query wait, and send email.

  1. login : The program is trying to login using the pku username and password provided.
  2. query wait : The program is waiting for the next check. The interval is 60 seconds by default.
  3. send mail : The program is trying to send and e-mail to you using the mailbox address and password provided.

pkugradecheck's People

Contributors

kaffaljidhmah2 avatar

Stargazers

 avatar  avatar Tianle Cai avatar

Forkers

salenmicro ymjian

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.