| Crates.io | spider_scraper |
| lib.rs | spider_scraper |
| version | 0.1.2 |
| created_at | 2024-12-30 09:11:03.687389+00 |
| updated_at | 2025-03-16 02:32:45.052417+00 |
| description | A css scraper using html5ever |
| homepage | |
| repository | https://github.com/spider-rs/spider_scraper |
| max_upload_size | |
| id | 1498900 |
| size | 73,635 |
CSS Scraper tuned for spider.
cargo add spider_scraperuse scraper::{Html, Selector};
let html = r#"
<ul>
<li>Foo</li>
<li>Bar</li>
<li>Baz</li>
</ul>
"#;
let fragment = Html::parse_fragment(html);
let selector = Selector::parse("li").unwrap();
for element in fragment.select(&selector) {
assert_eq!("li", element.value().name());
}