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

#507 in Text processing

Download history 649/week @ 2024-07-21 427/week @ 2024-07-28 636/week @ 2024-08-04 598/week @ 2024-08-11 375/week @ 2024-08-18 450/week @ 2024-08-25 665/week @ 2024-09-01 360/week @ 2024-09-08 720/week @ 2024-09-15 1191/week @ 2024-09-22 979/week @ 2024-09-29 733/week @ 2024-10-06 767/week @ 2024-10-13 690/week @ 2024-10-20 649/week @ 2024-10-27 622/week @ 2024-11-03

2,791 downloads per month
Used in 17 crates (11 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

~9–21MB
~316K SLoC