Tahseenm / ucl-timetable

πŸŽ“ UCL university timetable scraper written in Node.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Uses JS badge Built with love badge No ragrets badge

UCL logo scraping screenshot cli demo

Scrape UCL timetable and enjoy the JSON output

 

Table of Content

Project

This is a node app that uses a electron browser to scrape UCL's timetable single page app. It's a fun weekend project written two years ago when I still used semicolons in javascript. 😬

The app has been tested and it still works late 2017. πŸ‘

This is a tool I wish I had when I was studying at UCL. The timetable web app is slow and suffers from a terrible user interface so I rather have JSON.

 

Requirements

The app requires Node.js and npm (npm comes prebundled with node). The source code is written in ES2015 so Node.js V6+ is recommended. Node.js version can be checked using the node -v cli command. Babel is used as a dependency to transpile ES6 modules and async functions.

 

Installation

1. Clone Repository

> git clone https://github.com/Tahseenm/ucl-timetable && cd ucl-timetable

2. Install Dependencies

Using npm

> npm install

Using yarn

> yarn

 

Usage

Scrape Course Timetable

cli demo

Just provide the app a valid UCL degree and year of course and let it do it's magic.

Using npm

> npm start -- --degree 'BSc Mathematics' --year 2

Using yarn

> yarn start --degree 'BSc Mathematics' --year 2

Debug Mode

scraping screenshot

Just add the debug flag to see the app scrape the UCL timetable with the electron browser window open.

> npm start -- --degree 'BSc Mathematics' --year 2 --debug

The whole Timetable

Scrape the timetable for every course. In case of a error just run the command again and it will resume from where it last left of.

This can take a long time, since the app has to scrape over 30,000 pages using electron, so you might want to catch up with your favourite TV show.

> npm start -- --all

 

Contributors

Tahseen Malik

License

MIT

About

πŸŽ“ UCL university timetable scraper written in Node.js

License:MIT License


Languages

Language:JavaScript 100.0%