Skip to main content

ScrapeSpec

Struct ScrapeSpec 

Source
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

v2.52.0 — 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 v2.39.0 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). Noneimpersonate. 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 (v2.52.0); 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 . Ignored by the impersonate engine (no JS runtime).

§proxy: String

The per-tenant proxy-pool config KEY (a dotted key, resolved via the same SecretResolver secret:/tool.base_url use — the design decision), never a proxy URL literal. Empty ⇒ direct connection.

§respect_robots: Option<bool>

Whether robots.txt is honored (default TRUE, the design decision). Setting respect_robots: false is the audited, scrape.aggressive-gated override (enforced enterprise-side, v2.52.0); 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 v2.38.0/v2.39.0 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 (the design decision — a heuristic, NOT a proof). None/false ⇒ strict selectors only. Enabling it makes the tool carry <storage> (the per-tenant selector-memory, v2.52.0).

§similarity_floor: Option<f64>

The similarity threshold ∈ [0,1] governing adaptive relocation (axon-T907). Only meaningful with adaptive: true.

§follow: String

scrape_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, the design decision).

§max_pages: Option<i64>

scrape_crawl maximum total pages fetched (bounded, the design decision). A hostile/infinite site can never exhaust the crawler (axon-T908).

§concurrency: Option<i64>

scrape_crawl fetch concurrency (bounded, ≥ 1).

§politeness: String

scrape_crawl politeness/rate reference: a declared budget (budget{rate:/max:}, v2.28.0) governing per-host request pacing (D98 reuse of the budget kernel). Empty ⇒ engine default pacing.

§checkpoint: String

scrape_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: Loc

Trait Implementations§

Source§

impl Debug for ScrapeSpec

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for ScrapeSpec

Source§

fn default() -> ScrapeSpec

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more