You want a table like this by 8 a.m. every day: SKU, your competitor's price, in stock or not, the date. Ten competitors, a few thousand rows. That's the whole project. The interesting part isn't writing the parser — it's choosing between two ways to build it, because that choice decides how many evenings you'll spend fixing it later.
Below is the decision, then a concrete build of one daily run, then the checks and the honest bill.
Two ways to get the same table, and how to pick between them
There are exactly two approaches, and they differ in who owns the breakage.
Your own Python parser. You write requests + a parser (BeautifulSoup for static HTML, Playwright for JavaScript-rendered pages), run it on a schedule, and fix it when a site changes its markup or starts returning a captcha. Fine for 1–3 sites with unusual logic — a price hidden behind a login, a stock flag encoded in a CSS class, a category tree you have to walk page by page.
A managed scraping service or API proxy. You send a URL, it returns HTML or JSON. The provider rotates IPs, solves or avoids captchas, retries, and often renders JavaScript for you. You pay per request or per month. This is the right answer when there are many sites and resilience to blocking matters more than control.
- Best for 1–3 sites
- Full control over non-standard logic
- You fix every block and markup change
- Cheap in money, costly in evenings
- Best for many sites
- Blocking and captchas are handled for you
- One interface across sites
- Costs per request or per month
A common mistake: people start with the DIY parser because it's free, then add ten competitors, and the hobby project turns into a part-time job chasing 403s. The opposite mistake is paying a service for three pages a day that never change.
| Situation | Own parser | Managed service |
|---|---|---|
| 1–3 sites, stable markup | Better — cheap, full control | Overkill |
| 10+ sites, different engines | Painful to maintain | Better — one interface for all |
| Non-standard logic (login, multi-step) | Better | Often can't do it |
| Sites actively fighting bots | You lose | That's what you're paying for |
| Budget near zero, time plentiful | Better | Costs money |
The scope of your project follows this line. If you're building the DIY version, it's one script and a cron job. If you're going with a service, it's a script that talks to an API plus a scheduler. Either way it's not a product with roles and dashboards — resist that temptation on day one.
What you actually get at the end, and how you know it works
The deliverable is one table with a fixed shape:
| sku | competitor | price | currency | in_stock | scraped_at | status |
|---|---|---|---|---|---|---|
| A-1042 | shop-one | 29.90 | EUR | yes | 2026-11-28 | ok |
| A-1042 | shop-two | 31.00 | EUR | yes | 2026-11-28 | ok |
| A-1043 | shop-one | — | — | unknown | 2026-11-28 | parse_failed |
The status column is the part most people skip and then regret. Without it, a failed parse looks like "no data" and you can't tell a competitor who removed a product from a parser that broke. With it, every row tells you whether to trust the price.
You know it works when: the row count matches the number of SKUs × competitors you expect (minus genuinely missing products), every price is a number you'd recognise on the site, and the run finishes before your morning coffee. You check this by hand for the first three days — open three random rows on the competitor's site and compare.
The build, step by step, with an owner for each step
I'll describe the DIY path in detail because the service path is a subset of it: steps 1, 2, 4, 5 and 6 are identical; only step 3 changes.
Step 1 — Map the pages (human does this, AI assists)
Pick one product on each competitor's site. Write down the URL pattern: is it /product/slug or /p/12345? Does the price load with the page or after JavaScript runs? Open the page, view source (Ctrl+U), search for the price. If it's in the source — static HTML, BeautifulSoup is enough. If it's not — the page renders price client-side, and you need Playwright or the service's JS-rendering option.
Check: the price string appears in the raw HTML you saved. No price in raw HTML means you decided the wrong tool. More on the topic: “From Raw HTML to a Clean DataFrame: 14 LLM Prompts That Turn a Text Model Into a Data Extraction Engineer”.
Step 2 — Build the input list (AI does it, human checks)
The AI writes a CSV of sku, competitor, url. You check that every URL actually resolves to a product page and not a category or a 404. This sounds trivial and is the source of most silent failures: a slug change turns into a row of empty prices that looks like "out of stock".
Step 3 — Write the fetcher (AI writes, human decides the strategy)
For the DIY path, a minimal fetcher looks like this:
import requests, time, random
HEADERS = {"User-Agent": "Mozilla/5.0 (compatible; PriceCheck/1.0)"}
def fetch(url, session):
r = session.get(url, headers=HEADERS, timeout=20)
if r.status_code == 429 or r.status_code == 403:
raise BlockedError(r.status_code)
r.raise_for_status()
return r.text
Two things that matter and that people skip:
- Pace yourself. One request every 1–3 seconds with jitter, not a burst of 500. A burst is the fastest way to get your IP rate-limited.
- Read
robots.txtand the terms of the site. Public pages are readable, but a site can forbid automated access in its terms. That's a decision for you, not the AI — if it's off-limits, use an official API or a licensed data provider instead.
For the service path, step 3 becomes: read the provider's docs, find the endpoint and the parameters for JS rendering and geo-targeting, and check the rate limit on your plan. Don't guess parameter names — they differ between providers and change.
Step 4 — Parse price and stock (AI writes, human verifies against the live page)
Extraction is where AI is genuinely useful: hand it a saved HTML file and the price you see on screen, ask for a selector. Then you open the page, check the selector matches, and check a second product on the same site. A selector tuned to one product often breaks on the next.
For stock, the signal is rarely a clean field. It's "Add to cart" present or absent, a class like out-of-stock, or text "Sold out". Pick the most stable one and write it down so the next person (or the next AI session) knows why.
Step 5 — Normalise and write to the table (AI writes, human defines the rules)
Currency, decimal separator (comma vs dot), and thousand separators differ per site. 29,90 must become 29.90. 1.299,00 must become 1299.00. Decide once: store the number as a float plus a currency code, and never compare prices across currencies without converting at a known rate.
Write each run as rows with scraped_at and status, append to a CSV or a database table, and keep history. You'll want yesterday's price tomorrow.
Step 6 — Schedule the daily run (human)
A cron entry or a scheduled task on a small server. One run per day, at an hour when the competitor's site is quiet (early morning usually). Log the run: how many URLs, how many ok, how many parse_failed, how many blocked. That log is your health check — you'll read it far more than the table itself.
What access and data you need, and where it stops
- Network access to the competitor sites. No key needed for public pages, but check whether your server's IP range is blocked by a CDN. A cheap VPS in a datacenter sometimes gets 403 where your home connection works.
- A scraping service account, if you go that route. Sign up, get an API key from the dashboard, read the plan's request limit and concurrency limit. Pricing is per request or per month — check the current numbers on the provider's page, they change.
- A place to run and store. A small VPS or a scheduled function, plus a file or a database. Nothing fancy.
- Where access is impossible: pages behind a login, pages that require solving a captcha interactively, and sites whose terms forbid automated access. For the first two, a service won't help either — you need an official API or a data partnership. For the third, the answer is no.
Where it breaks, and what to do about each
Blocking after the first successful run. The first day works, the second returns 403 or a captcha page. This is the single most common failure. What to do: detect it explicitly (status code or a captcha marker in the HTML) and mark the row blocked, don't silently store an empty price. Then slow down, rotate the user agent, and if it keeps happening on many sites — that's the signal to move to a service.
Silent markup change. The site redesigns, your selector returns None, and you write empty prices for a week before noticing. What to do: the status column, plus a sanity check — if more than, say, a fifth of rows in a run are parse_failed, alert yourself. A sudden drop in ok count is a broken parser, not a competitor going out of business.
Duplicates and gaps from partial runs. A run dies halfway, you restart it, and now you have two rows for the same SKU on the same day. What to do: make the write idempotent — key on (sku, competitor, date) and overwrite, or write to a run-specific table and merge at the end. Don't rely on "it won't crash".
How to verify it by hand before you trust it
Run these yourself; don't ask the AI to confirm its own work.
- Spot-check three rows. Open the competitor page for one
okrow and compare the price character by character. Success sign: exact match. - Break it on purpose. Change one URL in the input list to a 404. Success sign: that row comes back
parse_failed, notokwith an empty price. - Simulate a block. Point the fetcher at a URL that returns 403 (or stub the response). Success sign: the row is
blockedand the run continues to the next URL instead of crashing. - Run twice. Execute the job twice in a row. Success sign: still one row per SKU per day, no duplicates.
- Check the clock. Look at the log timestamp. Success sign: the run finished in a few minutes, not hours — if it's slow, you're probably waiting on timeouts that should be shorter.
If all five pass, the table is trustworthy enough to act on.
The honest bill: time and money
Time, order of magnitude, for a first working version:
- DIY, 1–3 sites: about a day to get the first site to
ok, and a few hours per additional site. Then ongoing — expect to touch it whenever a site changes. Budget a couple of hours a month per site for maintenance, more if the site fights bots. - Service, 10+ sites: about a day to wire the API and one parser per site (the fetch part is solved for you), then much less maintenance, because blocking is the provider's problem.
Money:
- DIY: a small VPS (a few dollars a month) plus your time. Your time is the real cost — a day of your evening is worth more than a year of VPS.
- Service: per-request or monthly pricing. Multiply your daily URL count by 30 to get the monthly request volume, then check the provider's current plan against that number. For a few thousand URLs a month it's usually a small line item; for tens of thousands it isn't.
The crossover: when maintaining the DIY parser costs you more evenings than the service costs in money, switch. Most people hit that around the fourth or fifth actively-hostile site.
If the build is longer than you want to own — many sites, non-standard logic, a deadline — asibiont.com takes such projects on turnkey: the developer names the price, you pay by topping up the balance. More on how that works at https://asibiont.com/en/subscription-tiers.
The one decision to make before you write code
Count your sites and ask how often each one changes. One to three stable sites: write the parser, it'll take an evening and you'll understand every line. More than that, or sites that actively block: don't build a bot-fighting hobby, buy the fetch and spend your time on parsing and the table. The table is the product; the fetching is plumbing. Get the plumbing cheap and keep your attention on whether the numbers in the table are true.
If you would rather not build it yourself: we take such a project on — you describe the task, we build it and bring it to a working result, and the developer names the price. The payment goes through a balance top-up on the payment page.