Skip to content

Selenium app to automatically book a slot in the octiv-app. The repository includes a Dockerfile, and the terraform files to setup the infrastructure on aws needed to run it continuously.

License

Notifications You must be signed in to change notification settings

seblum/octiv-booker

Repository files navigation

Deployment CD

Octiv SlotBooker

Octiv Overview

Octiv Slotbooker is a tool used to book slots/classes for the fitness app Octiv. It was developed to automate the weekly booking of classes, utilizing Selenium for its functionality.

Structure

The repository includes the app itself written in Python and a Dockerfile under slotBooker. The directory structure is as follows:

OCTIV_BOOKER
│   README.md
│   justfile
│   poetry.Dockerfile
│   .pre-commit-config.yaml
│   LICENSE
│   pyproject.toml
│
└───.github/workflows
│
└───src
│   │   tests
│   │   ...
│   │
│   └───slotbooker
│       │   booker.py
│       │   ui_interaction.py
│       │   ...
│       │   
│       └───utils
│       │   │   driver.py
│       │   │   gmail.py
│       │   │   logging.py
│       │   │   ...
│       │   
│       └───data
│           │   classes.yaml

Prerequisites

To run the app locally, you need to have the following installed and properly configured:

  • Docker
  • Chromedriver for Selenium (if running without Docker)

Usage

Local Development

Poetry is used for dependency management and running the application. For local development, ensure that the required environment variables are set. You can create a .env file in the root directory with the following content:

# .env
OCTIV_PASSWORD=password
[email protected]
EMAIL_PASSWORD=password_2
[email protected]
DAYS_BEFORE_BOOKABLE=1
EXECUTION_BOOKING_TIME=HH:MM:SS.XX

Using the Justfile

To facilitate development, a justfile is provided. Here are some key commands:

# Run the application:**
just run

# Run the development version of the application:**
just run-dev

# Build the Docker image:**
just docker-build

# Run the Docker container:**
just docker-run

# Full Docker workflow (build and run):**
just docker-full

By using the provided justfile and the instructions above, you can easily set up and manage your development environment for Octiv SlotBooker.

About

Selenium app to automatically book a slot in the octiv-app. The repository includes a Dockerfile, and the terraform files to setup the infrastructure on aws needed to run it continuously.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published