Page 354 of 380 FirstFirst ... 254304344352353354355356364 ... LastLast
Results 3,531 to 3,540 of 3796

Thread: Conky Weather Forecast Python Script

  1. #3531
    Join Date
    Mar 2008
    Location
    Here
    Beans
    Hidden!
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Conky Weather Forecast Python Script

    Quote Originally Posted by daniel227 View Post
    however if i put the url into my browser directly i still get the info and i can reload it every 5 to 10min, well every now and then anyways.
    just wondering, is it still possible to use that.
    Yes.

    If you get it in your browser, same the page source to somewhere convenient (say ~/Downloads/data.xml).
    Now open conkyForecast.py (mine was in /usr/share/conkycolors/scripts) and find the lines:
    Code:
                    usock = urllib2.urlopen(url)
                    xml = usock.read()
                    usock.close()
    Comment them out and add two new lines, as shown below:
    Code:
                    #usock = urllib2.urlopen(url)
                    #xml = usock.read()
                    #usock.close()
    		filetemp = open("~/Downloads/data.xml")
                    xml = filetemp.read()
    (Python is sensitive to indentation, so take care)
    Save the file, run conky.

    I am not sure why going via the browser can sometimes get a different result from the script.
    Here is a test to find whether your mission on earth is finished: If you're alive, it isn't.
    Richard Bach, Illusions

  2. #3532
    Join Date
    Mar 2008
    Location
    Here
    Beans
    Hidden!
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Conky Weather Forecast Python Script

    I think I have another workaround.

    Firstly, update your .conkyForecast.config file
    Code:
    EXPIRY_MINUTES = 180
    BASE_XOAP_URL = http://xml.weather.com/weather/local/<LOCATION>?cc=*&dayf=5&unit=m
    (30 min updates are simply too frequent, above URL is for Metric. Remove "&unit=m" for Imperial).
    Do not test the URL in the browser.

    Update your conkyrc file to enable info and error logging. e.g.
    Code:
    /usr/share/conkycolors/bin/conkyForecast --location=your-location-here -t /home/<name>/.conkycolors/templates/conkyForecast.template --infologfile=/home/<name>/cfInfo.log --errorlogfile=/home/<name>/cfError.log
    Your invocation might look slightly different, all I have added is "--infologfile=/home/<name>/cfInfo.log --errorlogfile=/home/<name>/cfError.log".

    Stop conky and start it again.
    Open both the log files in a text editor.
    Wait to see what happens.
    If you get weather, great!
    If not, check the error log for a "503" and check the URL used in the info log.
    If you do see a 503, try changing the value for days to something else (I found that 5 worked for me).
    Rinse and repeat until success.
    Here is a test to find whether your mission on earth is finished: If you're alive, it isn't.
    Richard Bach, Illusions

  3. #3533
    Join Date
    Aug 2009
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: Conky Weather Forecast Python Script

    Sweet! It is working for me so far with Another Monkey's changes (post #3532).
    I'll post back if it quits. Looks good so far though!

    Thanks!

  4. #3534

    Re: Conky Weather Forecast Python Script

    Quote Originally Posted by Habitual View Post
    modifications suggested in post http://ubuntuforums.org/showpost.php...postcount=3501 works here for the moment (Ohio, USA)
    Except for the 'hiccup' when I first run it, this tip/method/hack is still working here.

    conky rarely comes up blank...and if it does, it only means I have to restart it.
    Windows assumes the user is an idiot.
    Linux demands proof.

  5. #3535
    Join Date
    Aug 2009
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: Conky Weather Forecast Python Script

    Quote Originally Posted by Habitual View Post
    modifications suggested in post http://ubuntuforums.org/showpost.php...postcount=3501 works here for the moment (Ohio, USA)
    Quote Originally Posted by Habitual View Post
    Except for the 'hiccup' when I first run it, this tip/method/hack is still working here.

    conky rarely comes up blank...and if it does, it only means I have to restart it.

    That is ironic! I never tried restarting it when it came up blank and do not wish to go through that many hoops.
    But, Another Monkey's method (post #3532) works perfectly. I am also in the USA.
    Smoking!

  6. #3536
    Join Date
    Jun 2007
    Beans
    Hidden!

    Re: Conky Weather Forecast Python Script

    I dropped this http://xml.weather.com/weather/local...od=xoap&unit=m into my browser (I thinks its the same as another monkey's) Without my license key and it worked. I changed the days to four, same url with 10 days comes up 503.

    Changed the xoap url and commented out my key in my config and it worked. Although the browser reports an update time of 7:53am my conky reports 7:00am. Could be a cache expiry issue though. A force refresh, just a few minutes after produces no error. So what, they opened it up for us? but limited the forecast?

    On a side note some might be miffed that they haven't documented any of this. I think its fun to try and figure it out thou.
    Last edited by snkiz; December 11th, 2011 at 02:13 PM. Reason: More testing

  7. #3537
    Join Date
    Aug 2010
    Location
    Arizona USA
    Beans
    3,001
    Distro
    Ubuntu Development Release

    Re: Conky Weather Forecast Python Script

    Heh! Let sleeping dogs lay. It's over with...

    It's an unauthorized use of Weather.com networks and services.

    If you keep it up, they'll stick you in a FEMA Camp, or worse.
    Intel ® P4 Extreme Edition 3.4 (Gallatin) || DFI ® LanParty PRO875B rev B1
    Crucial ® Ballistix Tracer PC4000 1GB || Mountain Mods U2-UFO Opti-1203
    XFX 7600GT 560M AGP (PV-T73A-UDF3) || Corsair HX520W Modular PSU

  8. #3538
    Join Date
    Mar 2008
    Location
    Here
    Beans
    Hidden!
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Conky Weather Forecast Python Script

    Quote Originally Posted by VinDSL View Post
    It's an unauthorized use of Weather.com networks and services.

    If you keep it up, they'll stick you in a FEMA Camp, or worse.
    Unfortunately this is true - even modifying a URL can be considered illegal use of resources and lead to a court date or a suit for damages; even if one thinks one is doing it for a good reason and advises the people concerned of the vulnerability ASAP. As has happened in the UK and Australia at least once.

    I only use the basic weather features, so when I get time I'll probably switch to one of the new scripts.
    Last edited by Another Monkey; December 12th, 2011 at 11:27 AM.
    Here is a test to find whether your mission on earth is finished: If you're alive, it isn't.
    Richard Bach, Illusions

  9. #3539
    Join Date
    Jun 2007
    Beans
    Hidden!

    Re: Conky Weather Forecast Python Script

    Quote Originally Posted by VinDSL View Post
    Heh! Let sleeping dogs lay. It's over with...

    It's an unauthorized use of Weather.com networks and services.

    If you keep it up, they'll stick you in a FEMA Camp, or worse.
    I'd love to see them try! I'm Canadian so I don't really care about US law. How many millions in damages does getting weather updates cause? Besides I don't have anything to sue for, you can't get blood from a stone. and Canadians don't go to jail for owing money.

    So I removed the xoap part of the url. Now it's just an xml feed that does not require any registration what so ever. I don't subscribe to the myth that I agree to some obscure TOS just by hitting a page address that requires absolutely no authentication. They can shut it down at their whim, but they can't stop me from using it until they do.

    Also important to note most of the data comes from the NOAA free for all to use. They want to sue?
    Good Luck with that.
    Last edited by snkiz; December 12th, 2011 at 06:43 PM. Reason: More testing

  10. #3540
    Join Date
    Oct 2010
    Location
    The United States
    Beans
    843
    Distro
    Ubuntu

    Re: Conky Weather Forecast Python Script

    Quote Originally Posted by snkiz View Post
    I'd love to see them try! I'm Canadian so I don't really care about US law. How many millions in damages does getting weather updates cause? Besides I don't have anything to sue for, you can't get blood from a stone. and Canadians don't go to jail for owing money.
    It's just my opinion, but the above statement is self serving nonsense.
    Thank you,
    GG -----------

Page 354 of 380 FirstFirst ... 254304344352353354355356364 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •