Scrape UCL timetable and enjoy the JSON output
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.
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.
> git clone https://github.com/Tahseenm/ucl-timetable && cd ucl-timetable
Using npm
> npm install
Using yarn
> yarn
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
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
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
MIT