No description
Find a file
2026-05-05 10:33:42 +02:00
monitor.py First version 2026-05-05 10:31:41 +02:00
README.md Added requirements and a readme. 2026-05-05 10:33:42 +02:00
requirements.txt Added requirements and a readme. 2026-05-05 10:33:42 +02:00
seen_listings.json First version 2026-05-05 10:31:41 +02:00
test_monitor.py First version 2026-05-05 10:31:41 +02:00

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

  1. Clone the repository (or copy the files).
  2. Create a virtual environment:
    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    
  3. Install dependencies:
    pip install -r requirements.txt
    
  4. Configure environment variables: Create a .env file 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