Expand description
robots.txt policy enforcement. robots.txt honor for one-shot invocations (no cross-process cache).
Default policy is honor. Override requires BOTH --ignore-robots and
--i-accept-robots-risk. Uses robotstxt::DefaultMatcher (Google port).
§Workload
I/O-bound (network GET of /robots.txt). Reuses process-wide
[shared_http_client] so keep-alive / TLS session cache survive batch scrapes.
Not CPU-bound → no rayon. Not a long-lived daemon → no connection pool beyond
reqwest’s internal pool for this one-shot process.
Enums§
- Robots
Policy - Effective robots policy for one invocation.
Functions§
- enforce_
robots - Fetch origin robots.txt and enforce honor policy (async, one-shot).
- path_
allowed - Returns true when path is allowed by a simple robots Disallow set. Empty disallow list means allow all. Exact prefix match on path.
- scheme_
skips_ robots - Schemes that skip robots.txt (local / non-network).
- shared_
http_ client - Process-wide async HTTP client (rules: create
reqwest::Clientonce, reuse). - url_
allowed_ by_ robots_ body - Check URL against robots.txt body for a user-agent using DefaultMatcher.