use easy_scraper::Pattern; fn main() { let pat = Pattern::new( r#"
"#, ) .unwrap(); let client = reqwest::blocking::Client::builder() .user_agent("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100") .build() .unwrap(); let doc = client .get("https://b.hatena.ne.jp/hotentry/it") .send() .unwrap() .text() .unwrap(); let ms = pat.matches(&doc); println!("{:#?}", ms); }