E-commerce data pipeline · 2025

Daily competitor price scraper with isolated parsers

ShippedIndependent engineer

Competitor prices lived in a morning ritual. Open several stores, copy figures, paste a sheet. A layout change on one site broke the day. There was no retry, no isolation per store, and no record of what failed.

The constraint

Multiple storefronts, different pagination, rate limits that are not documented. One broken parser must not take down the rest of the run.

Built with

  • Python
  • BeautifulSoup
  • Selenium

How it works

A scheduler starts the job. Each storefront is fetched and parsed on its own. Records are normalized into one table. A failed source is retried or logged, not allowed to abort the others.

Architectural calls and their cost

Every design choice, the operational pressure behind it, what it bought, and the ongoing maintenance cost.

  1. One job, many sources

    One storefront changing its markup used to break the whole morning. The failure had to be confined to the source that changed.

    The scheduler runs each storefront parser in isolation and logs failures per store, so every working storefront still populates the morning table when one competitor redesigns its site overnight.

    The cost: Each source carries its own parser and its own failure path, so a new storefront is real work.

  2. BeautifulSoup where the HTML is stable, Selenium where it is not

    Driving a browser for every page is slow and fragile, but some storefronts only render their prices in JavaScript.

    Static storefronts parse through BeautifulSoup over plain HTTP while JavaScript storefronts run in Selenium, keeping memory use low across most of the run without missing client-rendered prices.

    The cost: Two scraping stacks to maintain, and the Selenium workers consume more CPU and memory per run.

  3. Normalize, then write

    Three storefronts describe the same product differently, and a table assembled from raw scrapes is not comparable across sources.

    Each parser maps currencies, stock flags, and units into one schema before writing the table, and archives raw HTML on disk for offline parser debugging.

    The cost: A normalization step per source, and raw markup kept alongside in case a replay is needed.

Checking competitor prices manually every morning wastes analyst hours and breaks the moment a store changes its page layout. Worse, a monolithic scraper that stops on the first unhandled exception leaves the team with no data at all for that day.

This pipeline runs on a daily morning schedule and treats each competitor storefront as an isolated job. Storefronts that serve prices in server-rendered HTML are fetched and parsed with BeautifulSoup to keep runtime and memory low. Storefronts that hydrate prices in the browser run inside isolated Selenium workers. Every parser converts local price strings, stock badges, and product variants into a single normalized schema before writing to the morning output table.

When a storefront changes its DOM structure or hits an undocumented rate limit, that single source fails into an error log alongside a snapshot of the raw HTML. The remaining storefronts still finish and populate the morning table. Using the saved HTML snapshot, an engineer can update the broken selector and replay that single store without re-scraping the rest.

Current status and proof

Shipped. Competitor prices arrive as a clean table each morning, with each store isolated and failures logged.

  • A daily job collects competitor prices from multiple storefronts into one table.
  • Each storefront is fetched and parsed independently, so a selector change fails one source and the rest of the run continues.
  • A failed source is logged with its raw markup kept for a replay.
  • Shipped. The table is in the client's hands each morning.

What was handed over

  1. How the job is scheduled
  2. Storefront parser guide showing how to update a broken CSS selector from saved HTML
  3. The output table and who opens it
Next project Sales data analysis A sales review the client still opens