Expand description
HTML Soup
Examples
let html = r#"
<!DOCTYPE html>
<html>
<head>
<title>My title</title>
</head>
<body>
<h1>My Heading</h1>
<p>Some text</p>
<p>Some more text</p>
</body>
</html>
"#;
let soup = Soup::new(html);
assert_eq!(
soup.find()
.tag("p")
.execute()?
.and_then(|p| p.text()),
Some("Some text".to_string())
);