Function microformats::from_html
source · pub fn from_html(html: &str, url: Url) -> Result<Document, Error>Expand description
Parses the provided HTML into a types::Document resolved with the proviedd URL.
let document = from_html(r#"
<html>
<head>
<link rel="author me" href="/author">
</head>
<body>
</body>
</html>
"#, "https://example.com".parse().unwrap());
assert!(document.is_ok());
let doc = document.unwrap();