pub struct Scraper<'a> { /* private fields */ }
Expand description
Responsible for scraping data from elements.
Implementations§
Source§impl<'a> Scraper<'a>
Properties
impl<'a> Scraper<'a>
Properties
Sourcepub fn element(&self) -> ElementRef<'_>
pub fn element(&self) -> ElementRef<'_>
Gets the element.
Source§impl<'a> Scraper<'a>
All
impl<'a> Scraper<'a>
All
Sourcepub fn all<T, F>(&self, selection: &str, scrape: F) -> Result<Vec<T>, Error>
pub fn all<T, F>(&self, selection: &str, scrape: F) -> Result<Vec<T>, Error>
Scrapes all the instances of the selection
.
Sourcepub fn all_text(&self, selection: &str) -> Result<Vec<String>, Error>
pub fn all_text(&self, selection: &str) -> Result<Vec<String>, Error>
Scrapes all the text from the selection
.
Source§impl<'a> Scraper<'a>
Only
impl<'a> Scraper<'a>
Only
Trait Implementations§
Source§impl<'a> From<ElementRef<'a>> for Scraper<'a>
impl<'a> From<ElementRef<'a>> for Scraper<'a>
Source§fn from(element: ElementRef<'a>) -> Self
fn from(element: ElementRef<'a>) -> Self
Converts to this type from the input type.
impl<'a> Copy for Scraper<'a>
Auto Trait Implementations§
impl<'a> Freeze for Scraper<'a>
impl<'a> !RefUnwindSafe for Scraper<'a>
impl<'a> !Send for Scraper<'a>
impl<'a> !Sync for Scraper<'a>
impl<'a> Unpin for Scraper<'a>
impl<'a> !UnwindSafe for Scraper<'a>
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