Trawl

Data Quality

This page tells a run that came back wrong from one that failed, says why a scrap stops returning good data, and what to do about it.

Why a scrap stops returning good data

The run list tells you a run went wrong, not why. Four causes look alike and call for four different actions:

What happened How it looks What to do
The page changed 0 items, or far fewer than usual Fix the selectors, or let Auto-fix do it
The site blocked the request The run fails at the same point every time Not a script problem. Slow the schedule down, or start from another page. Auto-fix does not touch it
The page is behind a login Like a block, often with a login form in the result Set the scrap's account or session, then run it by hand to check
The site refuses us entirely Every run fails, manual ones too The site is out of reach for now. Park the scrap or pick another source

After three failures in a row, Trawl pauses the scrap's scheduled runs until one works again (how the pause works). trawl list --unhealthy lists every scrap in that state, so you can go through them in one pass.

Read the status icons

Once a scrap has run, an icon next to its title shows how its last run went, except when the scrap is stuck, which outranks any single run:

Icon Means What to do
Orange spinner The run is still going Nothing — come back when it lands
Green check The last run worked Nothing
Orange triangle The run finished, but returned far fewer items than usual, or mostly empty fields Look at the results — the page probably changed shape
Red cross The last run failed, was blocked, or returned nothing One bad run. Worth opening if it repeats
Red circle The last three runs all counted as failures The scrap is stuck — Trawl skips its scheduled runs until one works (details)

A red cross is one bad run; a red circle is a scrap that will not fix itself.

What "far fewer" means

Trawl takes the median item count of your recent successful runs and flags a run under a fifth of it. The check starts only once it has enough to compare:

  • at least 3 recent successful runs with the same values as this run;
  • a median of at least 5 items.

So a new scrap, or one that returns one or two rows, is never flagged this way. A run started with trawl trigger or the API with values of its own skips this check and the empty-fields one below. A run with no values, or with the values of one of your stored parameter sets, is checked.

Empty fields

A run can return the usual number of items and still be unusable when most fields come back empty. A field is dead when it is empty on every item of the run. Trawl flags the run when:

  • the items have at least 3 fields;
  • at least 2 of them are dead;
  • dead fields make 60 % or more of all fields (75 % when the run returned a single item).

This check needs no past runs, so it also catches a new scrap that never worked. The run shows the same orange triangle as a short run.

Short runs count as failures

A short run, or one with dead fields, counts as a failure towards the three in a row: three orange triangles give a red circle, and such a run does not clear it. Only a clean run does. With Auto-fix on, it tries to fix the script, as for a run that found nothing.


See also: Scraping Advanced · Notifications · AI Features

Next step → Results & payload