No description
- Python 100%
| monitor.py | ||
| README.md | ||
| requirements.txt | ||
| seen_listings.json | ||
| test_monitor.py | ||
Tradera MacBook Monitor
A Python script that monitors Tradera for "Buy It Now" (Köp nu) deals on MacBooks with Apple Silicon (M1, M2, M3) and sends alerts to a Discord webhook.
Features
- Automated Monitoring: Scans Tradera search results every 2 minutes.
- Deal Evaluation: Compares "Buy It Now" prices against predefined thresholds for different MacBook models (Air, Pro, Max).
- Discord Integration: Sends real-time alerts with listing details and direct links.
- Deduplication: Remembers previously seen listings to avoid duplicate alerts.
Setup
- Clone the repository (or copy the files).
- Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate - Install dependencies:
pip install -r requirements.txt - Configure environment variables:
Create a
.envfile in the root directory and add your Discord Webhook URL:DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/...
Usage
Run the monitor:
python monitor.py
Configuration
You can adjust the deal thresholds in monitor.py:
THRESHOLDS = {
"m1_air": 4000,
"m1_pro": 7000,
# ...
}
Running Tests
To run the unit tests:
python test_monitor.py