Skip to main content

Crate servo_fetch

Crate servo_fetch 

Source
Expand description

Fetch, render, and extract web content with an embedded Servo browser engine. No Chrome, no containers, no external processes.

let md = servo_fetch::markdown("https://example.com")?;

Re-exports§

pub use engine::ConsoleLevel;
pub use engine::ConsoleMessage;
pub use engine::CrawlOptions;
pub use engine::CrawlResult;
pub use engine::CrawlStatus;
pub use engine::FetchOptions;
pub use engine::Page;
pub use engine::crawl;
pub use engine::crawl_each;
pub use engine::extract_json;
pub use engine::fetch;
pub use engine::markdown;
pub use engine::text;
pub use engine::validate_url;
pub use error::Error;
pub use error::Result;

Modules§

engine
Servo browser engine facade.
error
Error types.
extract
Content extraction — converts raw HTML into readable Markdown or structured JSON.
layout
CSS layout heuristics — detects page structure (navbar, sidebar, footer, main) to improve content extraction accuracy.
sanitize
Strips terminal escape sequences and control characters from output.