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
All even indexes are not found in the method below
Future<void> loadPage() async { webScraper = WebScraper(); if (await webScraper.loadFullURL('https://www.agricultura.go.gov.br/noticias.html')) { try { var elements1_ok = webScraper.getElementTitle('div.g-grid.item:nth-child(1) > div > a > h2.heading'); elements1_ok.forEach((img) => print(img)); var elements2_notFound = webScraper.getElementTitle('div.g-grid.item:nth-child(2) > div > a > h2.heading'); elements2_notFound.forEach((img) => print(img)); var elements3_ok = webScraper.getElementTitle('div.g-grid.item:nth-child(3) > div > a > h2.heading'); elements3_ok.forEach((img) => print(img)); var elements4_notFound = webScraper.getElementTitle('div.g-grid.item:nth-child(4) > div > a > h2.heading'); elements4_notFound.forEach((img) => print(img)); } catch (e) { print(e); } } }
Details: nth-child (2) returns the empty value nth-child (3) returns the value nth-child (2) The same is happening for all elements of the list
The text was updated successfully, but these errors were encountered:
I have the same problem
Sorry, something went wrong.
it seems to be a problem with dom.dart we forked and used universal html and it worked!
Hi @Laestry! Would you like to contribute for the same?
No branches or pull requests
All even indexes are not found in the method below
Details:
nth-child (2) returns the empty value
nth-child (3) returns the value nth-child (2)
The same is happening for all elements of the list
The text was updated successfully, but these errors were encountered: