2 Commits 98b8148f35 ... 629609decd

Author SHA1 Message Date
  Storm dragon 629609decd Merge branch 'master' of https://notabug.org/stormdragon2976/talking-clock 8 years ago
  Storm dragon 1fe52f1da7 Yahoo weather api went stupid. Sorry if this screwes over your temperature alerts, but I had to switch away from it. Now using weatherunderground. 8 years ago
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/talking-clock

+ 2 - 2
src/talking-clock

@@ -359,9 +359,9 @@ if [ "$speakTime" == "true" ] ; then
     #Add temperature if zipcode is set
     if [ -n "$zipcode" ] ; then
        if [ "$torify" == "true" ] ; then 
-            temperature="$(torify curl -s "http://weather.yahooapis.com/forecastrss?p=${zipcode}&u=f" | grep -A 1 "Current Conditions:" | tr -Cd '[:digit:]-')"
+            temperature="$(torify curl -s "http://mobile.wunderground.com/cgi-bin/findweather/getForecast?brand=mobile&query=${zipcode}" | grep -A 2 '<tr><td>Temperature</td>' | tr -cd '[:digit:]-.' | cut -d . -f1)"
         else
-            temperature="$(curl -s "http://weather.yahooapis.com/forecastrss?p=${zipcode}&u=f" | grep -A 1 "Current Conditions:" | tr -Cd '[:digit:]-')"
+            temperature="$(curl -s "http://mobile.wunderground.com/cgi-bin/findweather/getForecast?brand=mobile&query=${zipcode}" | grep -A 2 '<tr><td>Temperature</td>' | tr -cd '[:digit:]-.' | cut -d . -f1)"
         fi
         if [ -n "$temperature" ] ; then
             if [ "$format" = "24" ]; then