pub fn parse_url_with_options(
url: &str,
etag: Option<&str>,
modified: Option<&str>,
user_agent: Option<&str>,
options: &ParseOptions,
) -> Result<ParsedFeed>Expand description
Parse feed from URL with full control over parser behavior
Like parse_url but allows specifying HTML sanitization, relative URI
resolution, and resource limits via ParseOptions.
§Errors
Returns FeedError::Http if the request fails or FeedError::Parse if parsing fails.
§Examples
use feedparser_rs::{parse_url_with_options, ParseOptions};
let options = ParseOptions {
sanitize_html: false, // Trust this feed source
..ParseOptions::default()
};
let feed = parse_url_with_options(
"https://example.com/feed.xml",
None,
None,
None,
&options,
).unwrap();