Skip to content

This script scrapes every x hour my Universitys website to check if my grade is listed. If so, I will get an email noftification.

Notifications You must be signed in to change notification settings

DanielGuo1/grade_script_notification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

Python Selenium

Automatic grade notification

Logo

This script informs me whenever my university grades are online

About The Project

At my university (Hochschule Reutlingen) after you have completed your exam or submitted a paper or thesis, you will not receive a response if your grade is online. So there is no official timeframe in which the grades should be online, and neither is the professor obliged to let you know.

Nervously waiting and checking your grades every 5 minutes isn't the best thing to do on your vacation.

So I wrote a Python script that uses the Selenium framework to search my university's website. I deployed this script on my home server using a Raspberry Pi to trigger this script every x hours between 7:00 a.m. and 9:00 p.m. As soon as the grad is online, I'll receive an email.

Built With

Getting Started

If you want to run this code locally, get a copy and follow these simple steps.

Prerequisites

You need to download python and selenium in order to run the script Download Python here.

Selenium Installation

  1. Open your Chrome Browser
  2. Click on the three dots (top right) to expand the settings
  3. Help -> About Google Chrome
  4. Note the Version (89.0..., 90.0..., 91.0...)
  5. Visit the Selenium WebDriver website
  6. Download the zip-Archive
  7. Put the chromedriver.exe from the zip-Archive in the same folder after downloading the project (further down) – alternatively you can:
  • put it into C:\Windows straight away or if you're experiencing issues
  • put it somewhere else, but you should make sure the folder is in your %PATH%-variable
  1. If you configured this step improperly, the bot will fail with this error - or a similar one selenium.common.exceptions.WebDriverException: Message: 'chromedriver.exe' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home OR WebDriverException: unknown error: cannot find Chrome binary error with Selenium in Python for older versions of Google Chrome

Installation

  1. Clone the repo
git clone https://github.com/DanielGuo1/grade_script_notification.git
  1. Put your University login credentials in grade_script.py:
driver.find_element_by_id('asdf').send_keys('USERNAME')
driver.find_element_by_id('fdsa').send_keys('PASSWORD')
  1. Enter your Gmail account credentials in grade_script.py:
self.sender_address = "EMAIL_ADDRESS"
self.receiver_address = "EMAIL_ADDRESS"
self.account_password = "GMAIL_PASSWORD"
  1. Run grade_script.py:
python3 grade_script.py

About

This script scrapes every x hour my Universitys website to check if my grade is listed. If so, I will get an email noftification.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages