| Crates.io | llm_readability |
| lib.rs | llm_readability |
| version | 0.0.11 |
| created_at | 2024-08-28 13:57:21.101804+00 |
| updated_at | 2024-10-25 13:23:47.1011+00 |
| description | Readability library for LLM's built in Rust |
| homepage | |
| repository | https://github.com/spider-rs/llm-readability |
| max_upload_size | |
| id | 1354684 |
| size | 29,246 |
The Rust readability library built for performance, AI, and multiple locales. The library is used on Spider Cloud for data cleaning.
[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.