Capture text created by HTML
Posted
#1
(In Topic #1394)
Guru


Here is the page I am looking at http://www.metoffice.gov.gg/livedata.html
The data I want is things like the temperature, wind speed etc. The HTML does not seem to contain any of the displayed data.
I have looked at WebView which displays the page perfectly, I just can't see how to get at the displayed data.
Posted
Regular

hth
b
Posted
Banned
it's here..
Code
<iframe id="temp"
src="http://www.metoffice.gov.gg/met/PA50.html" height ="100%" width ="100%" frameborder="0" scrolling="no" allowtransparency="true" background="none">
</iframe>
</div>
<div class="Live1">
<iframe id="wind"
src="http://www.metoffice.gov.gg/met/wind2.html" height ="100%" width="100%" frameborder="0" scrolling="no">
</iframe>
so you want to load
http://www.metoffice.gov.gg/met/PA50.html
and
http://www.metoffice.gov.gg/met/wind2.html
then extract the data from the tables
wind2.html looks like this..
Code
<html><META HTTP-EQUIV=REFRESH CONTENT=30; URL=http://wind2.html><link href="stylewind.css" type="text/css" rel="stylesheet"><body leftmargin=15><div align=center><center><table><tr><td width=224 height=150 align=center><div align=left><table border=0><tr><td width=219 height=50><font size=4> Mean Direction (°T)</font></td></tr><tr><td width=219 height=50><font size=4> Mean Wind Speed (knots)</font></td></tr><tr><td width=219 height=50><font size=4> 10 min. Highest Gust (knots)</font></td></tr><tr><td width=219 height=50><font size=4> 60 min. Highest Gust (knots)</font></td></tr></table></div></td><td width=118 height=150 align=center><div align=center><center><table border=0 align=left><tr><td height=50 align=center valign=middle width=47><font size=4>340</font></td><td width=60 height=50 align=center valign=middle><font size=3>NNW</font></td></tr><tr><td width=47 height=50 align=center valign=middle><font size=4>6</font></td><td width=60 height=50 align=center valign=middle>force 2</td></tr><tr><td width=47 height=50 align=center valign=middle><font size=4>8</font></td><td width=60 height=50 align=center valign=middle><font size=3>9 mph</font></td></tr><tr><td width=47 height=50 align=center valign=middle><font size=4>8</font></td><td width=60 height=50 align=center valign=middle><font size=3>9 mph</font></td></tr></table></center></div></td></tr></table></center></div><p align=center><font size=3>Updated: 11:48GMT Sunday 29 December 2024</font></p></body></html>
Posted
Guru


Posted
Banned
it's only issue it the "degrees" sign in "Mean Direction (°T)" i could not convert that.
it makes a String[][] array
[title, data1, data2]
[title, data1, data2]
Posted
Guru


<IMG src="https://www.cogier.com/gambas/GsyWeather.png">
</IMG>
1 guest and 0 members have just viewed this.



