
data = _find ( 'uv', observation ) except Exception : # Don't let an uncaught exception kill the update thread self. data = _find ( 'humidity', observation ) self. data = _find ( 'v3-wx-observations-current:visibility', overview ) self. data = _find ( 'units:pressure', observation ) self. data = _find ( 'units:windGust', observation ) self. data = _find ( 'v3-wx-observations-current:windDirectionCardinal', overview ) self. data = _find ( 'units:windSpeed', observation ) self. data = _find ( 'units:dewpt', observation ) self. data = _find ( 'units:heatIndex', observation ) self. data = _find ( 'temperatureMax:0', forecast ) self. data = _find ( 'temperatureMin:0', forecast ) self. data = _find ( 'units:temp', observation, '0' ) self. data = _find ( 'v3-wx-observations-current:wxPhraseMedium', overview ) self.

data = _find ( 'v3-location-point:location:city', overview ) self. lower () pressure_trend = '+' if pressure_tendency = 'rising' else '-' self. code-block:: python from i3pystatus import Status from i3pystatus.weather import wunderground status = Status(logfile='/home/username/var/i3pystatus.log') status.register( 'weather', format='') try : ptr = ptr except ( KeyError, TypeError ): try : # Try list index int_item = int ( item ) except ( TypeError, ValueError ): return default else : if len ( item ) = len ( str ( int_item )): try : ptr = ptr continue except Inde圎rror : return default else : return default if ptr is None : return default return str ( ptr ) pressure_tendency = _find ( 'v3-wx-observations-current:pressureTendencyTrend', overview ). code-block:: text In this case, the weather station code would be ``KMACAMBR4``. The weather station code will now be the last part of the URL. Clicking on that station will take you back to the current conditions page. Clicking that link will display a map, where you can find the station closest to you. Below the city name you will see the station name, and to the right of that a ``CHANGE`` link. To find your weather station, first search for your city and click to view the current conditions. rubric:: Finding your weather station To use this module, you must provide a weather station code (as the ``location_code`` option). Weather Underground has since discontinued their API, and this module has been rewritten to reflect that.

note:: Previous versions of this module required an API key to work. Class Wunderground ( WeatherBackend ): ''' This module retrieves weather data from Weather Underground.
