I'm trying to get weather data from this website:
https://www.ilmeteo.it/meteo/Magenta/previsioni-orarie?refresh_ce
with the code:
try {
int i = 0;
if (googlefirst3.startsWith("http")) {
Document document = Jsoup.connect("https://www.ilmeteo.it/meteo/Magenta/previsioni-orarie?refresh_ce").userAgent("Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11 Firefox/19.0").timeout(0).get();
Elements temp = document.select("tr");
String verifica;
verifica=document.html();
for (Element movielist : temp) {
i++;
html = (i + "|||" + movielist.getElementsByTag("td").first().html());
array3b[i] = html;
}
}
} catch (IOException e) {
e.printStackTrace();}
I'm trying to get the table rows with temperature, wind and time data:
but I'm unable to get it. The document I get doesn't contain this data and seems to be incomplete. I thought this was due to javascript generated html, but even with this method:
How do I get the web page contents from a WebView?
I was unable to get it. I'm not sure javascript is the issue. Can anybody help me at least trying too identify the problem nature?
Many thanks in advance.