I am trying to get the titles of the events from this webpage and put them into a list:
Since using HTTP did not get the fully generated html, I decided to try using flutter_webview_plugin to:
- Load the desired URL on a hidden webview
- Extract the fully generated HTML
- Parse the HTML to get the titles I need
I am using this code to load the webview:
flutterWebviewPlugin.launch(
"https://www.volunteermatch.org/search/?l=Long%20Grove,%20IL%2060047,%20USA",
hidden: true);
flutterWebviewPlugin.onStateChanged.listen((viewState) async {
if (viewState.type == WebViewState.finishLoad) {
flutterWebviewPlugin
.evalJavascript("document.documentElement.outerHTML")
.then((html) {
print(html);
//some code to parse html
flutterWebviewPlugin.close();
});
}
});
The problem is that even using JavaScript code to retrieve the HTML after the webview has finished loading does not give me the same HTML that going to "Inspect Element" on Safari would give, and none of the titles are in it either. What am I missing?

