Skip to content

petercoker/e-commerce-retailer-scraper-framework

Repository files navigation

E-Commerce Retailer Scraper Framework

A clean, extensible, TDD-built Node.js + TypeScript + Playwright scraper for Amazon.es: designed to move offline market research online and easily extendable to other sites (eBay, AliExpress, Mercadona, PcComponentes, etc.).

Project Structure

src/

  • core/ = shared (ScraperCore, types, events, retry)
  • retailers/ = one adapter per site (amazon.ts, ebay.ts...)
  • pipelines/ = JSON + CSV (decoupled output)
  • utils/ = parsePrice, safeGoto, BrowserManager
  • cli.ts = simple terminal runner

Features

  • getProductList(keywords) — returns top 5 organic products (id, title, price, currency)
  • getProduct(id) — returns full product details (id, title, price, currency, images, etc.)
  • Reusable singleton browser (BrowserManager — launches once)
  • Decoupled output pipelines (JSON + CSV export via events)
  • Retry logic with exponential backoff
  • Random delays to mimic human behavior
  • Cookie banner handling
  • Ready for new retailers (one adapter file per site)

Quick Start

npm install
npx playwright install chromium
npm run demo          # or npm run demo "wireless earbuds"

About

Playwright-based e-commerce scraper for e-commerce website extensible framework for tracking prices, best sellers, and category leaders online.

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors