pub struct ScraperConfig {Show 13 fields
pub fetcher: FetcherConfig,
pub policy: PolicyConfig,
pub browser: PoolConfig,
pub store: Option<Store>,
pub llm: Option<LlmConfig>,
pub search: Option<Arc<dyn SearchBackend>>,
pub egress: Vec<(String, String)>,
pub egress_classes: HashMap<String, EgressClass>,
pub audit: Option<Arc<Audit>>,
pub hooks: Hooks,
pub secrets: BTreeMap<String, ActionSecret>,
pub ocr: Option<Arc<dyn PageOcr>>,
pub interact: InteractLimits,
}Fields§
§fetcher: FetcherConfig§policy: PolicyConfig§browser: PoolConfig§store: Option<Store>抓取结果缓存(maxAge、minAge、storeInCache);不设时不缓存。
llm: Option<LlmConfig>summary、json 格式和 /v2/extract 用的 OpenAI 兼容服务。
search: Option<Arc<dyn SearchBackend>>/v2/search 用的搜索后端。
egress: Vec<(String, String)>命名出口(名字,代理地址):请求的 egress 选其中一个,其余抓取设置和默认出口相同;
两个及以上时,不指定 egress 的请求由出口池选。
egress_classes: HashMap<String, EgressClass>命名出口的类别(没列出的是 direct)。代理地址为空的 direct 出口与默认出口相同。
audit: Option<Arc<Audit>>审计日志:每次抓取一行元数据,可疑结果留 HTML 快照(见 crate::audit)。
hooks: Hooks扩展点(pagesift_hooks):代码注册的钩子和 [[rules]] 编译出的规则。空时不经过任何钩子。
secrets: BTreeMap<String, ActionSecret>[secrets]:act 动作里 {{secret:NAME}} 在本地替换成的值(不经过模型)。
ocr: Option<Arc<dyn PageOcr>>扫描页 OCR([ocr] enabled);不设时扫描页只有说明,并报 scanned_pages_without_ocr。
interact: InteractLimits/interact 保留会话的时长上限(默认 Firecrawl 文档的值)。
Trait Implementations§
Source§impl Clone for ScraperConfig
impl Clone for ScraperConfig
Auto Trait Implementations§
impl !RefUnwindSafe for ScraperConfig
impl !UnwindSafe for ScraperConfig
impl Forget for ScraperConfig
impl Freeze for ScraperConfig
impl Send for ScraperConfig
impl Sync for ScraperConfig
impl Unpin for ScraperConfig
impl UnsafeUnpin for ScraperConfig
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
Mutably borrows from an owned value. Read more