| Crates.io | readability-fork |
| lib.rs | readability-fork |
| version | 0.2.2 |
| created_at | 2020-05-25 03:44:41.50135+00 |
| updated_at | 2021-01-06 09:13:58.689975+00 |
| description | Temporary fork of 'readability' crate with updated dependencies |
| homepage | https://github.com/jangernert/readability |
| repository | https://github.com/jangernert/readability.git |
| max_upload_size | |
| id | 245442 |
| size | 27,482 |
readability-rs is a library for extracting the primary readable content of a webpage. This is a rust port of arc90's readability project. inspired by kingwkb/readability.
readability to dependencies in Cargo.toml[dependencies]
readability = "^0"
use readability::extractor;
fn main() {
match extractor::scrape("https://spincoaster.com/chromeo-juice") {
Ok(product) => {
println!("------- html ------");
println!("{}", product.content);
println!("---- plain text ---");
println!("{}", product.text);
},
Err(_) => println!("error occured"),
}
}
Visit demo page.