Skip to main content

classify_page

Function classify_page 

Source
pub fn classify_page(html: &str, result_count: usize) -> SearchStatus
Expand description

Classify a fetched results page.

A challenge page comes back as HTTP 200 with no result rows, which the old parser reported as result_count: 0 — indistinguishable from a query that genuinely has no hits, so an agent concluded “nothing exists” and moved on. An unrecognized page is treated as SearchStatus::Blocked rather than empty: a page we cannot parse is a failure, and reporting it as success is the bug this exists to fix.