Simple and easy to use python API for the COVID registration booking system of the math department @ unipd (torre archimede)

Overview

Minimal API for the COVID Booking System of the Offices at the UniPD Math Dep

Currently for registering the presence at the math department you have to manually login into the math website and fill several forms EVERY day. In order to speedup this process, this project proposes a minimal interface of the COVID booking system of the math unipd website that you can use the simple API written in Python.

If you use the code of this repo and you find this project useful, please consider to give a star ⭐!

Requirements

  • You have to clone the repo:
# clone the repo
git clone https://github.com/guglielmocamporese/math-unipd-booking.git

# go the project folder
cd math-unipd-booking
  • You have to use Python 3.x (specifially I used Python 3.7, but 3.x should be ok),
  • You need the selenium package (this is a python package for interacting with web pages):
# install selenium
pip install selenium
  • You have to have Chrome (for now the code supports only this web browser),
  • You have to download chromedriver form [here] (search for the version compatible with your Chrome version), and move the extracted file into the project folder math-unipd-booking,
  • Extend the permissions for the bash scripts:
# extend files permissions
chmod +x ./book ./check ./remove

Example of Usage

# Book the office
./book # book the office 732 from 9:00 to 18:00, today
./book --office 702 --tomorrow # book the office 702 from 9:00 to 18:00, tomorrow
./book --next_week -ta 10 -td 19 # book the office 732 from 10:00 to 19:00, all the next week
./book --this_month # book the office 732 from 9:00 to 18:00, all this month

# Check reservations
./check --this_month # check all my reservations of this month in office 732

# Remove reservations
./remove --this_week # remove all my reservations of this week in office 732

Here all the input arguments that are supported:

  -h, --help            show this help message and exit
  --mode {book,check,remove}
                        Year of the booking.
  --year {2020,2021,2022}, -y {2020,2021,2022}
                        Year of the booking.
  --month {1,2,3,4,5,6,7,8,9,10,11,12}, -m {1,2,3,4,5,6,7,8,9,10,11,12}
                        Month number of the booking.
  --day DAY, -d DAY     Day of the booking.
  --arrival {7,8,9,10,11,12,13,14,15,16,17,18}, -ta {7,8,9,10,11,12,13,14,15,16,17,18}
                        Time of arrival (h) of the booking.
  --departure {8,9,10,11,12,13,14,15,16,17,18,19}, -td {8,9,10,11,12,13,14,15,16,17,18,19}
                        Time of departure (h) of the booking.
  --office OFFICE, -o OFFICE
                        Office number.
  --guests GUESTS, -g GUESTS
                        Guests names (optional).
  --today               Use today as the time reference.
  --tomorrow            Use tomorrow as the time reference.
  --this_week           Use this week as the time reference.
  --next_week           Use next week as the time reference.
  --this_month          Use this month as the time reference.
  --next_month          Use next month as the time reference.

TODO

  • Write a Telegram bot for this project,
  • Extend the code on different web browser other than Chrome,
  • Add functionalities (booking statistics, ...)
You might also like...
A simple and easy to use Python's PIP configuration manager, similar to the Arch Linux's Java manager.
A simple and easy to use Python's PIP configuration manager, similar to the Arch Linux's Java manager.

PIPCONF - The PIP configuration manager If you need to manage multiple configurations containing indexes and trusted hosts for PIP, this project was m

Python script which allows for automatic registration in Golfbox

Python script which allows for automatic registration in Golfbox

oracle arm registration script.

oracle_arm oracle arm registration script. 乌龟壳刷ARM脚本 本脚本优点 简单,主机配置好oci,然后下载main.tf即可,不用自己获取各种参数。 运行环境配置 本简单脚本使用python3编写,请自行配置好python3环境和requests库。(高版

Team10 backend - A service which accepts a VRM (Vehicle Registration Mark)

GreenShip - API A service which accepts a VRM (Vehicle Registration Mark) and re

With the initiation of the COVID vaccination drive across India for all individuals above the age of 18, I wrote a python script which alerts the user regarding open slots in the vicinity!

cowin_notifier With the initiation of the COVID vaccination drive across India for all individuals above the age of 18, I wrote a python script which

Python NZ COVID Pass Verifier/Generator

Python NZ COVID Pass Verifier/Generator This is quick proof of concept verifier I coded up in a few hours using various libraries to parse and generat

Vaksina - Vaksina COVID QR Validation Checker With Python

Vaksina COVID QR Validation Checker Vaksina is a general purpose library intende

Tie together `drf-spectacular` and `djangorestframework-dataclasses` for easy-to-use apis and openapi schemas.

Speccify Tie together drf-spectacular and djangorestframework-dataclasses for easy-to-use apis and openapi schemas. Usage @dataclass class MyQ

Owner
Guglielmo Camporese
PhD Student in Brain, Mind and Computer Science and Applied Scientist Intern at Amazon. Machine Learning for Videos, Images and Audio Speech contexts.
Guglielmo Camporese
UniPD exam dates finder

UniPD exam dates finder Find dates for exams at UniPD Usage ./finder.py courses.csv It's suggested to save output to a file: ./finder.py courses.csv >

Davide Peressoni 1 Jan 25, 2022
a simple proof system I made to learn math without any mistakes

math_up a simple proof system I made to learn math without any mistakes 0. Short Introduction test yourself, enjoy your math! math_up is an NBG-based,

양현우 5 Jun 4, 2021
A Python Web Application for Checking vaccine slots by pincodes and auto slot booking.

The Dashboard is developed using Bokeh and python 3.5+. This dashboard is useful for you if you are looking for something which will help you to book the vaccine slot once slots become available. Other Vaccine Finders will notify you once slots become available but you will still need to login to the portal and book the slot manually. This dashboard will look for slot availability continuously and will send the OTP itself once slots become available.

Suraj Deshmukh 10 Jan 23, 2022
Ontario-Covid-Screening - An automated Covid-19 School Screening Tool for Ontario

Ontario-Covid19-Screening An automated Covid-19 School Screening Tool for Ontari

Rayan K 0 Feb 20, 2022
🦠 A simple and fast (< 200ms) API for tracking the global coronavirus (COVID-19, SARS-CoV-2) outbreak.

?? A simple and fast (< 200ms) API for tracking the global coronavirus (COVID-19, SARS-CoV-2) outbreak. It's written in python using the ?? FastAPI framework. Supports multiple sources!

Marius 1.6k Jan 4, 2023
emoji-math computes the given python expression and returns either the value or the nearest 5 emojis as measured by cosine similarity.

emoji-math computes the given python expression and returns either the value or the nearest 5 emojis as measured by cosine similarity.

Andrew White 13 Dec 11, 2022
Gives you more advanced math in python.

AdvancedPythonMath Gives you more advanced math in python. Functions .simplex(args: {number}) .circ(args: {raidus}) .pytha(args: {leg_a + leg_2}) .slo

Voidy Devleoper 1 Dec 25, 2021
Ahmed Hossam 12 Oct 17, 2022
It's a repo for Cramer's rule, which is some math crap or something idk

It's a repo for Cramer's rule, which is some math crap or something idk (just a joke, it's not crap; don't take that seriously, math teachers)

Module64 0 Aug 31, 2022
Geodesic Dome Math

dome Geodesic Dome Math Python dome tool dome.py calculates an icosahedron or 2v geodesic dome and creates 3d printable hubs as OpenSCAD sources. usag

Brian Olson 2 Feb 9, 2022