Expand description
Local scrape/crawl/map/search/parse (HTTP + files; one-shot). Local scrape/crawl/map/search/parse (one-shot HTTP and file extract; no SaaS).
Engines:
http— reqwest + scraper HTML (no Chrome)browser— chromiumoxide viacrate::browser::OneShotSession
§Workload
- HTTP engine: I/O-bound network + CPU HTML parse off-async.
Fan-out via
tokio::task::JoinSet+Arc<Semaphore>::acquire_ownedgated bycrate::concurrency::effective_limit(or per-command--concurrency,0= process budget). Hard capcrate::concurrency::HARD_CAP. Parse usesspawn_blocking(docsrs: CPU work must not starve Tokio workers; bound by the same permit). - Browser engine: I/O-bound CDP (subprocess Chrome). Sequential per
shared session (product law one residual); use
--engine httpfor fan-out. - Crawl: BFS with bounded parallel frontier (JoinSet + budget);
link discovery stays inside the permit;
abort_allat limit; cancel token. - Shared
crate::robots::shared_http_clientavoids per-request Client build. - Compiled
Regexpatterns live inOnceLock(never recompile per call).
Structs§
- Scrape
Opts - Shared scrape options.
Enums§
- Scrape
Format - Output formats for local scrape.
Constants§
- HTTP_
USER_ AGENT - Identifiable product User-Agent for HTTP scrapes (PRD politeness).
Functions§
- batch_
scrape_ http - Batch scrape N URLs (HTTP engine, bounded JoinSet + Semaphore fan-out).
- build_
scrape_ payload - Build agent envelope data from HTML.
- crawl_
http - BFS crawl from seed URL (HTTP) with bounded parallel frontier.
- map_
http - Map site: collect unique URLs via BFS without full content (links format).
- parse_
file - Parse local file (html/md/txt/csv/json/xml/pdf/docx/xlsx) one-shot, no Chrome.
- parse_
file_ opts - Parse local file with optional PII redaction.
- read_
urls_ file - Read URLs file (one URL per line, # comments).
- redact_
pii - Redact common PII patterns in text (email, phone, card-like digits).
- reject_
non_ http_ scheme_ for_ http_ engine - Reject
file://, bare paths, and other non-HTTP(S) targets for the HTTP engine (GAP-A004). - scrape_
http - HTTP static scrape (no Chrome).
- search_
http - Local search: fetch a public HTML search page or treat query as URL list seed. MVP: if query looks like URL, map it; else use DuckDuckGo HTML (optional network).
- sorted_
keys - Stable sorted map helper for tests.