8 releases

Uses old Rust 2015

0.3.0 Dec 20, 2023
0.2.0 Apr 1, 2021
0.1.5 May 7, 2019
0.1.4 Feb 17, 2018
0.1.2 Nov 13, 2017

#263 in Text processing

Download history 222/week @ 2024-03-13 243/week @ 2024-03-20 280/week @ 2024-03-27 426/week @ 2024-04-03 282/week @ 2024-04-10 227/week @ 2024-04-17 608/week @ 2024-04-24 554/week @ 2024-05-01 454/week @ 2024-05-08 497/week @ 2024-05-15 538/week @ 2024-05-22 749/week @ 2024-05-29 470/week @ 2024-06-05 422/week @ 2024-06-12 513/week @ 2024-06-19 574/week @ 2024-06-26

2,113 downloads per month
Used in 15 crates (12 directly)

MIT license

26KB
697 lines

readability-rs

Build Status

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.

Hot to use

  • Add readability to dependencies in Cargo.toml
[dependencies]
readability = "^0"
  • Then, use it as below

extern crate readability;
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"),
  }
}

Demo

Visit demo page.

License

MIT

Dependencies

~8–23MB
~338K SLoC