How omkarcloud/alibaba-scraper works
Alibaba Scraper exposes a local JSON API for product, supplier, discovery, and image-search data. The main workflow is an HTTP request routed through endpoint schemas to a domain operation, which resolves references as needed, fetches Alibaba data, and normalizes it into stable response objects. Search, product, supplier, and discovery are distinct domain stages; browser-backed fetching and browser lifecycle management form an internal transport layer. The source excerpts do not show every endpoint implementation or every runtime call, so unsampled links are omitted.
Main entry points: routes.py Endpoint routes · fetch.py Alibaba transport · product.py Product details and reviews · search.py Product and image search
Components 16
API routing
- Endpoint routes
routes.py - Request schemas
alibaba/schemas.py
Alibaba data domains
- Product details and reviews
alibaba/product.py - Product and image search
alibaba/search.py - Supplier operations
alibaba/supplier.py - Discovery endpoints
alibaba/discovery.py
Fetch and browsers
- Alibaba transport
alibaba/fetch.py - Browser box client
browser_client.py - In-process browser worker
browser_worker/inprocess.py - Browser lifecycle manager
browser_worker/lifecycle.py - Worker settings
browser_worker/settings.py - Proxy and egress
egress.py
Shared response plumbing
- Route response glue
route_glue.py - Input reference resolution
alibaba/refs.py - Payload normalization
alibaba/parsers.py
Other components
- API caller
Connections 23
- API caller → Endpoint routes: requests
README.md - Endpoint routes → Request schemas: validates with
routes.py - Endpoint routes → Product details and reviews: routes to
routes.py - Endpoint routes → Product and image search: routes to
routes.py - Endpoint routes → Supplier operations: routes to
routes.py - Endpoint routes → Discovery endpoints: routes to
routes.py - Endpoint routes → Route response glue: registers through
routes.py - Product details and reviews → Alibaba transport: fetches pages
alibaba/product.py - Product details and reviews → Payload normalization: normalizes with
alibaba/product.py - Product details and reviews → Input reference resolution: resolves inputs
alibaba/product.py - Product and image search → Alibaba transport: fetches search data
alibaba/search.py - Product and image search → Payload normalization: normalizes with
alibaba/search.py - Product and image search → Input reference resolution: resolves inputs
alibaba/search.py - Supplier operations → Alibaba transport: fetches store data
alibaba/supplier.py - Supplier operations → Payload normalization: normalizes with
alibaba/supplier.py - Supplier operations → Input reference resolution: resolves inputs
alibaba/supplier.py - Discovery endpoints → Alibaba transport: fetches data
alibaba/discovery.py - Discovery endpoints → Payload normalization: normalizes with
alibaba/discovery.py - Alibaba transport → Browser box client: uses for gated pages
alibaba/fetch.py - Alibaba transport → Proxy and egress: uses sessions
alibaba/fetch.py - Browser box client → In-process browser worker: dispatches locally
browser_client.py - In-process browser worker → Browser lifecycle manager: manages leases
browser_worker/inprocess.py - Browser lifecycle manager → Worker settings: reads policy
browser_worker/lifecycle.py