Converts timetables generated from http://mytimetable1.eit.ac.nz/ to CSV files compatible with Google Calendar
Use python version >= 3.6
Setup a virtual environment
$ python3 -m venv venv
Activate the virtual environment.
# On Linux / POSIX
$ source ./venv/bin/activate
# On Windows with cmd.exe
C:\> venv\Scripts\activate.bat
# On Windows with powershell
C:\> venv\Scripts\Activate.ps1
Install the requirements
$ pip install -r requirements.txt
Create the file urls.txt
in the current working directory.
The urls are retrieved by the following:
- Navigating to http://mytimetable1.eit.ac.nz
- Clicking on the Courses button.
- Searching for your course & selecting it from the dropdown box.
- Clicking on the View Timetable button.
- Coping the url in the address bar.
What the file should look like: (look at example.urls.txt
)
http://mytimetable1.eit.ac.nz/Home/Timetable...
http://mytimetable1.eit.ac.nz/Home/Timetable...
http://mytimetable1.eit.ac.nz/Home/Timetable...
http://mytimetable1.eit.ac.nz/Home/Timetable...
http://mytimetable1.eit.ac.nz/Home/Timetable...
http://mytimetable1.eit.ac.nz/Home/Timetable...
http://mytimetable1.eit.ac.nz/Home/Timetable...
http://mytimetable1.eit.ac.nz/Home/Timetable...
python scrape.py
This saves a calendar.csv
file in the current working directory.