This one has really sparked my curiousity. As an aspiring pilot, I've lately
been considering an application to handle some of the more common functions
related to aviation (not that there isn't umpteen sources for this already,
but...). Adding a weather moniter into the app would be quite convenient
indeed.
Upon writing my previous post, I checked wunderground to see if the actual
data was available through the source code, and was suprised to find that it
was. Good news. The next question is: can we reliably count on this
information being in the same structure every time? I think so... but we'll
have to make sure. Depending on the weather, a site may have more content on
certain days/times than others, so we'll need to make sure that, in the event
of added content (advisories, etc) that may not be be there on a more normal
basis.
I *think* the structure of the source should not change, but to verify, we
can save copies of different instances of the source in various states of the
site display, and run some comparison utility such as WinDiff to compare the
files and see where the changes might be. This might take a while to make
sure it's downpat, but shouldn't be impossible.
The next big question (the one I don't have any ideas on yet), would be how
to programmatically get a copy of that source code via access (I'm assuming
we'll use some scripting, I don't believe vba has this type of functionality,
but luckily vba can execute the scripts).
So I think the steps would resemble something along the lines of:
1) Open the webpage (easily enough accomplished)
2) Save the webpage to disk for offline use, or
Access the Source Code and save that to disk
#2 is the problem area. If the webpage can be saved for offline use, a copy
of the source is then available from disk. But I'm not sure how to
accomplish this. Possibly some cmdline arguments for IE??
Can anyone supply any feedback on how to accomplish this? I'll search
around some (starting with IE cmds, if possible).
I do wonder about legal implications... I always wondered why the source
code for any website you visit is available to anyone that knows how to find
it. I figured it would be more protected. I'll have to do a bit of research
on this as well.
--
Jack Leach
www.tristatemachine.com
- "First, get your information. Then, you can distort it at your leisure."
- Mark Twain