#url #scraper

url-scraper

Simple HTML URL scraper

1 unstable release

new 0.1.0 Oct 7, 2018

#37 in #url

Download history 10/week @ 2018-10-10

3 downloads per month
Used in 1 crate

MIT license

5KB
82 lines

url-scraper

Rust crate for scraping URLs from HTML pages.

Example

extern crate url_scraper;
use url_scraper::UrlScraper;

fn main() {
    let directory = "http://phoronix.com/";

    let scraper = UrlScraper::new(directory).unwrap();
    for (text, url) in scraper.into_iter() {
        println!("{}: {}", text, url);
    }
}

lib.rs:

Simple library for quickly fetching a list of URLs from a webpage.

Example

extern crate url_scraper;
use url_scraper::UrlScraper;

let scraper = UrlScraper::new("http://phoronix.com/").unwrap();
for (text, url) in scraper.into_iter() {
    println!("{}: {}", text, url);
}

Dependencies

~16MB
~362K SLoC