~awn-extras/awn-extras/trunk

« back to all changes in this revision

Viewing changes to applets/maintained/weather/weather.py

  • Committer: Julien Lavergne
  • Date: 2012-04-28 13:40:44 UTC
  • Revision ID: gilir@ubuntu.com-20120428134044-s83s56ao1kn9gj5r
Fix weatcher.com address

Show diffs side-by-side

added added

removed removed

Lines of Context:
633
633
        @async_method
634
634
        @network_exception
635
635
        def get_locations(self, text):
636
 
            url = "http://xoap.weather.com/search/search?where=" + urllib2.quote(text)
 
636
            url = "http://xml.weather.com/search/search?where=" + urllib2.quote(text)
637
637
            with closing(urllib2.urlopen(url)) as usock:
638
638
                with unlink_xml(usock) as xmldoc:
639
639
                    locations_list = []
647
647
        @with_overlays
648
648
        @network_exception
649
649
        def get_conditions(self, location_code):
650
 
            url = "http://xoap.weather.com/weather/local/" + location_code + "?cc=*" + self.__ws_key
 
650
            url = "http://xml.weather.com/weather/local/" + location_code + "?cc=*" + self.__ws_key
651
651
            with closing(urllib2.urlopen(url)) as usock:
652
652
                with unlink_xml(usock) as xmldoc:
653
653
                    names = ['CITY', 'SUNRISE', 'SUNSET', 'DESCRIPTION', 'CODE', 'TEMP', 'FEELSLIKE', 'BAR', 'BARDESC', 'WINDSPEED', 'WINDGUST', 'WINDDIR', 'HUMIDITY', 'MOONPHASE']
679
679
        @with_overlays
680
680
        @network_exception
681
681
        def get_forecast(self, location_code):
682
 
            url = "http://xoap.weather.com/weather/local/" + location_code + "?dayf=5" + self.__ws_key
 
682
            url = "http://xml.weather.com/weather/local/" + location_code + "?dayf=5" + self.__ws_key
683
683
            with closing(urllib2.urlopen(url)) as usock:
684
684
                with unlink_xml(usock) as xmldoc:
685
685
                    try: