Every scraper ships with a dependency you cannot pin: the target site's next deployment. A frontend team renames a class, the selector stops matching, and the product data is still right there in the HTML. The code has not changed. Its assumptions have.
Recovery has two deadlines. The current extraction needs a usable record now. The parser needs a repair that holds across representative pages. A language model can help with both, provided its replacement data and its proposed selectors go through separate acceptance checks.
This post follows the companion repository: a Python product scraper that extracts through four tiers, measures field-level coverage to detect selector drift, proposes CSS repairs for review, and replays captured pages without a network. The Crawling API supplies HTML, named-scraper JSON and Markdown; Cloud Storage keeps the captures. The repository holds eight executable walkthroughs, a complete package, and captured fixtures from five Amazon, five Walmart and five Allbirds product pages. A separate synthetic page with renamed classes exercises detection, fallback and repair validation.
- A tier wins only when its product clears a fill rate of 0.75, six of eight tracked fields. Receiving JSON is not the same as winning the chain.
- Drift is one field's coverage dropping more than 30 points on the watched tier while the LLM tier moves no more than 10. A price that changes value does not register; a price that disappears does.
- The model repairs nothing on its own. Fallback extraction returns a record for this attempt. A selector proposal becomes a unified diff that a person merges after it matches every supplied snapshot.
The loop is conceptual. The package exposes each stage as a function, and a production job has to connect acquisition, observation sampling, detection and proposal review explicitly. The rest of this post walks the stages in order, quoting the repository as it is.
Define the product contract before choosing an extractor
Each tier must return data in the same shape before the chain can compare usefulness. The schema walkthrough uses Pydantic to define eight tracked fields and a presence-based fill rate:
class ProductSchema(BaseModel): model_config = ConfigDict(extra="ignore") title: str price: str | None = None currency: str | None = None availability: str | None = None rating: float | None = None review_count: int | None = None brand: str | None = None sku: str | None = None def is_filled(value: object) -> bool: if value is None: return False if isinstance(value, str): return bool(value.strip()) return True def fill_rate(product: ProductSchema, fields: tuple[str, ...] = TRACKED_FIELDS) -> float: filled = sum(1 for name in fields if is_filled(getattr(product, name))) if not fields: return 0.0 return filled / len(fields)
title is the only required field. The other seven default to None. is_filled() counts None, empty strings and whitespace-only strings as missing, and numeric zero as present. An extractor that returns eight keys with blank values earns no coverage for them.
The site configurations accept an extraction at a fill rate of at least 0.75, six of the eight tracked fields. This is a completeness policy, not a correctness check. Price is not independently required by the chain: the saved Amazon case payload clears 0.75 with neither price nor currency. The selector-repair validator described later is stricter and insists on title and price.
The package mapper converts each representation into the schema. It accepts Amazon's name, customerReview, customerReviewCount and parentAsin, and Walmart's title, itemId, ratings and reviewsCount. A boolean inStock becomes an availability string. Numeric helpers turn star text into a float and strip separators from review counts.
Prices stay strings. A currency may come from an explicit field or be inferred from $, £ or €; this is not a currency or locale normalizer. The conversions make outputs comparable enough for the shared coverage calculation without claiming that a populated field has been semantically verified.
Acquire HTML, scraper JSON and Markdown as separate representations
The Crawling API can return a page as HTML, as a named scraper's JSON, or as Markdown. Those representations serve different consumers: CSS needs a DOM, the built-in tier needs product JSON, and the LLM extractor needs readable product text. The application requests each one on purpose rather than deriving one from another.
| Representation | Request parameters | Consumer in the chain |
|---|---|---|
| HTML | default body, store=true for fixtures |
CSS tier, selector validation, fixture mirror |
| Named-scraper JSON |
scraper=amazon-product-details or scraper=walmart-product-details
|
Built-in tier |
| Generic JSON | scraper=generic-extractor |
Generic tier |
| Markdown |
format=md and md_readability=true
|
LLM tier |
The site configuration selects amazon-product-details for Amazon and walmart-product-details for Walmart, both from the scraper library. Allbirds has no named scraper configured in this project, so its acquisition path requests HTML and scraper=generic-extractor.
autoparse=true asks Crawlbase to choose a matching parser. The live tests exercise it separately; the package's product-acquisition helper requests the configured scraper by name instead. The first extraction tier simply consumes whichever scraper payload the caller places in the shared page object.
Store the representation you intend to replay
The November 16, 2026 storage verification combined store=true with scraper=amazon-product-details. Reading the resulting capture back returned scraper JSON beginning {"name":"Apple iPhone 15 Pro Silicone Case..., with cb_status=200 and original_status=200.
That capture cannot substitute for an HTML selector fixture. Fetching the same URL with store=true and no scraper produces the HTML the CSS replay needs, so the application keeps the HTML acquisition separate from its named-scraper request.
In those live calls the documented rid response header was not populated, so the request identifier came from the rid query parameter on storage_url, the pointer to the stored copy that the API returns for store=true. The storage walkthrough reads that URL first, accepts a direct header when one is present, then falls back to a JSON body:
rid = _rid_from_storage_url(headers.get("storage_url")) if rid is None and headers.get("rid") not in (None, "", "None"): direct = headers.get("rid") rid = direct if isinstance(direct, str) else None if rid is None: rid = _rid_from_body(payload)
Keep the RID for retrieval and fixture identification. Treat storage_url as a secret when logging. It is a ready-to-use retrieval URL whose query string carries the token.
Retry acquisition without confusing it with selector repair
The crawl client starts with the Normal token. When a JavaScript token is configured, it retries once with that token if cb_status is 503 or the reported final URL contains checkpoint or captcha. It does not infer a block from an empty product record, and it does not treat the documented 207 empty-body status as a block.
During fixture acquisition, some Amazon fetches returned a checkpoint page with cb_status=200, original_status=302 and no storage_url. Reading the final URL lets the client recognise that acquisition problem even when the Crawlbase status is 200. Selector repair is a later decision, taken once the application has enough evidence to compare extraction coverage.
The shared page object carries HTML, Markdown, scraper JSON, generic JSON and acquisition metadata. The extractors consume the representations they are handed. The chain never fetches a new one when it advances to the next tier.
Build the extraction chain around explicit acceptance
The extraction order is maintained scraper, site-specific CSS, generic extraction, then an optional LLM tier. The chain keeps the first acceptable result rather than merging fields from several incomplete attempts.
The chain walkthrough makes the stopping rule explicit:
def run(self, page: str) -> ChainOutcome: attempts: list[Attempt] = [] winner: Attempt | None = None for extractor in self.extractors: attempt = self._safe(extractor, page) attempts.append(attempt) if winner is None and self._accepts(attempt): winner = attempt break return ChainOutcome(winner=winner, attempts=attempts)
_safe() turns an extractor exception into a failed attempt so the next tier can run. A product below the threshold stays in attempts without becoming the winner. If every tier fails or stays below the bar, the outcome has no winner.
The package chain also provides observe(). It selects the same first acceptable result but keeps running the later tiers. That matters for drift monitoring: run() can stop before the watched CSS tier or the confirming LLM tier has produced a sample. Use observation runs when collecting the independent measurements the detector needs.
Extract product fields with the existing CSS selectors
On a minimal Allbirds-shaped sample page in the CSS walkthrough, and on each of the five mirrored Allbirds captures, the configured selectors fill six fields:
{ "title": "h1.font-serif", "price": "span.text-red", "currency": "meta[property='og:price:currency']", "availability": "[data-testid='pdp-atc-button']", "brand": "meta[property='og:site_name']", "sku": "[data-yotpo-product-id]" }
The CSS extractor uses the selectolax Lexbor parser. For each selector it takes the first match and reads its stripped text, then checks a content attribute and a selector-associated attribute when the text is empty. That covers Open Graph metadata and the Yotpo product identifier as well as visible text.
The title comes from the serif heading, the price from the red span, and availability from the add-to-cart button. Currency and brand use Open Graph metadata. The Yotpo attribute supplies the SKU. Rating and review count are absent, which leaves six of eight fields filled: exactly 0.75.
These are template-specific choices. The availability value is button text, and the SKU is the selected product's identifier. The mapper adds no inventory lookup and does not check that every site uses the same identifier semantics.
Treat generic extraction as another candidate
The generic-extractor documentation describes a site-independent payload with a title, headings and readable content. The application's generic adapter takes a title or heading and searches the supported text fields for a currency amount.
In the CSS and generic walkthrough, the synthetic generic payload fills title and price for 0.25 coverage. The package mapper can also infer a currency from the price symbol. The five captured Allbirds generic payloads, however, carry a content string rather than the main_content field that the documentation and the adapter use, so the current adapter extracts only their title: 0.125. Neither result reaches 0.75.
This is why receiving JSON is not enough to win the chain. The adapter must understand the returned shape, and the resulting product must pass the same acceptance rule as every other tier.
Add LLM extraction as the final fallback
The LLM path reads Markdown acquired with format=md and md_readability=true, as described in the Crawling API documentation. The model receives that text, not the CSS selector map.
The LLM walkthrough and the package client use the OpenAI Python SDK to call beta.chat.completions.parse at temperature 0. OPENAI_MODEL selects the model and defaults to gpt-4o-mini. The extraction input is capped at the first 30,000 characters.
The response schema uses string fields, and the prompt asks for empty strings where information is absent. to_product() strips text, maps empty optional values to None, parses rating and review count, and derives a currency where it can. The LLM tier rejects empty Markdown and empty titles and converts client errors into failed attempts. There is no application-level retry loop in that tier.
The chain still requires 0.75 coverage after normalization, so a successful structured-output parse can remain an unsuccessful extraction attempt. The reverse holds too: a schema-accepted, sufficiently populated record still needs trustworthy source content. Passing the format checks does not establish that its values describe the page.
Read the recorded token count against its input
The live model call in the walkthrough used the small bundled Allbirds Markdown sample and consumed 181 input tokens and 39 output tokens. The offline stand-in and the live model both returned a Tree Runner title and a price. That measurement belongs to this input and this call.
Acquiring usable Markdown from the live product page was a separate problem. During development, one Allbirds readability response contained only an 89-character shoe-size list and another attempt returned status 515. The saved HTML still exposed the title, price and product identifier to CSS, and several Markdown files in the fixture library likewise contain size-chart text.
Readability can remove exactly the product context the model needs. Built-in Scrapers vs LLM Schema Extraction examines extraction quality, token usage and routing across a larger product-page sample. Here the model stays an injected fallback and a confirming reader for drift measurements. The normal fixture replay never calls it.
Detect drift with field-level fill-rate baselines
The chain's fill rate measures one product across eight fields. The drift detector measures one field across many extraction attempts. Keeping those denominators apart lets the application ask whether CSS price coverage has fallen while the LLM still finds prices.
The statistics store writes a SQLite row for each field in each recorded tier result: site, URL, tier, timestamp, filled flag and acquisition statuses. Failed extractions can be recorded too; a tier that cannot construct a product contributes missing flags for all eight fields.
Only rows with both original_status=200 and cb_status=200 enter the averages. That filters out the recorded 503 and 302 checkpoint responses. A checkpoint page reported with both statuses at 200 would still enter them.
The site settings watch the built-in scraper's coverage for Amazon and Walmart and the CSS tier's coverage for Allbirds. The LLM tier provides the confirming measurement on every site. The repair process updates only the application's own CSS selectors; Crawlbase maintains the built-in parsers.
| Detector input or rule | Implemented behaviour |
|---|---|
| Baseline window | Samples after now - 7 days through now - 1 day, six days of history |
| Current window | Samples after now - 1 day through now
|
| Watched-tier sample requirement | At least three qualifying baseline samples and one current sample |
| Confirming-tier sample requirement | At least one qualifying baseline sample and one current sample |
| Watched-tier drop | More than 30 percentage points after rounding to whole points |
| Confirming-tier drop | No more than 10 percentage points after rounding; an increase is allowed |
The drift walkthrough implements the boundary as:
drop_points = round((baseline - current) * 100) confirm_drop = round((confirm_base - confirm_now) * 100) if drop_points <= DROP_POINTS or confirm_drop > CONFIRM_TOLERANCE_POINTS: return None
A drop from 100% to 70% is exactly 30 points and does not open an incident. Rounding the point difference makes that boundary explicit despite floating-point representations. If the confirming tier also drops beyond its tolerance, the detector returns no selector-drift incident; both paths losing coverage is a different problem.
The executable example seeds three healthy CSS samples, a current missing title, matching LLM samples that remain filled, and a 503 row that the status filter excludes. It reports CSS at 0% against a 100% baseline with the LLM still at 100%. The chart shows the divergence; the example's timestamps and seeded rows drive the calculation.
Understand which changes the detector can distinguish
A price changing from $98.00 to $100.00 leaves its filled flag unchanged. So does availability changing from "In stock" to "Out of stock". Legitimate value changes do not trigger this presence-based detector.
A selector that starts returning a different nonempty price is equally invisible. The detector measures coverage, not disagreement between extracted values. Its averages are grouped by site, tier and field rather than paired URL by URL, so a change in the sampled product mix can move them as well.
Treat an incident as evidence that one extraction path lost coverage while another kept it. record_outcome() stores the attempts the caller supplies, and detect_site() evaluates those samples. Collect the watched and confirming tiers' history with observation runs before evaluating drift; early-stopping runs may skip one or both tiers.
Propose selectors, validate them, and review the diff
An LLM extraction returns product values. A selector proposal returns instructions for a future deterministic extraction. They are separate calls with separate output models.
For proposal context, the package's clean_html() removes scripts, styles, noscript and SVG elements and limits the result to 20,000 characters. That prepared HTML goes to OpenAiClient.propose_selectors(), which receives the requested field names and the HTML, instructs the model to return CSS selectors, and caps its HTML input at 20,000 characters as well.
The repair walkthrough's prompt uses explicit names such as title_selector and price_selector. That naming answered an earlier proposal during development that returned Tree Runner and $98.00 as field values instead of selectors. Its adapter strips the _selector suffix before applying the proposal.
The package's SelectorProposalModel is a separate interface with ordinary field names such as title and price, a selector-specific prompt, and a notes field that its adapter discards. Both interfaces end as a dictionary keyed by product field. Use the matching model and adapter together.
Require matches across the supplied snapshots
The walkthrough validator requires title and price on every snapshot:
def validate_selectors( selectors: dict[str, str], snapshots: list[str], required: tuple[str, ...] = ("title", "price"), ) -> ValidationReport: if not snapshots: return ValidationReport(False, ["no snapshots"]) failures: list[str] = [] for index, html in enumerate(snapshots, start=1): found = _apply(html, selectors) for field in required: if not found.get(field, "").strip(): failures.append(f"snapshot {index} missed {field}") return ValidationReport(ok=not failures, failures=failures)
Its _apply() helper catches malformed selectors and treats them as missing matches. The package validator adds the extracted values to its report and supports an optional reference product. With a reference supplied it checks the last snapshot's title by default, after stripping whitespace and case-folding, and accepts a substring relationship in either direction. It does not require exact title equality or compare prices by default. On the package path, malformed CSS can raise SelectolaxError, which the caller must handle when validating an external proposal.
The validator accepts any nonempty snapshot list; it does not enforce five pages. The fixture library supplies five product pages per site for broader checks. The executed selector-proposal walkthrough uses two small synthetic snapshots of one template, with the title changed in the second, and its recorded live proposal passed the title-and-price checks on both.
To use the five-snapshot configuration the diagram shows, supply those HTML snapshots explicitly and place the page that corresponds to any reference product last. Having five files in the fixture library does not make the validator pick them.
Keep validation and activation separate
repair_site() compares the current selector map with the proposal and writes a unified diff under repair_out/, targeting selectors/<site>.json. It returns the validation boolean and the diff text without touching the selector source file.
The diff is written even when the validation report fails. Read the returned boolean and the printed failure summary before considering the diff for merge. A passing proposal becomes a reusable repair only after a person updates the selector file and later extraction reads that update. Until then, any successful fallback is recovery for one extraction attempt.
Turn captured pages into durable regression fixtures
Cloud Storage provides capture and retrieval. The application decides which captures become fixtures, which representation each file holds, and what pytest must assert about them.
The storage client wraps retrieval by RID or URL, RID listing, total count and bulk retrieval. Those SDK operations were checked with crawlbase 1.0.0, and the storage client is unchanged in 1.1.0, the current release: retrieval by RID succeeded, RID listing returned five identifiers, totalCount returned 40, and bulk retrieval returned one HTML page. A bulk body's base64 encoding must be decoded before its gzip content is decompressed.
The client also handles the SDK response shape where json_body is itself a nonempty string. That string is the stored body, not another metadata envelope. If an SDK method raises, the wrapper can retry the operation through its HTTP backend.
Retrieve a specific capture rather than assuming URL history
In the recorded double-store check of https://example.com, the first capture had stored_at=2026-11-16T13:58:53+00:00 and a second had stored_at=2026-11-16T13:58:55+00:00. Their RIDs differed, and the first remained readable after the second request. Lookup by URL returned the newer RID, 21b5ecad3842fdd252ffd12f.
Keep the snapshots regression needs locally rather than depending on URL lookup to enumerate a template's history. Cloud Storage's documented default retention is 30 days; local fixtures remain available independently of that window.
The lifecycle diagram separates remote capture from the durable mirror. In this implementation the fixture-refresh script builds the mirror directly from acquisition responses: it writes fixture HTML from the crawl response, and Storage API retrieval is exercised separately by the verification scripts and live tests.
Read the manifest as an application-owned collection
For each new configured URL, the script fetches HTML with store=true, requires both statuses to be 200, checks for an HTML body and a RID, and writes a slimmed local copy. slim_html() removes scripts, styles, noscript, SVG and iframe elements, so the mirror is a prepared DOM snapshot rather than a byte-for-byte copy of the response.
For Amazon and Walmart a separate named-scraper request supplies the local JSON file. For Allbirds, separate requests can supply generic JSON and Markdown. Those files share the HTML RID as their filename prefix, while the manifest's RID and status metadata describe the HTML acquisition. They are separate requests to the same target URL.
The script admits Amazon and Walmart fixtures only when their mapped scraper payload clears the site's threshold; Allbirds must clear it through CSS. A rejected fixture's local files are removed instead of entering the manifest. Attempts during fixture acquisition included Walmart URLs returning 404 and an Allbirds handle redirecting to a collection page, neither of which is a usable product fixture.
Existing manifest entries load first, and configured URLs already represented are skipped. refresh-fixtures adds configured URLs missing from the manifest. It does not refresh existing captures or collect successive versions of a URL; selecting a new baseline or retaining several versions is an explicit update to the fixture collection.
Replay captured products and test selector drift separately
The replay walkthrough reads two local HTML fixtures and checks their title and price:
def replay_titles() -> list[str]: manifest = json.loads((HERE / "manifest.json").read_text(encoding="utf-8")) titles: list[str] = [] for item in manifest["fixtures"]: html = (HERE / item["html"]).read_text(encoding="utf-8") found = _apply(html) if not found.get("title") or not found.get("price"): raise AssertionError(f"{item['rid']} did not fill title and price") titles.append(found["title"]) return titles
Its manifest holds synthetic Tree Runner and Wool Runner pages, and its test asserts the expected titles after requiring title and price. No socket opens during replay.
The package replay test parametrizes the same operation over the fifteen captured product fixtures. It loads each page and its available JSON files, runs the non-LLM chain, and asserts that a product wins at the site's minimum fill rate. It also checks the recorded target status and the presence of the HTML file.
| Fixture group | Captured pages | Winning representation in replay | Fill rate |
|---|---|---|---|
| Amazon | 5 | Named-scraper JSON | 0.75 for the iPhone case; 0.875 for the four books |
| Walmart | 5 | Named-scraper JSON | 0.875 on each page |
| Allbirds | 5 | CSS over mirrored HTML | 0.75 on each page |
All fifteen captures pass the coverage policy. Because Amazon and Walmart win before CSS, their replay cases exercise the JSON mapper and chain acceptance; they do not independently verify those sites' CSS selectors, and the shipped Amazon and Walmart selector files are placeholders that the mirrored pages do not satisfy. The test also does not compare each extracted value with an exact expected record.
Exercise the failure path with a controlled mutation
The drift simulation uses a synthetic product page to connect the components under a known failure. It writes that HTML as a local fixture, confirms healthy CSS extraction, then renames selector class tokens while leaving the product text intact.
The test asserts that CSS can no longer produce a product and that a fake LLM client supplies the accepted fallback. It seeds historical CSS and LLM coverage, records the current divergence, and checks for a drift incident. Finally it constructs shifted selectors programmatically, validates them against two copies of the mutated HTML with a reference product, and writes the expected diff.
That covers routing, baseline evaluation, selector application and diff output without a network dependency. The live selector-proposal check separately exercises a real model on sample HTML. Captured-page replay checks extraction against saved product pages, the mutation test checks recovery from broken selectors, and the live check exercises the model client.
Run the implementation and read the recorded results
Use Python 3.11 or newer and follow the repository setup instructions. The package dependencies are the Crawlbase Python SDK, OpenAI, Pydantic, python-dotenv and selectolax.
After installing the package with its development extras, run the eight offline walkthroughs and their small replay test from the repository root:
python steps/run_all.py python -m pytest steps/step08_replay_tests
Then replay the captured products and run the detector and repair tests from the package directory:
cd final python -m selfheal.pipeline --fixtures python -m pytest -m replay python -m pytest tests/test_drift.py tests/test_repair.py tests/test_drift_simulation.py
These paths use bundled inputs and test doubles. For networked tasks, supply CRAWLBASE_TOKEN, CRAWLBASE_JS_TOKEN and OPENAI_API_KEY through the environment template. The settings loader requires all three; the JavaScript token is used by the crawl client for its configured retry conditions. OPENAI_MODEL is optional.
From final/, the live checks and the fixture acquisition task are:
python tasks.py test-live python tasks.py refresh-fixtures
Both make API calls. The live tests cover storage retrieval, named scraping and autoparse, generic extraction and Markdown, and model extraction and selector proposals. Fixture acquisition can add files and update the manifest for configured URLs that are not yet represented.
The recorded build reports the following:
| Verification | Recorded result |
|---|---|
| Eight walkthroughs, offline and live modes | Both runs exited 0 |
| Walkthrough replay pytest | 1 passed |
| Package offline pytest | 66 passed in the recorded run |
Coverage of selfheal
|
86.93%, above the configured 85% minimum |
| Package live pytest | 4 passed |
| Ruff checks and formatting | Clean |
| Strict mypy check | No issues in 21 source files |
| Captured-fixture CLI replay | 15 pages, exit 0 |
The recorded suite ran on Python 3.13.14, while the package metadata and static-analysis settings target Python 3.11. In a fresh clone, the offline suite reports one failure that the recorded build did not: tests/test_secrets.py expects a keys.md file one directory above the repository, which is deliberately not shipped. The walkthroughs, the replay test and the fifteen-page CLI replay reproduce as recorded.
Account for acquisition separately from extraction
CSS over an existing HTML file adds no acquisition request and no model tokens. A named scraper, generic extraction and Markdown conversion are separate Crawling API requests. The model adds tokens only when its tier executes.
Early stopping avoids later extractor invocations, including an injected LLM call. It does not undo representations already fetched: crawl_product() acquires HTML and then named-scraper or generic JSON before extraction begins, and the fixture script can also request Markdown. Observation runs deliberately execute the later tiers to collect confirming coverage, so their model-call profile differs from an ordinary early-stopping run.
The package exposes these operations through pipeline functions. chain_for() adds the LLM only when one is passed in, record_outcome() records supplied results, detect_site() evaluates stored samples, and repair_site() validates a supplied proposal and writes its diff. The CLI provides fixture replay. A production job must connect acquisition, observation sampling, detection and proposal review itself.
An incident carries the site, field, watched rate, baseline and confirming rate. The walkthrough prints that information; it configures no notification service and applies no repair. A drop in both extraction paths, or a non-200 acquisition outcome, needs investigation outside this selector-drift rule.
Conclusion
A self-healing scraper needs a way to keep producing accepted records while making parser failures visible. This implementation does that through a shared schema, explicit tier acceptance, independent coverage measurements, and a repair path that preserves human review.
Crawlbase provides the acquired representations, the maintained Amazon and Walmart parsers, and retrievable captures. The application decides whether those representations produce a usable product, whether field coverage has changed, and whether a proposed CSS update works on selected snapshots. Local fixtures keep those decisions testable after the cloud retention window.
Start from the complete implementation, replay its captured products, and run the controlled drift test. Then use representative snapshots and observed coverage from your own job to review selector changes before they become the next extraction baseline.
Fetch product pages as HTML, named-scraper JSON or Markdown, keep every capture retrievable by RID with store=true, and let your own fill-rate checks decide what counts as a product. Start with up to 5,000 free requests, no card.
Frequently Asked Questions (FAQs)
Can the detector identify selectors that return incorrect but nonempty values?
No. It compares whether each field is filled, so a selector that returns the wrong nonempty value keeps a healthy fill rate, and a legitimate price change leaves the signal unchanged. The optional title comparison in repair validation adds a limited agreement check for a proposed selector. It is not semantic validation of every extracted record.
Does LLM fallback permanently repair the selectors?
No. Fallback extraction returns product data for the current attempt. Selector proposal is a separate model call whose output must be applied to snapshots and reviewed as a diff. The application reuses a repair only after the selector file is updated and later extraction reads that change.
What happens when a stored capture expires?
Its remote RID is no longer available, but replay continues from the manifest and the local fixture files. The documented default storage window is 30 days. The acquisition task skips URLs already in the manifest, so replacing an old baseline or preserving additional versions is an explicit update to the fixture collection.
How should you choose snapshots for validating a selector repair?
Use pages that exercise the product-template variants the selector must handle. The validator requires title and price on every supplied snapshot, so its policy is stricter than the chain's coverage threshold. It accepts any nonempty list; five is an example review set. If you supply a reference product, place its page last, where the default title agreement check runs.
Crawl any site at scale, without fighting infrastructure.
Crawlbase handles proxies, fingerprints, and CAPTCHAs so your team ships data pipelines instead of maintaining crawl plumbing. Up to 5,000 requests free, no card required.

