11 releases

0.0.11 Oct 25, 2024
0.0.10 Aug 29, 2024

#13 in #readability

Download history 4/week @ 2024-09-08 56/week @ 2024-09-15 204/week @ 2024-09-22 182/week @ 2024-09-29 349/week @ 2024-10-06 118/week @ 2024-10-13 416/week @ 2024-10-20 223/week @ 2024-10-27 346/week @ 2024-11-03 194/week @ 2024-11-10 180/week @ 2024-11-17 507/week @ 2024-11-24 275/week @ 2024-12-01 333/week @ 2024-12-08 189/week @ 2024-12-15 64/week @ 2024-12-22

909 downloads per month
Used in 2 crates (via spider_transformations)

MIT license

27KB
746 lines

llm_readability

The Rust readability library built for performance, AI, and multiple locales. The library is used on Spider Cloud for data cleaning.

Usage

[dependencies]
llm_readability = "0"
use llm_readability::extractor;

fn main() {
  match extractor::extract(&mut "<html>...</html>".as_bytes(), "https://example.com", None) {
      Ok(product) => {
          println!("------- html ------");
          println!("{}", product.content);
          println!("---- plain text ---");
          println!("{}", product.text);
      },
      Err(_) => println!("error occured"),
  }
}

This project is a rewrite of readability-rs for performance and bug fixes.

Dependencies

~9–16MB
~273K SLoC