XPATH Scraper
Makes it easier to scrape websites with XPATH. Currently using my xpath parser which is incomplete, undocumented and used originally for teaching myself about parsing.
A Very simple example of this which is below and also in the example folder:
use Cursor;
use Scraper;
use ;
and not]"#)]
Vec<RedditListItem>
);
#[derive(Debug, Scraper)]
pub struct RedditListItem {
// URL of the post
#[scrape(xpath = r#".//a[@data-click-id="body"]/@href"#)]
pub url: ,
// Title of the post
pub title: ,
// When it was posted
pub timestamp: ,
// Amount of comments.
pub comment_count: ,
// Vote count.
pub votes: ,
}
async