pub struct ScrapeSpec {Show 15 fields
pub engine: Option<String>,
pub impersonate: Option<String>,
pub render_wait: Option<String>,
pub proxy: String,
pub respect_robots: Option<bool>,
pub extract: Vec<String>,
pub adaptive: Option<bool>,
pub similarity_floor: Option<f64>,
pub follow: String,
pub max_depth: Option<i64>,
pub max_pages: Option<i64>,
pub concurrency: Option<i64>,
pub politeness: String,
pub checkpoint: String,
pub loc: Loc,
}Expand description
§Fase 98.b — the closed-catalog scrape configuration block
(scrape: { … }) on a web-acquisition tool. Every field is
optional/defaulted so a minimal scrape: {} is legal; the fields
that apply depend on the tool’s provider: (the type-checker cross-
validates provider ↔ field applicability, axon-T905). The whole
struct is deliberately flat + serializable-friendly (Option/Vec/
scalar), mirroring the §84 technician-field discipline, so the IR
stays byte-stable and the runtime classifies identically.
Fields§
§engine: Option<String>The acquisition engine: impersonate (HTTP-fingerprint stealth,
the GA tier) | browser (headless-render sidecar, the gray tier).
None ⇒ impersonate (D98.3). Closed catalog (axon-T905).
Applies to scrape_http / scrape_crawl.
impersonate: Option<String>The browser-fingerprint impersonation PROFILE name
(chrome, firefox, safari — closed catalog). Only meaningful
with engine: impersonate. The concrete JA3/JA4 + HTTP/2 profile
is resolved by the enterprise engine (§98.g); OSS records the
declared intent. None ⇒ the engine’s default profile.
render_wait: Option<String>The post-navigation settle wait for engine: browser (a Duration,
e.g. 2s) — how long to let JS render before snapshotting. Bounded
(D98.11). Ignored by the impersonate engine (no JS runtime).
proxy: StringThe per-tenant proxy-pool config KEY (a dotted key, resolved via
the same SecretResolver secret:/tool.base_url use — D98.9),
never a proxy URL literal. Empty ⇒ direct connection.
respect_robots: Option<bool>Whether robots.txt is honored (default TRUE, D98.6). Setting
respect_robots: false is the audited, scrape.aggressive-gated
override (enforced enterprise-side, §98.h); in OSS it is recorded.
extract: Vec<String>scrape_dom extraction spec: an ordered list of name=selector
FieldSpecs (["title=h1", "price=.amount"]). A closed, bracketed
string list (reuses the §83/§84 list helper). Each entry must be a
single name=selector pair (axon-T906).
adaptive: Option<bool>scrape_dom adaptive relocation: when a declared selector misses,
the engine attempts a HEURISTIC relocation above similarity_floor
(D98.4 — a heuristic, NOT a proof). None/false ⇒ strict
selectors only. Enabling it makes the tool carry <storage> (the
per-tenant selector-memory, §98.h).
similarity_floor: Option<f64>The similarity threshold ∈ [0,1] governing adaptive relocation
(axon-T907). Only meaningful with adaptive: true.
follow: Stringscrape_crawl link-follow selector/pattern: which links to enqueue
from each fetched page. Empty ⇒ no expansion (single-page crawl).
max_depth: Option<i64>scrape_crawl maximum link depth from the seed (bounded, D98.11).
max_pages: Option<i64>scrape_crawl maximum total pages fetched (bounded, D98.11). A
hostile/infinite site can never exhaust the crawler (axon-T908).
concurrency: Option<i64>scrape_crawl fetch concurrency (bounded, ≥ 1).
politeness: Stringscrape_crawl politeness/rate reference: a declared budget
(budget{rate:/max:}, §72) governing per-host request pacing
(D98 reuse of the budget kernel). Empty ⇒ engine default pacing.
checkpoint: Stringscrape_crawl checkpoint store reference: a declared axonstore
the crawler persists frontier/visited state into for resumable,
at-least-once crawling. Empty ⇒ in-memory (non-resumable).
loc: LocTrait Implementations§
Source§impl Debug for ScrapeSpec
impl Debug for ScrapeSpec
Source§impl Default for ScrapeSpec
impl Default for ScrapeSpec
Source§fn default() -> ScrapeSpec
fn default() -> ScrapeSpec
Auto Trait Implementations§
impl Freeze for ScrapeSpec
impl RefUnwindSafe for ScrapeSpec
impl Send for ScrapeSpec
impl Sync for ScrapeSpec
impl Unpin for ScrapeSpec
impl UnsafeUnpin for ScrapeSpec
impl UnwindSafe for ScrapeSpec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more