Skip to content

html5ever web scraper used for some of spider-rs CSS transformations

License

Notifications You must be signed in to change notification settings

spider-rs/spider_scraper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spider_scraper

CSS Scraper tuned for spider.

Usage

  1. cargo add spider_scraper
use 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());
}

About

html5ever web scraper used for some of spider-rs CSS transformations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages