11 releases

0.0.11 Oct 25, 2024
0.0.10 Aug 29, 2024

#14 in #readability

Download history 340/week @ 2024-10-30 247/week @ 2024-11-06 183/week @ 2024-11-13 436/week @ 2024-11-20 341/week @ 2024-11-27 262/week @ 2024-12-04 247/week @ 2024-12-11 175/week @ 2024-12-18 108/week @ 2024-12-25 132/week @ 2025-01-01 155/week @ 2025-01-08 72/week @ 2025-01-15 367/week @ 2025-01-22 214/week @ 2025-01-29 321/week @ 2025-02-05 258/week @ 2025-02-12

1,163 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
~271K SLoC