pub struct WebScraperLoader { /* private fields */ }Expand description
网页爬取加载器
从 URL 爬取网页,提取正文文本。可选递归跟踪同域链接。
Implementations§
Source§impl WebScraperLoader
impl WebScraperLoader
Sourcepub fn with_max_depth(self, depth: usize) -> Self
pub fn with_max_depth(self, depth: usize) -> Self
设置最大递归深度
Sourcepub fn with_max_pages(self, pages: usize) -> Self
pub fn with_max_pages(self, pages: usize) -> Self
设置最大爬取页面数
Sourcepub fn with_fail_on_error(self, fail: bool) -> Self
pub fn with_fail_on_error(self, fail: bool) -> Self
设置爬取失败时是否返回错误(默认跳过失败页面)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WebScraperLoader
impl RefUnwindSafe for WebScraperLoader
impl Send for WebScraperLoader
impl Sync for WebScraperLoader
impl Unpin for WebScraperLoader
impl UnsafeUnpin for WebScraperLoader
impl UnwindSafe for WebScraperLoader
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