# simple-python-scrapy-scrapers/ebay-scrapy-scraper architecture

> Architecture diagram of the GitHub repository simple-python-scrapy-scrapers/ebay-scrapy-scraper, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/simple-python-scrapy-scrapers/ebay-scrapy-scraper
- Repository: https://github.com/simple-python-scrapy-scrapers/ebay-scrapy-scraper

## Overview

This is a Scrapy-based eBay data extraction project. Users launch either a search crawl—with query, site, and filters—or a product-detail crawl—with URLs or item IDs. Each spider requests and parses its respective eBay pages into typed items; configured middleware supports request handling, and item pipelines validate, clean, and enrich data before Scrapy feed exports. The README also describes proxy-based anti-bot support and multi-region scraping. Source excerpts do not show the full request-generation or export runtime wiring, so those links rely on README or settings evidence.

Main entry points: [`ebay_scraper/settings.py`](https://github.com/simple-python-scrapy-scrapers/ebay-scrapy-scraper/blob/main/ebay_scraper/settings.py) (Crawler configuration), [`ebay_scraper/spiders/ebay_search.py`](https://github.com/simple-python-scrapy-scrapers/ebay-scrapy-scraper/blob/main/ebay_scraper/spiders/ebay_search.py) (Search spider), [`ebay_scraper/spiders/ebay_product.py`](https://github.com/simple-python-scrapy-scrapers/ebay-scrapy-scraper/blob/main/ebay_scraper/spiders/ebay_product.py) (Product spider), [`ebay_scraper/items.py`](https://github.com/simple-python-scrapy-scrapers/ebay-scrapy-scraper/blob/main/ebay_scraper/items.py) (Scraped item models)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_crawl["Crawling"]
  node_search["Search spider<br/>[ebay_search.py]"]
  node_product["Product spider<br/>[ebay_product.py]"]
end

subgraph group_defense["Request defenses"]
  node_middleware["Request middleware<br/>[middlewares.py]"]
end

subgraph group_data["Data processing"]
  node_items["Scraped item models<br/>[items.py]"]
  node_pipelines["Validation and enrichment<br/>[pipelines.py]"]
end

subgraph group_config["Configuration and output"]
  node_settings["Crawler configuration<br/>[settings.py]"]
  node_feeds[("CSV and JSON feeds<br/>[settings.py]")]
end

node_user(("Scraper user"))
node_marketplace["eBay marketplace"]
node_proxy["ScrapeOps proxy"]

node_user -->|"starts search"| node_search
node_user -->|"starts detail crawl"| node_product
node_search -->|"requests listings"| node_marketplace
node_product -->|"requests details"| node_marketplace
node_search -->|"creates items"| node_items
node_product -->|"creates items"| node_items
node_settings -->|"configures"| node_middleware
node_middleware -.->|"uses proxy"| node_proxy
node_settings -->|"enables proxy"| node_proxy
node_items -.->|"passes items"| node_pipelines
node_settings -->|"configures"| node_pipelines
node_pipelines -.->|"exports processed data"| node_feeds
node_settings -->|"defines feeds"| node_feeds

click node_search "https://github.com/simple-python-scrapy-scrapers/ebay-scrapy-scraper/blob/main/ebay_scraper/spiders/ebay_search.py"
click node_product "https://github.com/simple-python-scrapy-scrapers/ebay-scrapy-scraper/blob/main/ebay_scraper/spiders/ebay_product.py"
click node_middleware "https://github.com/simple-python-scrapy-scrapers/ebay-scrapy-scraper/blob/main/ebay_scraper/middlewares.py"
click node_items "https://github.com/simple-python-scrapy-scrapers/ebay-scrapy-scraper/blob/main/ebay_scraper/items.py"
click node_pipelines "https://github.com/simple-python-scrapy-scrapers/ebay-scrapy-scraper/blob/main/ebay_scraper/pipelines.py"
click node_settings "https://github.com/simple-python-scrapy-scrapers/ebay-scrapy-scraper/blob/main/ebay_scraper/settings.py"
click node_feeds "https://github.com/simple-python-scrapy-scrapers/ebay-scrapy-scraper/blob/main/ebay_scraper/settings.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_search,node_product,node_user toneBlue
class node_middleware toneAmber
class node_items,node_pipelines toneMint
class node_settings,node_feeds toneRose
class node_marketplace,node_proxy toneIndigo
```

## Components

### Crawling

- [Search spider](https://github.com/simple-python-scrapy-scrapers/ebay-scrapy-scraper/blob/main/ebay_scraper/spiders/ebay_search.py): `ebay_scraper/spiders/ebay_search.py`
- [Product spider](https://github.com/simple-python-scrapy-scrapers/ebay-scrapy-scraper/blob/main/ebay_scraper/spiders/ebay_product.py): `ebay_scraper/spiders/ebay_product.py`

### Request defenses

- [Request middleware](https://github.com/simple-python-scrapy-scrapers/ebay-scrapy-scraper/blob/main/ebay_scraper/middlewares.py): `ebay_scraper/middlewares.py`

### Data processing

- [Scraped item models](https://github.com/simple-python-scrapy-scrapers/ebay-scrapy-scraper/blob/main/ebay_scraper/items.py): `ebay_scraper/items.py`
- [Validation and enrichment](https://github.com/simple-python-scrapy-scrapers/ebay-scrapy-scraper/blob/main/ebay_scraper/pipelines.py): `ebay_scraper/pipelines.py`

### Configuration and output

- [Crawler configuration](https://github.com/simple-python-scrapy-scrapers/ebay-scrapy-scraper/blob/main/ebay_scraper/settings.py): `ebay_scraper/settings.py`
- [CSV and JSON feeds](https://github.com/simple-python-scrapy-scrapers/ebay-scrapy-scraper/blob/main/ebay_scraper/settings.py): `ebay_scraper/settings.py`

### Other components

- **Scraper user**
- **eBay marketplace**
- **ScrapeOps proxy**

## Connections

- Scraper user → Search spider: starts search (evidence: `README.md`)
- Scraper user → Product spider: starts detail crawl (evidence: `README.md`)
- Search spider → eBay marketplace: requests listings (evidence: `README.md`)
- Product spider → eBay marketplace: requests details (evidence: `README.md`)
- Search spider → Scraped item models: creates items (evidence: `ebay_scraper/spiders/ebay_search.py`)
- Product spider → Scraped item models: creates items (evidence: `ebay_scraper/spiders/ebay_product.py`)
- Crawler configuration → Request middleware: configures (evidence: `ebay_scraper/settings.py`)
- Request middleware → ScrapeOps proxy: uses proxy (evidence: `README.md`)
- Crawler configuration → ScrapeOps proxy: enables proxy (evidence: `README.md`)
- Scraped item models → Validation and enrichment: passes items
- Crawler configuration → Validation and enrichment: configures (evidence: `ebay_scraper/settings.py`)
- Validation and enrichment → CSV and JSON feeds: exports processed data (evidence: `README.md`)
- Crawler configuration → CSV and JSON feeds: defines feeds (evidence: `ebay_scraper/settings.py`)
