This repository was forked from Depaulicious/PoliScraper. Here's what changed:
webpoliscraper.py
works as a standalone script with the following syntax:./webpoliscraper.py "Lesson Timetable.html" iCal_File.ics
- The output calendar does not contain URLs and descriptions. Lesson names are rendered with a prettier capitalization. The location field only contains building and classroom.
- The file
PoliScraper.workflow
is an Automator workflow which – when installed as a Service on macOS – integrates the script with Google Chrome. Open the lesson schedule page on Chrome, click Chrome > Services > PoliScraper on the menu bar, and save the output .ics file. - The script
install.sh
copieswebpoliscraper.py
to/usr/local/bin
with the correct permissions and it installs the Service described above.
Below is the README.md
file from the original repository.
Scrapes the timetable from PoliMi online services and converts it to well-known iCal format
$ python2 src/scraper.py
Use the built-in web browser to navigate to the timetable. Cookies are stored in ~/.config/poliscraper/cookies.sqlite
The home button will bring you to your custom lesson schedule based on your study plan.
The timetable generated from a degree program can be used as well.
As soon as the timetable is loaded, the Scrape timetable button on the top bar will become clickable. Click it, pick a path and a file name, save your iCal and import it into your favourite calendar application ;)
- Go to calendar.google.com.
- Click on the cog on the top right, select Settings, then go to Calendars.
- (Optional) Create a new calendar. This is suggested as the generated calendar may contain errors; importing it to a separate calendar allows you to simply delete it if you need to.
- Go back to Settings > Calendar, then press Import calendar.
- Upload the generated iCal file. Make sure you import it to the right calendar by picking it from the Calendar dropdown menu.
Make sure you're viewing the textual timetable page. The synoptic timetable doesn't have enough information to be scraped
Before complaining on the issue tracker, make sure you're running the latest revision from GitHub.
If you're running the latest revision and the issue is still there, enable debug flags, copy the command line output post it in new issue on GitHub.
$ python2 src/scraper.py --debug-divs --debug-regex --debug-timetable
Make sure you remove any personal information, and that you use an external pastebin service for the program output. Keep your shitposting on Facebook, not on GitHub. Thank you <3