This tool connects to the legacy ASP.NET website si-etudiants.imtbs-tsp.eu to retrieve your student schedule and convert it into an iCalendar (.ics) file.
- Python 3.13+
uvpackage manager
Dependencies are managed via uv and pyproject.toml.
Ensure you have the required packages installed:
uv syncRun the scraper script using uv:
uv run agenda_scraper.pyYou will be prompted for your school username and password.
To avoid entering credentials manually every time, you can create a .env file with the following variables:
SCHOOL_USER="your.username"
SCHOOL_PASS="your.password"On success, an agenda.ics file will be generated in the current directory.
The script automates the full interaction flow:
- Authentication: Handles the complex SAML/CAS login chain:
- Initiates login at the Service Provider (SP).
- Follows the SAML Request to the Identity Provider (IdP).
- Handles Shibboleth's intermediate checks (including fake LocalStorage pages).
- Logs in via the CAS server.
- Passes the SAML Response back to the SP to establish a session.
- Bridge Crossing: Navigates the "bridge" page that connects the main portal to the legacy ASP agenda application.
- Data Extraction: Fetches the weekly view in "Table Mode" to get precise timings.
- Parsing: Parses the HTML table to extract event details (Course name, type, time, location).
- Export: Generates a standard
agenda.icsfile compatible with Google Calendar, Outlook, and Apple Calendar.