This bot allows you to book a specified room in the Johns Hopkins Brody/MSE library for up to an entire day. The bot will run at midnight every night, so you won't have to worry about staying up to book a study room anymore.
Download the project directory and ensure Python 3 is installed on your computer.
In the project directory, open your terminal and execute the following command:
pip install -r requirements.txt
To customize the bot, run configure.py with any of the following command options:
--starthour: the earliest time the bot will book from.--endhour: the latest time the bot will book to.--roomlink: the link to the study room that the bot will book. Visit here to find a room to book.
For example, running:
configure.py --starthour 10 --endhour 22 --roomlink https://jhu.libcal.com/space/7913
would configure the bot to book room 2006 from 10 AM to 10 PM every day.
- SQLite serves well as a lightweight database to keep state between Multiprocessing processes. However, it does not handle write-heavy applications well, which may cause the program to store inaccurate states during runtime. For example, when several bots try to write to the database in a short period of time, some timeframes may not be marked as "booked" correctly.
- As the number of bots deployed concurrently scales, the chance that one or multiple bots fails at booking a timeframe increases. This may be related to the user's machine's processing power, or the number of requests being sent to the site at the same time.