Announcement

Collapse
No announcement yet.

Can I download and save a page from Weather.com?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Can I download and save a page from Weather.com?

    I am trying to create a script that will include all the info from the boat and beach forecast on weather.com. I had a simple script that parsed the data, but weather.com somehow blocks me from parsing this data now. I can't find the data anywhere else exactly how they present it. I looked everywhere. So, I had an idea. What if I download the page that has the info, and save it in one of my directories. Then, they can no longer control it. They can no longer block me from parsing it. My question is, how can I download the page? I am thinking I would have to somehow view the source of the page, and save that as an html file, and maybe rename it to something like "today_boat_beach.htm". Is it possible to download a page, and save it so the webiste it came from cannot control it anymore? I know I can do this manually very easy, but how is it done via a script? Thanks.

    #2
    Beach, That's exactly what I do. I run a script to grab he hourly weather and then parse it to a local file, edit it so it looks good on an Audrey, and save it to the temp directory. I then have an ASP page call to stored page which loads fast because all the parsing is already done. See attached (just don't laugh... work in progress!).
    Attached Files

    Comment


      #3
      And here is the ASP that calls it.
      Attached Files

      Comment


        #4
        I should have mentioned that I store all he weather icons locally so that weather.com doesn't get pissed that I continually download them whenever I display the ASP page. There are different sizes referenced in the script but I'll only attach the larger ones.

        Hopefully this gives you (and ohers) inspiration! And if someone wants to fix my bad html, I would mind seeing how its improved.
        Attached Files

        Comment


          #5
          D,

          Thanks for responding. I have been trying to figure out a work-around for weather.com blocking my parsing, and this idea just hit me tonight. The question I have for you is: Do you ever find that weather.com blocks you from copying their page to your temp directory? If not, this is my solution.

          Here is the page I would like to save to a temp directory:

          http://www.weather.com/outlook/recre...TenDayForecast
          How would I do this? I would like the entire page.

          Comment


            #6
            I think I have figured out how to save the whole page, but I'm not sure how to call it in order to parse it. Normally, I if I were taking the info directly from weather.com, I would use something like "http://www.weather.com/xxxxx/xxx". How do you call a page to parse located in your own homeseer temp directory?

            Comment


              #7
              Beach,
              Look at the last 4 lines of the file. The File System Object is used. Google The File System Object and you can get a bunch of examples.
              💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

              Comment


                #8
                Hum ... Beach ,
                You stated you liked the whole page so why not use the KISS principle and simply link to that page from your home page?
                💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

                Comment


                  #9
                  Rupp,

                  I only want the info in the box to the left that has the wave height, sea state, etc in it. I want to take the whole page just so I have it and can parse from it. The reason I need it is so that I can create a device for each thing like wave height, etc, and then have hs speak it. I am concerned about voice control here. So I want to grab the whole page, save it in the temp directory, rename it something else, and then parse it so that I can put the info into devices, kind of like weather xml does, but not with xml, because there is no xml that deals with the info I am looking for. I just need to know how to call a page from my own hs directory.

                  Comment


                    #10
                    If you want to "grab" and manipulate the page on your hard drive you need to use the File System Object.
                    💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

                    Comment


                      #11
                      Rupp,

                      I don't know if I am explaining myself correctly. I want to parse data from the website weather.com. At certain points during the day, weather.com blocks me from parsing data. In order to circumvent this, I want to download a copy of the entire page from weather.com to my hard drive, and rename it, and save it. I have done this. For this I used the file system object. Now I want to run a script that will parse the data I need from this new saved page in my temp directory. If I were to parse the data directly from weather.com, I would call the web page. BUT... since the file I want to parse is now stored in my temp directory, no longer on the internet, how do I call the page to parse? Can't I just call it from localsystem or soemthing like that?

                      Comment


                        #12
                        Beach,

                        I do understand. Once this file is on your machine as a text file which the above vbs file does you have to use the File System Object to read it line by line and strip out the parts you want or need.
                        💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

                        Comment


                          #13
                          Rupp,

                          Do you have an easy tutorial on how to do this? I want to give it a try tonight. I don't want to say "It can't be that hard, right", because the rule is, once you say that, no matter what, you just added on about another 2 days of work. So I try not to say that ever.

                          Comment


                            #14
                            Beach,
                            Here's a good turtorial and it has good, solid, and easy to follow examples:

                            http://www.15seconds.com/issue/000816.htm
                            💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

                            Comment


                              #15
                              Thanks, Rupp. I'll take a more detailed look at that tutorial when I get home. I was wondering if what I want could be accomplished another way. Could I somehow grab the page from weather.com, save it as an .htm file in my temp directory, and then call it like I would any other web document through the internet?

                              Comment

                              Working...
                              X