Skip to content
This repository was archived by the owner on Aug 2, 2025. It is now read-only.

WhisperN/UZHBookingBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

Booking bot for UB @UZH

If you are not familiar with scheduled tasks and programming in general. Feel free to ask me, I can give you detailed information or help you to install. ~nilsjosef.jacobi@uzh.ch

If you like my work buy my a coffee - paypal

Functionality

This is a bot that books a seat in a UB library for a given place, library and time (as defined in the moment of execution via cronjob).

requirements

  • Selenium: current pip version
  • Chromedriver: 135.* or newer
  • Chrome: 135.* or newer
  • Python: 3.9 or newer

Installation

Selenium

pip install selenium

pip install webdriver-manager

The following is only here for legacy reasons. This step became obsolete in the newest patch. Skip to the chrome installation. Chromedriver

For MacOS (ARM Architecture)

curl https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/119.0.6045.105/mac-arm64/chromedriver-mac-arm64.zip

Select a version

Continue here

Chrome from the official site

Python 3.9 or newer

Note

For this code to run on a schedule, components must be configured to run in "headless" mode. That means it should run without a GUI. If you encounter errors this is a reoccuring problem.

Implementation

Setup variables Example:

__pwd__ = Password
__mail__ = name@uzh.ch

Read the comments in the code for further variables that need to be set.

Setting up a Cronjob

crontab -e

On the end of the file add the following code:

0 6 * * * sh /path/to/ubbookedbot/main.sh >> /path/to/ubbookedbot/UB-Cron-Log.txt 2>&1

This will make the main.sh code run every day at 6:00 am. For security and implementation reasons I created a main.sh file that can run the main.py file using the following command:

python3 /path/to/ubbookedbot/main.py

DO NOT SAVE THE main.sh IN THE HOME DIRECTORY. The home directory is encrypted as soon as you logout of your machine.

TODO: Installation script. Coming soon...

About

Booking bot for UZH UB Booking

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages