#readability #content #port #readable #original #liveboat #arc90

readability-liveboat

Port of arc90's readability project to rust, updated for use with liveboat

5 releases

Uses old Rust 2015

0.3.4 Jan 26, 2025
0.3.3 Jan 20, 2025
0.3.2 Jan 20, 2025
0.3.1 Jan 13, 2025
0.3.0 Jan 11, 2025

#16 in #readability

Download history 334/week @ 2025-01-11 506/week @ 2025-01-18 610/week @ 2025-01-25 113/week @ 2025-02-01 250/week @ 2025-02-08 52/week @ 2025-02-15

53 downloads per month
Used in liveboat

MIT license

27KB
713 lines

readability-rs

NOTE:

This is fork of readability-rs which contains changes required by the Liveboat project. I'm not original author of the project

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
~294K SLoC