Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ‹οΈ Gym Slot Auto-Booker: Reliable Backend Service Prototype

πŸ’‘ Overview

This project is a robust, automated tool designed to secure high-demand gym class slots the moment registration opens.

It solves the common problem of manual booking failure by running autonomously in the background to log in, monitor the schedule, and execute bookings with guaranteed reliability.

This is a complete Backend Service Prototype. The intelligence is fully functional within the Python code, built with a clean architecture that is ready for deployment via an API.


🎯 Key Benefits (The Value Proposition)

Feature Non-Technical Benefit
Guaranteed Confirmation Checks your profile page to confirm the booking was successful, so you know the result is reliable.
High Reliability Handles slow websites and network lag by using robust waiting logic, ensuring the booking click always executes correctly.
Handles Waitlists If a class is full, the bot automatically joins the waitlist, maximizing your chances of getting in later.
Secure & Private Your login details are stored securely in a private .env file and are never committed to the codebase.

🌟 Technical Highlights (The Engineering)

This system is engineered for stability and professional use:

  • Object-Oriented Design (OOP): The entire workflow is encapsulated within the GymBooker class, managing session state (self.driver, self.wait) for clean, reusable code.
  • Production-Grade Stability: Replaces unreliable time.sleep() with advanced, custom WebDriverWait conditions to guarantee the application state is stable before any action is taken.
  • Advanced QA Verification: Implements a Set-Based Verification system to compare expected bookings against those found on the profile page, ensuring confirmation is accurate regardless of the website's class display order.
  • Data Integrity: Distinguishes between a "New Booking" and an "Already Booked" class by capturing the initial button state, fixing a common logical flaw in automation.

βš™οΈ Getting Started (For Developers & Users)

To run this prototype locally, you need Python and the required libraries.

1. Setup

  • Clone the Repository:

    git clone git@github.com:DonaldXoftDev/OOP-Gymbooker-automation-project.git
  • Create Virtual Environment and activate it.

  • Install Dependencies:

    pip install -r requirements.txt

2. Credentials & Security (CRITICAL)

  1. Manual Registration Prerequisite: You must first register an account on the gym website manually. The bot can only log into an existing account.

  2. Secure Credentials: After registering, you will store your chosen email and password in a secure .env file. This file is kept local (not shared on GitHub) for your protection.

    • Action: Create a file named .env in the root directory and add your login details:
    EMAIL_ADDRESS="your_registered_email@example.com"
    APP_PASSWORD="your_gym_password"
    

3. Run the Bot

Update the day_time_list inside the main script to reflect your desired classes, then run:

python 'OOP Workout automation.py'

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages