Skip to content

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

License

Notifications You must be signed in to change notification settings

Tahseenm/ucl-timetable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

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

Topics

Resources

License

Stars

Watchers

Forks