A Selenium automation script set up on a cron job every midnight to book a time-slot for workouts everyday at any Fit4Less gym.
UPDATE: As of Oct, 2021, gym's are open as usual making this script redundant. This repository will be archived moving forward! Thank you all for using, testing, and reporting any issues.
NOTE
I've temporarily suspended my Fit4Less gym membership due to COVID, and as such, won't be able to maintain/add features for now since I no longer have access to the platform. If the script stops working, please make an issue and also don't be afraid to make forks of this repo and create pull requests if you can fix/work on any of them. Lastly, if this project has helped you, feel free to βοΈ it!
Fit4Less allows you to book time-slots either daily, one-day ahead, or two-days ahead. Now obviously, the longer you go without booking, the quicker the time-slots fill out. Therefore, in order to guarantee booking time-slots, I wanted to book two days ahead of schedule, and set up this script to run early each day (think midnight, or around that time) so it can book those slots before anyone else in advance.
- Fork this repo
- Set it up as a project on CircleCI
- Check project settings on CircleCI and configure Environment Variables as following:
WEBDRIVER_PATH=/usr/local/bin/chromedriver
DAYS=2
F4L_LOGIN=your email
F4L_PASSWORD=your password
F4L_CLUB=your desired club # OPTIONAL
TIME_SLOT=10:00AM
ENVIRONMENT=prod
- Run the build on CircleCI and check the logs under Install & Run for the build steps
Notes
F4L_CLUB
is optional and not needed as the script will book time-slots for the default selected club under your account. However, if you want to book time-slots at a different club, please add this field and your desired club name in ALL CAPS, e.g."WATERLOO NORTHFIELD"
. For a list of ALL CLUBS check here: CLUBS- You can change
DAYS
between 2, 1, 0 (check .env.example)- Please keep
WEBDRIVER_PATH
exactly as shown above since that's the path to driver in the docker container- there's minimal error handling so it either reserves your slot if it finds the timing, or you'll see an exception thrown, or skipped timings in your CircleCI logs
- Skipped timings means it didn't find your time slot, Exception means you've already booked max amount of slots!
- Clone the repo
- Follow instructions provided in the .env.example file and add your respective information to your local
.env
file - Create a virtual environment for the project using
python -m venv venv
& activate - Run
pip install -r requirements.txt
to install necessary dependencies - Run
autobooker.py
script - ???
- Profit!
Note: You can't book consecutive slots for the same day! One day/one slot is the rule from Fit4Less.