A Python scraper that fetches daily deals from Mercado Libre Argentina and generates a beautiful HTML report with price history verification.
- 🛒 Scrapes multiple offer types — Daily deals and flash offers (Ofertas Relámpago)
- 📊 Price history verification — Validates top discounts using MercadoTrack to spot inflated "fake" discounts
- 📈 Sparkline charts — Visual price history for featured offers
- 🏷️ Smart sorting — Offers sorted by discount percentage (highest first)
- 🔄 Deduplication — Automatically removes duplicate listings
- 📝 Rotating logs — Debug logs with automatic rotation (5MB max, 3 backups)
git clone <your-repo-url>
cd ml-scraper
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txtpython scraper.pyOpen the generated offers-YYYY-MM-DD.html file in your browser.
The scraper generates an HTML file with:
-
Featured section — Top 3 highest-discounted offers with price history analysis:
- 🔥 Historical low price
- ✅ Good price vs. average
⚠️ Suspicious (price inflated before discount)- 📊 Normal price range
-
All offers grid — Complete list of offers with images, prices, and discount badges
Edit these constants in scraper.py to customize:
| Variable | Default | Description |
|---|---|---|
pages_per_source |
3 | Number of pages to scrape per offer type |
top_n |
3 | Number of offers to verify with price history |
Detailed logs are written to scraper.log with timestamps and severity levels. Console output shows a summary.
- Python 3.10+
requestslibrary
MIT