README.md

April 27, 2026 ยท View on GitHub


  __  __      _____
 |  \/  |    |  __ \
 | \  / |    | |  | |
 | |\/| |    | |  | |
 | |  | |    | |__| |
 |_|  |_|    |_____/

M-D E-Commerce Scraper

A modern, high-volume structured product data collection system

Inspired by the Claude Code CLI experience


Python License Platforms Capacity


Quickstart CLI Architecture



๐Ÿš€ Overview

A production-ready CLI scraping system built with Python. It collects, cleans, and stores product data from multiple e-commerce platforms, providing analysis-ready datasets in multiple formats.

  • Multi-Platform: Amazon, Noon, AliExpress, Jumia, and eBay.
  • High Volume: Support for up to 1000 pages per site (~20,000 products).
  • Modern UI: Minimalist "Claude Code" inspired CLI with a clean Peach-theme.
  • Clean Data: Automatic validation, deduplication, and normalization.

๐Ÿ“ฆ Platforms

PlatformCurrencyModeStatus
AmazonUSDSimulatedโœ… Ready
NoonAEDSimulatedโœ… Ready
AliExpressUSDSimulatedโœ… Ready
JumiaEGPSimulatedโœ… Ready
eBayUSDSimulatedโœ… Ready
Books to ScrapeGBPLiveโœ… Ready

โšก Quickstart

  1. Install Dependencies:

    pip install -r requirements.txt
    
  2. Run Interactive Mode (Recommended):

    python main.py
    
  3. Or use direct commands:

    # Scrape 10 pages from Amazon
    python main.py scrape amazon 10
    

๐Ÿ’ป CLI Usage

๐Ÿ” Scraping

python main.py scrape all 5              # Scrape all sites (5 pages each)
python main.py scrape noon 10 -q "phone" # Scrape specific site with keyword
python main.py scrape ebay 5 -f csv      # Scrape and export to CSV directly

๐Ÿ“Š Data & Analysis

python main.py analyze                   # Show full analysis report
python main.py stats                     # Show quick database statistics
python main.py sites                     # List all available platforms

๐Ÿ“‚ Exporting

python main.py export csv                # Export all stored data to CSV
python main.py export excel              # Export to Excel format

๐Ÿ“ Project Structure

md-scraper/
โ”œโ”€โ”€ main.py              # Entry point (CLI + Interactive)
โ”œโ”€โ”€ config/              # Configuration & Settings
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ scrapers/        # Scraping logic for all sites
โ”‚   โ”œโ”€โ”€ models/          # Data structures (Product, Price)
โ”‚   โ”œโ”€โ”€ pipeline/        # Cleaning & Normalization
โ”‚   โ”œโ”€โ”€ storage/         # Database & Exporters
โ”‚   โ””โ”€โ”€ utils/           # Colors, HTTP Client, Logger
โ”œโ”€โ”€ data/                # Database & Exported files
โ””โ”€โ”€ logs/                # Application logs

โš™๏ธ Configuration

Control the scraper behavior using environment variables or settings.py:

VariableDefaultPurpose
SCRAPER_MAX_PAGES1000Maximum pages per site
SCRAPER_DELAY_MIN1.5Minimum delay between requests
SCRAPER_TIMEOUT30Request timeout in seconds
LOG_LEVELINFOVerbosity (DEBUG/INFO/ERROR)

๐Ÿ’พ Data & Storage

  • Database: All scraped data is stored in data/scraper.db (SQLite).
  • Exports: Found in data/processed/.
  • Custom Sites: Add your own sites via the interactive menu; they are saved in data/custom_sites.json.

๐Ÿ“– Documentation

For more detailed information, check the module-specific documentation:


โš–๏ธ License & Ethical Use

  • License: MIT - See LICENSE for details.
  • Ethics: Please respect robots.txt and use the built-in delays to avoid overwhelming servers.

M-D E-Commerce Scraper โ€” Mohamed Darwish