We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
next_sibling_element
ElementRef<'_>
use reqwest::Client; use scraper::{Html, Selector}; use selectors::Element; let url = "https://www.kansou.me/"; let client = Client::new(); let res = client.get(url).send().await?; if !res.status().is_success() { return Err(Box::new(ScraperResult::Error( res.status().as_u16(), res.status().to_string(), ))); } let body = res.text().await?; let html = Html::parse_document(&body); let h2_selector = Selector::parse("h2").unwrap(); let mut table_element = h2_element.next_sibling_element().unwrap(); // error occured here
It can be solved with add this to Cargo.toml selectors = "0.22.0"
selectors = "0.22.0"
and add this to source code use selectors::Element;
use selectors::Element;
But, only add 0.22.0 can sovle this problem, and the current version of selectors is already 0.24.0.
0.22.0
0.24.0
So, any other ideas to solve this problems?
The text was updated successfully, but these errors were encountered:
This is fixed by #98 which re-exports Element thereby avoiding the extra dependency.
Element
Sorry, something went wrong.
Looks like we need to publish a new release soon, #98 was merged 2 months ago
No branches or pull requests
It can be solved with add this to Cargo.toml
selectors = "0.22.0"
and add this to source code
use selectors::Element;
But, only add
0.22.0
can sovle this problem, and the current version of selectors is already0.24.0
.So, any other ideas to solve this problems?
The text was updated successfully, but these errors were encountered: