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

#585 in Text processing

Download history 925/week @ 2024-12-09 609/week @ 2024-12-16 374/week @ 2024-12-23 438/week @ 2024-12-30 1071/week @ 2025-01-06 1485/week @ 2025-01-13 1660/week @ 2025-01-20 1137/week @ 2025-01-27 1598/week @ 2025-02-03 1630/week @ 2025-02-10 1478/week @ 2025-02-17 2045/week @ 2025-02-24 2397/week @ 2025-03-03 3263/week @ 2025-03-10 2461/week @ 2025-03-17 2358/week @ 2025-03-24

10,589 downloads per month
Used in 20 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

~7–20MB
~293K SLoC