E-commerce product scraper that extracts structured data (price, images, specs, etc.) from product pages. Uses multiple parsing strategies with automatic fallback.
git clone https://github.com/yourusername/ListaYours.git
cd ListaYours
docker compose up --buildOpen http://localhost:3000 (frontend) and http://localhost:8000 (API)
Backend:
cd api
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
playwright install chromium
uvicorn app.main:app --reloadFrontend:
cd frontend
npm install
npm run devapi/ # FastAPI backend
├── app/main.py # Entry point
├── models.py # Pydantic schemas
└── scraper/
├── engine.py # Orchestration
├── parser.py # Data extraction
└── parsers/
├── amazon.py # Amazon-specific
└── default.py # Generic parsing
frontend/ # Next.js frontend
├── src/app/
│ ├── layout.tsx
│ └── page.tsx
└── package.json
- Frontend sends URL + strategy (HTTPX or Playwright)
- Backend tries HTTPX first (fast), falls back to Playwright if needed
- Extraction pipeline runs: JSON-LD → microdata → OpenGraph → heuristics
- Returns structured JSON with product data
POST /api/scrape
{
"url": "https://example.com/product",
"strategy": "HTTPX" // or "PLAYWRIGHT"
"debug": false
}Returns:
{
"success": true,
"strategy_used": "HTTPX",
"data": {
"title": "...",
"price": 29.99,
"currency": "USD",
"images": ["..."],
"description": "...",
// ... more fields
}
}Docs at /docs and /redoc
Frontend needs NEXT_PUBLIC_API_URL (default: http://localhost:8000)
cp .env.example .env- Playwright missing:
playwright install chromium - venv issues:
source .venv/bin/activate(Linux/Mac) or.venv\Scripts\activate(Windows) - API 404: Make sure backend running on 8000
- Docker issues:
docker compose down -v && docker compose up --build