Made for Übersicht
![In action] (https://raw.githubusercontent.com/nickroberts/weather-widget/master/screenshot.png)
![Yahoo Icons] (https://raw.githubusercontent.com/nickroberts/weather-widget/master/yahooIcons.png)
![Original Icons] (https://raw.githubusercontent.com/nickroberts/weather-widget/master/originalIcons.png)
This uses the freegeoip.net api to obtain your location, and the Yahoo Weather api to obtain the weatehr information.
By default, this is dynamic, based on your location (via your current ip address).
If you want to make this static, you will need to edit some configurations in the weather.py
file.
- Replace
<city>
with your city, and<region>
with your region (state)
You should always set the city
and region
in the weather.py
file, as sometimes the geolocation doesn't work, or is down
- Comment out the dynamic section
- Uncomment out the dynamic section
Sometimes there is an issue with the urllib2
library requesting the url. If you receive an "HTTP version not supported" error (or any other one), you can use the python requests library:
- Install the requests library:
pip install requests
. - Comment out the
import urllib2
, along with the 2 lines whereurllib2.openurl
is used, also commenting out the top 2 exception handlers forurllib2
. - Uncomment the
import requests
line, along with the 2 spots it usesrequests.get
, and also the exception handler.
Original widget by the Übersicht team: https://github.com/felixhageloh/weather-widget