Product sync parsers

Parser example: multiple XML feeds

A complete parser that joins several XML feeds by SKU into one catalog.

A complete product sync parser for a source split across several static XML feeds. A main product feed is joined by SKU with two side feeds: review ratings and localized Greek product URLs. The side feeds are loaded once into lookup tables, and the main feed is streamed with ET.iterparse and joined product by product. Optional attributes come from a list of (label, key) pairs. Copy the parser and adapt the joins and field mapping to your feeds.

For a single feed file, see Parser example: static XML feed. For an API that returns one page at a time, see Parser example: paginated JSON API.

Source shape: static-xml-multiple-feeds

Fetching through the proxy. The _download helper tries a direct request first and falls back to fetch_via_proxy(), a built-in function that sends the request through Octocom's HTTP proxy from a stable, dedicated IP address. The fallback matters when the origin blocks direct requests. Typical symptoms are HTTPError 403, HTTPError 429 or unexplained urlopen timeouts. Signature:

fetch_via_proxy(url, *, headers=None, timeout=60, method='GET', data=None) -> bytes