|
-
Apr 13th, 2014, 01:48 PM
#1
Thread Starter
Member
-
Apr 14th, 2014, 12:30 AM
#2
Fanatic Member
Re: Weather app and website information gatherer
Hi,
that API is subscriber only so unless someone here is subscribed to it we will not be able to help much.
Grabbing data from a webpage can be done many ways, for example, you can read the source into a string and then search the string for what you need.
If you let me know where you will get your data i can help more (if it is api.accuweather then some code or source would be needed).
My CodeBank Submissions
- Listbox with transparency and picture support - Click Here
- Check for a true internet connection - Click Here
- Open Cash drawer connected to receipt printer - Click Here
- Custom color and size border around form - Click Here
- Upload file to website without user logins, includes PHP - Click Here
- List All Removable USB Storage Devices - Click Here
- Custom On/Off Slide Control - Click Here
- Insert multiple rows of data into one database table using parameters - Click Here
- Trigger USB/Serial Cash Drawer - Click Here
-
Apr 14th, 2014, 05:29 AM
#3
Re: Weather app and website information gatherer
If you live in the US NOAA has an XML version of the weather. If you click on these two links
http://forecast.weather.gov/MapClick...0#.U0u4BFe2Wno
http://forecast.weather.gov/MapClick...&FcstType=dwml
You will see the relationship between the formatted and XML versions of the weather forecast.
-
Apr 19th, 2014, 10:12 AM
#4
Thread Starter
Member
Re: Weather app and website information gatherer
 Originally Posted by bensonsearch
Hi,
that API is subscriber only so unless someone here is subscribed to it we will not be able to help much.
Grabbing data from a webpage can be done many ways, for example, you can read the source into a string and then search the string for what you need.
If you let me know where you will get your data i can help more (if it is api.accuweather then some code or source would be needed).
I private messaged you!
-
Apr 19th, 2014, 04:27 PM
#5
Fanatic Member
Re: Weather app and website information gatherer
 Originally Posted by jj103
I private messaged you! 
Please try and keep anything related to this thread public incase someone else who finds the thread looking for help can get it.
As per your message you still haven't said which one you will go with or which points of data you are after.
I will say that there is 2 ways I personally would go about this, the first is to download the source code as a string and then "search" the string for your info
Code:
Dim wc as New Webclient
Dim mytext as String
mytext = wc.DownloadString("http://www.myweather.com")
'search mytext for what you wish
The other way is very much the same but instead of searching for strings you assign the elements to a document and work with them
Code:
Dim wc as New Webclient
Dim mytext as String
mytext= wc.DownloadString("http://www.mysite")
Dim wb as New Webbrowser
wb.DocumentText = ""
wb.Document.OpenNew(false)
wb.Document.Write(mytext)
'you need to look at the source to see where to go now, if we had an element with an ID of say 'temp' then
Label1.Text = wb.Document.getElementById("temp").innerHTML
My CodeBank Submissions
- Listbox with transparency and picture support - Click Here
- Check for a true internet connection - Click Here
- Open Cash drawer connected to receipt printer - Click Here
- Custom color and size border around form - Click Here
- Upload file to website without user logins, includes PHP - Click Here
- List All Removable USB Storage Devices - Click Here
- Custom On/Off Slide Control - Click Here
- Insert multiple rows of data into one database table using parameters - Click Here
- Trigger USB/Serial Cash Drawer - Click Here
-
Apr 21st, 2014, 06:09 PM
#6
Thread Starter
Member
Re: Weather app and website information gatherer
Okay! Thank you very much, but I seem to not be able to find the "string"
Sorry..very long time and I can't figure it out.
Currently using "http://weather.yahooapis.com/forecastrss?w=2459115"
How would I find the string or "element ID" for lets just the temperature.
Again, thank you very much with the help.
(Using the second code provided by you)
-
Apr 21st, 2014, 10:04 PM
#7
Fanatic Member
Re: Weather app and website information gatherer
You are dealing with an XML document in that case use the below
Code:
Dim wc As New WebClient
Dim mytext As String
mytext = wc.DownloadString("http://weather.yahooapis.com/forecastrss?w=2459115")
Dim mt As New Xml.XmlDocument
mt.LoadXml(mytext)
Dim rr As Xml.XmlNodeList = mt.GetElementsByTagName("ttl")
For Each ee As Xml.XmlElement In rr
MsgBox(ee.InnerText)
Next
My CodeBank Submissions
- Listbox with transparency and picture support - Click Here
- Check for a true internet connection - Click Here
- Open Cash drawer connected to receipt printer - Click Here
- Custom color and size border around form - Click Here
- Upload file to website without user logins, includes PHP - Click Here
- List All Removable USB Storage Devices - Click Here
- Custom On/Off Slide Control - Click Here
- Insert multiple rows of data into one database table using parameters - Click Here
- Trigger USB/Serial Cash Drawer - Click Here
-
Apr 26th, 2014, 02:21 PM
#8
Thread Starter
Member
Re: Weather app and website information gatherer
Alright! So far looking good but I think one more question!
Temperature is found in the "ttl"
But for the others, let's say the extended forecast, it has a lot of data per tag.
Let's say I want a label to display Monday's high, and another label to display monday's low.
I think that's the last thing I need to learn, to be able to separate different bits of data in one tag.
Thank you!!
-
Apr 26th, 2014, 04:13 PM
#9
Fanatic Member
Re: Weather app and website information gatherer
instead of ee.innerText look at its other properties, you will find an answer
My CodeBank Submissions
- Listbox with transparency and picture support - Click Here
- Check for a true internet connection - Click Here
- Open Cash drawer connected to receipt printer - Click Here
- Custom color and size border around form - Click Here
- Upload file to website without user logins, includes PHP - Click Here
- List All Removable USB Storage Devices - Click Here
- Custom On/Off Slide Control - Click Here
- Insert multiple rows of data into one database table using parameters - Click Here
- Trigger USB/Serial Cash Drawer - Click Here
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|