From 3c955ac8977f46a9306aaae0f996a3130099b5b0 Mon Sep 17 00:00:00 2001 From: Erik Johnson Date: Mon, 14 Mar 2016 01:50:05 -0500 Subject: [PATCH] Use ob_url instead of forecast_url, it is more accurate --- i3pystatus/wunderground.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/i3pystatus/wunderground.py b/i3pystatus/wunderground.py index 8a9b941..2edd8b5 100644 --- a/i3pystatus/wunderground.py +++ b/i3pystatus/wunderground.py @@ -158,7 +158,7 @@ class Wunderground(IntervalModule): query_url = STATION_LOOKUP_URL % (self.api_key, self.station_id) try: response = self.api_request(query_url)['current_observation'] - self.forecast_url = response.pop('forecast_url', None) + self.forecast_url = response.pop('ob_url', None) except KeyError: raise Exception('No weather data found for %s' % self.station_id) @@ -181,7 +181,6 @@ class Wunderground(IntervalModule): observation_time = 0 return dict( - forecast_url=_find('forecast_url'), city=_find('city', response['observation_location']), condition=_find('weather'), observation_time=datetime.fromtimestamp(observation_time),