Registry / utility / readability

readability

JSON →
library0.3.0rscratesunverified

Port of arc90's readability project to Rust for extracting readable content from web pages.

# Cargo.toml [dependencies] readability = "0.3.0"
INSTALL
IMPORT
SIG · READABILITY
R
readability
utilityrustv0.3.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

extract
✓ use readability::extractor::extract;

Extracts readable content from an HTML string.

use readability::extractor::extract; fn main() { let html = "<html><body><article><h1>Title</h1><p>Content</p></article></body></html>"; match extract(&mut html.as_bytes(), &url::Url::parse("https://example.com").unwrap()) { Ok(product) => println!("{}", product.text), Err(e) => eprintln!("Error: {}", e), } }
Debug
Known issues
gotchaRequires the `url` crate for URL parsing.
fix
Add `url` to your Cargo.toml dependencies.
affects: >=0.3.0
Upgrade
Version history
0.3.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
readability — cargo add readability · libregistry