{"id":30269742,"url":"https://github.com/rafsaf/medichaser","last_synced_at":"2025-08-16T02:18:21.357Z","repository":{"id":306613691,"uuid":"1014458045","full_name":"rafsaf/medichaser","owner":"rafsaf","description":"Tool for automating Medicover appointment searches - medihunter fork","archived":false,"fork":false,"pushed_at":"2025-08-11T20:19:17.000Z","size":1254,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-11T21:34:13.844Z","etag":null,"topics":["docker","medicover","python","selenium"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/rafsaf/medichaser","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rafsaf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-05T19:07:55.000Z","updated_at":"2025-08-11T20:19:19.000Z","dependencies_parsed_at":"2025-07-26T20:17:01.182Z","dependency_job_id":"69ce092b-586a-4c9c-8078-52280388252f","html_url":"https://github.com/rafsaf/medichaser","commit_stats":null,"previous_names":["rafsaf/medichaser"],"tags_count":32,"template":false,"template_full_name":null,"purl":"pkg:github/rafsaf/medichaser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafsaf%2Fmedichaser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafsaf%2Fmedichaser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafsaf%2Fmedichaser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafsaf%2Fmedichaser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rafsaf","download_url":"https://codeload.github.com/rafsaf/medichaser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafsaf%2Fmedichaser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270657715,"owners_count":24623465,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-16T02:00:11.002Z","response_time":91,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","medicover","python","selenium"],"created_at":"2025-08-16T02:18:20.740Z","updated_at":"2025-08-16T02:18:21.333Z","avatar_url":"https://github.com/rafsaf.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MediChaser\n\n[![Docker Pulls](https://img.shields.io/docker/pulls/rafsaf/medichaser.svg)](https://hub.docker.com/r/rafsaf/medichaser)\n[![Latest release](https://img.shields.io/github/v/release/rafsaf/medichaser)](https://github.com/rafsaf/medichaser/releases/latest)\n\nMediChaser 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.\n\nThe application is designed to be run in a Docker container and includes a `ttyd` web terminal for remote management.\n\n![medichaser-example.png](./medichaser-example.png)\n\n---\n\n## Features\n\n- Search for appointments by region, specialty, clinic, doctor, date range, and language at a configurable interval.\n- Handles Multi-Factor Authentication (MFA).\n- Sends notifications via Gotify, Telegram, Pushbullet, Pushover, Prowl and XMPP.\n- Remote management through an integrated `ttyd` web terminal.\n- Persistent data storage for sessions, tokens, and logs.\n- Bullet proof design - created for long runs.\n- Shell autocomplete for `medichaser.py`.\n\n---\n\n## How It Works\n\nMediChaser automates Medicover interactions using two login methods, both supporting Multi-Factor Authentication (MFA):\n\n-   **Direct HTTP Requests (Default)**: Fast and efficient, interacting directly with the Medicover API.\n-   **Selenium-based Login**: An alternative using a headless browser, which can be enabled with the `SELENIUM_LOGIN` environment variable.\n\nThe included `ttyd` service provides command-line access to the container via a web browser.\n\n---\n\n## Setup\n\n**Prerequisites**: Docker and Docker Compose.\n\n1. **Clone the repository:**\n\n    ```bash\n    git clone https://github.com/rafsaf/medichaser.git\n    cd medichaser\n    ```\n\n2. **Create `.env` file:**\n\n    ```bash\n    cp .env.example .env\n    ```\n\n3. **Configure credentials:**\n\n    Edit the `.env` file with your Medicover username and password.\n\n    ```bash\n    MEDICOVER_USER=\"your_username\"\n    MEDICOVER_PASS=\"your_password\"\n    ```\n\n    Configure notifiers in this file as well (see below).\n\n4. **Run with Docker Compose:**\n\n    ```bash\n    docker compose up -d\n    ```\n\n5. **Access the web terminal:**\n\n    Navigate to `http://localhost:7681`.\n\n---\n\n## Usage\n\nAll commands are run from the web terminal.\n\n### Listing Filters\n\n- **List regions:**\n\n    ```bash\n    python medichaser.py list-filters regions\n    ```\n\n- **List specialties:**\n\n    ```bash\n    python medichaser.py list-filters specialties\n    ```\n\n- **List clinics** (example for Warsaw, Pediatrics):\n\n    ```bash\n    python medichaser.py list-filters clinics -r 204 -s 132\n    ```\n\n- **List doctors** (example for Warsaw, Pediatrics):\n\n    ```bash\n    python medichaser.py list-filters doctors -r 204 -s 132\n    ```\n\n### Finding Appointments\n\n- **Basic search** (Pediatrician in Warsaw):\n\n    ```bash\n    python medichaser.py find-appointment -r 204 -s 132\n    ```\n\n- **Search with a date range**:\n\n    ```bash\n    python medichaser.py find-appointment -r 204 -s 132 -d 394 -f \"2025-12-16\" -e \"2025-12-19\"\n    ```\n\n- **Search in one clinic**:\n\n    ```bash\n    python medichaser.py find-appointment -r 204 -s 132 -c 49284\n    ```\n\n- **Search by language** (Ukrainian-speaking dental hygienist):\n\n    ```bash\n    python medichaser.py find-appointment -r 204 -s 112 -l 60\n    ```\n\n- **Continuous monitoring and notifications**:\n\n    ```bash\n    python medichaser.py find-appointment -r 204 -s 132 -i 15 -n gotify -t \"Pediatra Warszawa\"\n    ```\n\n    To run the monitoring process in the background within the web terminal, you can use `screen`:\n\n    1. Start a new screen session:\n\n        ```bash\n        screen -S medichaser\n        ```\n\n    2. Run your command with the interval (`-i`) option.\n    3. Detach from the session by pressing `Ctrl+A` then `D`. The command will keep running.\n    4. To re-attach to the session later, run:\n\n        ```bash\n        screen -r medichaser\n        ```\n\n    For more information on using screen, check out this [guide](https://www.gnu.org/software/screen/manual/screen.html).\n\n---\n\n## Notifications Setup\n\nAdd the required environment variables for your preferred service to the `.env` file.\n\n### Gotify\n\n- `GOTIFY_HOST`: Your server URL (e.g., `http://gotify.example.com:8080`).\n- `GOTIFY_TOKEN`: Your app token.\n- `GOTIFY_PRIORITY` (Optional): Default is `5`.\n\n### Telegram\n\n- `NOTIFIERS_TELEGRAM_TOKEN`: Your bot token.\n- `NOTIFIERS_TELEGRAM_CHAT_ID`: The chat ID to send messages to.\n\n### Pushover\n\n- `NOTIFIERS_PUSHOVER_USER`: Your user key.\n- `NOTIFIERS_PUSHOVER_TOKEN`: Your application API token.\n\n### Pushbullet\n\n- `NOTIFIERS_PUSHBULLET_TOKEN`: Your access token.\n\n### Prowl\n\n- `NOTIFIERS_PROWL_API_KEY`: Your API key.\n\n### XMPP (Jabber)\n\n- `NOTIFIERS_XMPP_JID`: Your full JID (`user@example.com`).\n- `NOTIFIERS_XMPP_PASSWORD`: Your password.\n- `NOTIFIERS_XMPP_RECEIVER`: The recipient's JID.\n\n---\n\n## Security Considerations\n\nThe 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.\n\nYou can secure `ttyd` by:\n\n- **Using `ttyd`'s built-in authentication**: Change default CMD to enable basic authentication when running container.\n- **Using a reverse proxy**: Place a reverse proxy like Nginx or Traefik in front of the `ttyd` service to handle authentication and SSL/TLS termination.\n\n---\n\n## Development\n\n```bash\n# 1. install poetry\npoetry install\n# 2. hack\n# 3. lint directly or install pre-commit hooks with poetry run pre-commit install\npoetry run pre-commit run -a\n# 4. run tests\npoetry run pytest\n```\n\n---\n\n## Acknowledgements\n\nThis project stands on the shoulders of giants. Big thanks to the original authors and inspirations:\n\n- [apqlzm/medihunter](https://github.com/apqlzm/medihunter)\n- [SteveSteve24/MediCzuwacz](https://github.com/SteveSteve24/MediCzuwacz)\n- [atais/medibot](https://github.com/atais/medibot)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frafsaf%2Fmedichaser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frafsaf%2Fmedichaser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frafsaf%2Fmedichaser/lists"}