Run an extractor
run_extractorReplay a saved extractor on a page to verify it still matches expected data structure, detecting drifted layouts or missing fields.
Instructions
Replay an extractor on one page, and check the page still keeps to it.
extractor: the object compile_extractor returned. html_or_url: an http(s) URL to fetch, or the HTML itself.
Returns {"ok", "rows", "fields", "summary", "failed"}; "fields" holds the page's own values an extractor learnt from examples. ok is false when the page drifted -- the listing moved, rows or a field vanished, a price no longer looks like a price -- and "failed" says which expectation broke. Never read rows from an answer whose ok is false as if nothing happened. Past 75,000 bytes the last rows are left out, counted in rows_left_out, then the heaviest summary and fields entries, named in summary_left_out and fields_left_out.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| extractor | Yes | the object compile_extractor returned. | |
| html_or_url | Yes | an http(s) URL to fetch, or the HTML itself. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| rows | No | ||
| error | No | ||
| failed | No | ||
| fields | No | ||
| summary | No | ||
| rows_left_out | No | ||
| fields_left_out | No | ||
| summary_left_out | No |