MediChaser is a tool for automating Medicover appointment searches. It interacts with the Medicover website, handles login and MFA, and sends notifications when appointments are found.
The application is designed to be run in a Docker container and includes a ttyd web terminal for remote management.
- Search for appointments by region, specialty, clinic, doctor, date range, and language at a configurable interval.
- Handles Multi-Factor Authentication (MFA).
- Sends notifications via Gotify, Telegram, Pushbullet, Pushover, Prowl and XMPP.
- Remote management through an integrated
ttydweb terminal. - Persistent data storage for sessions, tokens, and logs.
- Bullet proof design - created for long runs.
- Shell autocomplete for
medichaser.py.
MediChaser automates Medicover interactions using two login methods, both supporting Multi-Factor Authentication (MFA):
- Direct HTTP Requests (Default): Fast and efficient, interacting directly with the Medicover API.
- Selenium-based Login: An alternative using a headless browser, which can be enabled with the
SELENIUM_LOGINenvironment variable.
The included ttyd service provides command-line access to the container via a web browser.
Prerequisites: Docker and Docker Compose.
-
Clone the repository:
git clone https://github.com/rafsaf/medichaser.git cd medichaser -
Create
.envfile:cp .env.example .env
-
Configure credentials:
Edit the
.envfile with your Medicover username and password.MEDICOVER_USER="your_username" MEDICOVER_PASS="your_password"
Configure notifiers in this file as well (see below).
-
Run with Docker Compose:
docker compose up -d
-
Access the web terminal:
Navigate to
http://localhost:7681.
All commands are run from the web terminal.
-
List regions:
python medichaser.py list-filters regions
-
List specialties:
python medichaser.py list-filters specialties
-
List clinics (example for Warsaw, Pediatrics):
python medichaser.py list-filters clinics -r 204 -s 132
-
List doctors (example for Warsaw, Pediatrics):
python medichaser.py list-filters doctors -r 204 -s 132
-
Basic search (Pediatrician in Warsaw):
python medichaser.py find-appointment -r 204 -s 132
-
Search with a date range:
python medichaser.py find-appointment -r 204 -s 132 -d 394 -f "2025-12-16" -e "2025-12-19"
-
Search in one clinic:
python medichaser.py find-appointment -r 204 -s 132 -c 49284
-
Search by language (Ukrainian-speaking dental hygienist):
python medichaser.py find-appointment -r 204 -s 112 -l 60
-
Search diagnostic procedures (set slot search type):
python medichaser.py find-appointment -r 204 -s 132 -S DiagnosticProcedure
Use
-S/--slot-search-typeto override the default slot search type. -
Continuous monitoring and notifications:
python medichaser.py find-appointment -r 204 -s 132 -i 15 -n gotify -t "Pediatra Warszawa"To run the monitoring process in the background within the web terminal, you can use
screen:-
Start a new screen session:
screen -S medichaser
-
Run your command with the interval (
-i) option. -
Detach from the session by pressing
Ctrl+AthenD. The command will keep running. -
To re-attach to the session later, run:
screen -r medichaser
For more information on using screen, check out this guide.
-
Add the required environment variables for your preferred service to the .env file.
GOTIFY_HOST: Your server URL (e.g.,http://gotify.example.com:8080).GOTIFY_TOKEN: Your app token.GOTIFY_PRIORITY(Optional): Default is5.
NOTIFIERS_TELEGRAM_TOKEN: Your bot token.NOTIFIERS_TELEGRAM_CHAT_ID: The chat ID to send messages to.
NOTIFIERS_PUSHOVER_USER: Your user key.NOTIFIERS_PUSHOVER_TOKEN: Your application API token.
NOTIFIERS_PUSHBULLET_TOKEN: Your access token.
NOTIFIERS_PROWL_API_KEY: Your API key.
NOTIFIERS_XMPP_JID: Your full JID ([email protected]).NOTIFIERS_XMPP_PASSWORD: Your password.NOTIFIERS_XMPP_RECEIVER: The recipient's JID.
The integrated ttyd web terminal provides convenient access to the container's command line. If you are hosting this service on a publicly accessible server, it is crucial to secure the web terminal to prevent unauthorized access.
You can secure ttyd by:
- Using
ttyd's built-in authentication: Change default CMD to enable basic authentication when running container. - Using a reverse proxy: Place a reverse proxy like Nginx or Traefik in front of the
ttydservice to handle authentication and SSL/TLS termination.
# 1. install uv (see https://docs.astral.sh/uv/)
uv sync
# 2. hack
# 3. lint directly or install pre-commit hooks with uv run pre-commit install
uv run pre-commit run -a
# 4. run tests
uv run pytestThis project stands on the shoulders of giants. Big thanks to the original authors and inspirations:
