A CLI tool that monitors varaosahaku.fi (a Finnish car parts marketplace) for parts availability. Give it a category page URL and a category name, and it will poll the page and alert you when parts become available.
Alerts are logged to the console and optionally pushed to your phone via Pushover.
- Python 3.13+
- uv
git clone https://github.com/taskinen/varaosabotti.git
cd varaosabotti
uv sync1. Find your category page URL on varaosahaku.fi. Navigate to a car model and select a part group. Copy the URL from the browser — it will look something like:
https://www.varaosahaku.fi/fi-fi/pb/Hae/Autonosat/s19/Polestar/2/Sisusta
2. List available categories to see what you can monitor:
uv run varaosabotti --url 'https://www.varaosahaku.fi/fi-fi/pb/Hae/Autonosat/s19/Polestar/2/Sisusta' --list-categoriesThis prints all categories grouped by section, with [+] for available and [-] for unavailable parts.
3. Start monitoring a category:
uv run varaosabotti --url '...' --category 'Kattoverhoilu' --interval 60The tool will poll the page every 60 seconds and log an alert when the category becomes active.
uv run varaosabotti [OPTIONS]
| Option | Default | Env var | Description |
|---|---|---|---|
--url URL |
VARAOSABOTTI_URL |
Category page URL to monitor | |
--category NAME |
VARAOSABOTTI_CATEGORY |
Category name to watch | |
--interval SECS |
300 | VARAOSABOTTI_INTERVAL |
Poll interval in seconds |
--pushover-token TOKEN |
PUSHOVER_TOKEN |
Pushover API token | |
--pushover-user KEY |
PUSHOVER_USER |
Pushover user key | |
--list-categories |
Print all categories and exit | ||
--test-notification |
Send a test push notification and exit | ||
--once |
Run a single check and exit | ||
--verbose |
Enable debug logging |
All options that accept env vars can be set either way. Command-line flags take precedence.
Categories are matched exactly (case-insensitive). Some categories share the same name across different sections. Use /-separated paths to disambiguate:
# Simple name
uv run varaosabotti --url '...' --category 'Kattoverhoilu'
# Parent / child
uv run varaosabotti --url '...' --category 'Oviverhoilu / Vasen'
# Group / parent / child (fully qualified)
uv run varaosabotti --url '...' --category 'Sisusta Ovet / Oviverhoilu / Vasen'If a category is not found, the tool suggests similar names and exits.
To receive push notifications on your phone:
- Create an account at pushover.net — your user key is shown on the dashboard after login
- Create a new application (e.g. "varaosabotti") — this gives you an application API token
- Pass both credentials:
uv run varaosabotti --url '...' --category 'Kattoverhoilu' \
--pushover-token YOUR_APP_TOKEN \
--pushover-user YOUR_USER_KEYTest your setup without monitoring:
uv run varaosabotti --pushover-token YOUR_APP_TOKEN --pushover-user YOUR_USER_KEY --test-notificationFor long-running use, environment variables avoid repeating arguments:
export VARAOSABOTTI_URL='https://www.varaosahaku.fi/fi-fi/pb/Hae/Autonosat/s19/Polestar/2/Sisusta'
export VARAOSABOTTI_CATEGORY='Kattoverhoilu'
export VARAOSABOTTI_INTERVAL=60
export PUSHOVER_TOKEN=your_token
export PUSHOVER_USER=your_key
uv run varaosabottiRun with Docker Compose — no Python or uv installation needed:
docker compose up -dEdit docker-compose.yml to configure the monitoring target and optional Pushover credentials:
environment:
VARAOSABOTTI_URL: "https://www.varaosahaku.fi/fi-fi/pb/Hae/Autonosat/s19/Polestar/2/Sisusta"
VARAOSABOTTI_CATEGORY: "Hattuhylly"
VARAOSABOTTI_INTERVAL: "300"
# PUSHOVER_TOKEN: ""
# PUSHOVER_USER: ""Useful commands:
docker compose logs -f # Follow logs
docker compose down # Stop
docker compose run --rm varaosabotti --list-categories # One-off commands- Fetches the category page via HTTP GET (the site uses Angular SSR, so server-rendered HTML is returned directly — no headless browser needed)
- Parses the HTML to extract categories and their active/inactive status
- Checks if the monitored category has transitioned from inactive to active
- Sends an alert on the transition (only once per transition, not every poll cycle)
- Sleeps for the configured interval and repeats
The tool is resilient to transient errors: network failures and HTTP errors are logged and polling continues.
uv sync # Install dependencies
uv run pytest # Run tests
uv run ruff check . # Lint