Code Monkey home page Code Monkey logo

poliscraper's Introduction

About this fork

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 copies webpoliscraper.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.  

PoliMi Timetable Scraper

Scrapes the timetable from PoliMi online services and converts it to well-known iCal format

Screenshot

Usage

$ 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 ;)

Importing into Google Calendar

  1. Go to calendar.google.com.
  2. Click on the cog on the top right, select Settings, then go to Calendars.
  3. (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.
  4. Go back to Settings > Calendar, then press Import calendar.
  5. Upload the generated iCal file. Make sure you import it to the right calendar by picking it from the Calendar dropdown menu.

Troubleshooting

The "Scrape timetable" button is not clickable

Make sure you're viewing the textual timetable page. The synoptic timetable doesn't have enough information to be scraped

I'm getting an error message

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.