/uozone-calendar

Headless browser that extracts the course schedule's information from uoZone

Primary LanguageJavaScript

uozoneCalendar

This project uses Google's Puppeteer headless chrome browser to extract the information about the course schedule on University of Ottawa uoZone's website. Everything is done locally on your machine and the University of Ottawa's uoZone website. If you want to see what is happening in the background, you only need to remove the headless feature from the browser by changing the launch properties of the browser in the method called browserSetup() from

browser = await puppeteer.launch({ headless: true });

to

browser = await puppeteer.launch({ headless: false });

Initial setup

You need node.js installed on your computer and you need to clone this repository

git clone https://github.com/BenJeau/uozoneCalendar

Then install the node.js dependencies before being able to run the node.js code

cd uozoneCalendar
npm install

Once its done downloading/installing, run the code by typing

node .

The code will prompt you to enter your uoZone's credentials. Once the code is finished, the data will be located at the root of the folder in the file named data.json. The data's JSON schema file in the file named jsonSchema.json and you can visualise the file with docson on the webpage here.

Steps the program takes

  1. Logs in to uoZone's website
  2. Goes to a link, to get access to that portion of the web application
  3. Then it goes to inner frame of the last webpage to be able to easily control the DOM of the webpage and starts the extraction process by injecting some javascript code in the webpage to manipulate the DOM

Future features

  • Google Calendar integration by putting the data from the course schedule in your Google Calendar account and using Google's Calendar API

Note: not affiliate with the University of Ottawa