This repository is home to different scripts for checking when new information (that isn't otherwise emailed at all or in a timely fashion) becomes available on UBC's SSC. It uses Python and the Selenium library to check SSC and then notify the specified emails through UBC's Webmail of what has been released.
grades.py
- For getting notified when new grades are released
specs.py
- For first year engineering students to get notified when Engineering Specializations
have been released
- The computer the scripts run on must continuously remain on for SSC to be periodically scraped
- A desktop computer or always connected laptop is recommended for this reason
Warning
Although I (or anyone else I have spoken to who has used this) have never had any issues, SSC explicitly states that any sort of automated use of the service goes against their terms of service. With that in mind, use these scripts at your own risk :)
-
Ensure that you have Python installed. Visit this link if you need to install it.
-
Make sure you have Google Chrome installed. Download it here if it is not installed already.
-
Open Google Chrome and visit
chrome://version/
to check the browser version -
Visit this link and follow the instructions to download the closest version of Chrome's webdriver to your Google Chrome version
-
Download the appropriate zip file for your system (Windows, Mac, or Linux) and extract the contents
-
Put
chromedriver.exe
in the same folder as the scripts (inside ofsrc
) -
Make sure Selenium is installed for Python. See this link for installation instructions.
-
Open your terminal and make sure you are in the right directory (
src
). If you are at...\SSC-Scripts>
then runcd src
to get to...\SSC-Scripts\src>
-
Run
cp setup-example.py setup.py
which will make a copy ofsetup-example.py
and name itsetup.py
-
Inside of
setup.py
configure the following:- Add your CWL and CWL password
- Specify which email(s) you want to be notified in
EMAIL_LIST
- Set the
EMAIL_SEND_DELAY
, which is how long the program will wait for the email to send before closing the browser. By default, UBC Webmail has a long delay before it sends an email so make sure this delay is long enough (60 seconds is safe). - Set the
CHECK_INTERVAL
you want in seconds. This is the length of time the program will wait between checks. - Choose whether you want
SEND_DATA
to beTrue
orFalse
. This will determine if the information found (specialization or grade) will be included in the email that is sent. Disable this if you are emailing multiple people, and you want to keep your grades/specialization private. - If you are running
grades.py
, then specify the course(s) you want to watch for new grades
Upon initial run of either script, a browser window will open, and you will be prompted to complete MFA authentication (if enabled). This is so that the script can save your MFA login session and use it for future runs.
cd src # Only if you are not already in the src folder
python script_name.py
E.g. python grades.py
If you run into errors, the script will automatically save a screenshot of the browser window at the time of the
error as well as print the error to the terminal. The screenshot will be saved as either
ssc_error_<timestamp>.png
or email_error_<timestamp>.png
depending on where the error occurred.
If you are having trouble, or you notice the script is no longer functioning correctly, please open an issue and attach the error screenshot and additional details.