How ndgigliotti/shopify-spy works
Shopify Spy is a Python library and CLI for collecting product and collection data from ecommerce stores. A user supplies store URLs and scrape options; the API hands the run to its runner, which detects or uses a platform adapter, fetches store data, and yields items with per-store results and failure diagnostics. Users can write results in several formats, including a unified tabular schema. The README documents platform coverage, images, collections, and network politeness; sampled source and the source index support the main call relationships, but not every adapter’s internals.
Main entry points: _runner.py Run orchestration · _session.py Store request session · _export.py File exporters · _api.py Scrape API
Components 24
Entry and orchestration
- Scrape API
shopify_spy/_api.py - Command line
shopify_spy/cli.py - Run orchestration
shopify_spy/_runner.py - Platform detection
shopify_spy/_detect.py
Store adapters
- Shopify adapter
shopify_spy/_shopify.py - WooCommerce adapter
shopify_spy/_woocommerce.py - Magento adapter
shopify_spy/_magento.py - BigCommerce adapter
shopify_spy/_bigcommerce.py - Squarespace adapter
shopify_spy/_squarespace.py - Generic adapter
shopify_spy/_generic.py - Sitemap discovery
shopify_spy/_sitemap.py - JSON-LD parsing
shopify_spy/_jsonld.py - Microdata parsing
shopify_spy/_microdata.py
Request handling
- Store request session
shopify_spy/_session.py - Politeness and retries
shopify_spy/_policy.py - HTTP transport
shopify_spy/_fetch.py
Results and output
- Run results
shopify_spy/_results.py - Product summaries
shopify_spy/_summary.py - Unified row schema
shopify_spy/_flatten.py - File exporters
shopify_spy/_export.py - Excel writer
shopify_spy/_xlsx.py
Other components
- CLI or library user
- Ecommerce stores
- JSON, CSV, XLSX, XML
Connections 33
- CLI or library user → Command line: runs command
README.md - CLI or library user → Scrape API: calls library
README.md - Command line → Scrape API: invokes scrape
shopify_spy/cli.py - Scrape API → Run orchestration: starts run
shopify_spy/_api.py - Run orchestration → Platform detection: detects platform
shopify_spy/_runner.py - Run orchestration → Shopify adapter: dispatches
shopify_spy/_runner.py - Run orchestration → WooCommerce adapter: dispatches
shopify_spy/_runner.py - Run orchestration → Magento adapter: dispatches
shopify_spy/_runner.py - Run orchestration → BigCommerce adapter: dispatches
shopify_spy/_runner.py - Run orchestration → Squarespace adapter: dispatches
shopify_spy/_runner.py - Run orchestration → Generic adapter: dispatches
shopify_spy/_runner.py - Run orchestration → Store request session: creates sessions
shopify_spy/_runner.py - Run orchestration → Run results: records status
shopify_spy/_runner.py - Platform detection → Ecommerce stores: probes store
shopify_spy/_detect.py - Shopify adapter → Store request session: requests data
shopify_spy/_shopify.py - WooCommerce adapter → Store request session: requests data
shopify_spy/_woocommerce.py - Magento adapter → Store request session: requests data
shopify_spy/_magento.py - BigCommerce adapter → Store request session: requests data
shopify_spy/_bigcommerce.py - Squarespace adapter → Store request session: requests data
shopify_spy/_squarespace.py - Generic adapter → Sitemap discovery: discovers pages
shopify_spy/_generic.py - Generic adapter → JSON-LD parsing: parses products
shopify_spy/_generic.py - JSON-LD parsing → Microdata parsing: parses markup
shopify_spy/_jsonld.py - Store request session → Politeness and retries: applies policies
shopify_spy/_session.py - Store request session → HTTP transport: sends requests
shopify_spy/_session.py - Store request session → Ecommerce stores: fetches pages
README.md - Run orchestration → Run results: yields items
README.md - Command line → File exporters: writes items
shopify_spy/cli.py - Scrape API → File exporters: exposes writer
shopify_spy/__init__.py - File exporters → Unified row schema: flattens rows
shopify_spy/_export.py - File exporters → Excel writer: writes workbook
shopify_spy/_export.py - Unified row schema → Product summaries: summarizes fields
shopify_spy/_flatten.py - Run results → JSON, CSV, XLSX, XML: writes formats
README.md - File exporters → JSON, CSV, XLSX, XML: exports files
README.md