[phpBB Debug] PHP Notice: in file /viewtopic.php on line 981: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 981: getdate(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead
Tynsoe Projects • View topic - Yahoo Weather Problem

Yahoo Weather Problem

Yahoo Weather Problem

Postby Sonic-Y3k » Thu Jul 22, 2010 7:37 pm

Hi,
I got some Yahoo weather script working but a month ago, at least i think, it stopped working. Maybe you can help me.

Air pressure:
Code: Select all
curl --silent "http://de.weather.yahoo.com/deutschland/freie-und-hansestadt-hamburg/hamburg-20065879/" | grep -E '(<dt>Luftdruck:</dt><dd style="position:relative;">|<\/dd><dt>)' |  sed 's/^[ \t]*//;s/[ \t]*$//' | sed -e 's/<dt>Luftdruck:<\/dt><dd style="position:relative;">//' -e 's/<\/dd>//' |  tail -n1


Humidity:
Code: Select all
luft=`curl --silent "http://de.weather.yahoo.com/deutschland/freie-und-hansestadt-hamburg/hamburg-20065879/" | grep -E '(<dt>Luftfeuchtigkeit:<\/dt><dd>|<\/dd><dt>)' |  sed 's/^[ \t]*//;s/[ \t]*$//' | sed -e 's/<dt>Luftfeuchtigkeit:<\/dt><dd>//' -e 's/<\/dd>//' |  tail -n1`

echo "$luft Luftfeuchtigkeit" | perl -pi -e 's/\r//g'


Wind:
Code: Select all
curl --silent "http://de.weather.yahoo.com/deutschland/freie-und-hansestadt-hamburg/hamburg-20065879/" | grep -E '(<dt>Wind:<\/dt><dd>|<\/dd><dt>)' |  sed 's/^[ \t]*//;s/[ \t]*$//' | sed -e 's/<dt>Wind:<\/dt><dd>//' -e 's/<\/dd>//' |  tail -n1


The result of all of them is:
Code: Select all
</script></div><div></div><div id="yw-forecast" ><em>Aktuelles Wetter: 19h50 Uhr CEST</em><div id="yw-cond">Heiter</div><dl><dt>Gefühlte Temperatur:</dt><dd>22 &deg;C<dt>Luftdruck:</dt><dd style="position:relative;">982,05 mb und gleichbleibend</dd><dt>Luftfeuchtigkeit:</dt><dd>60 %</dd><dt>Sichtweite:</dt><dd>9,99 km</dd><dt>Taupunkt:</dt><dd>14 &#176;C</dd>W</dd><dt>Sonnenaufgang:</dt><dd>5h19 Uhr</dd><dt>Sonnenuntergang:</dt><dd>21h33 Uhr</dd></dl><div class="forecast-temp"><div id="yw-temp">22&#176;</div><p>Max: 24&#176; Min: 16&#176;</p><ul><li>&raquo; <a class=action href="/climo/GMXX2496_c.html?woeid=20065879">Durchschnittliche Höchst- und Tiefstwerte</a><li>&raquo; <a class="action" href="http://us.rd.yahoo.com/evt=37752/*http://widgets.yahoo.com/widgets/yahoo-weather">Yahoo! Wetter auf Ihrem Desktop-PC anzeigen</a></li></ul></div><div class="forecast-icon" style="background:url('http://l.yimg.com/a/i/us/nws/weather/gr/34d.png'); _background-image/* */: none; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://l.yimg.com/a/i/us/nws/weather/gr/34d.png', sizingMethod='crop'); "></div></div>


Thank you!
Sonic-Y3k
 
Posts: 1
Joined: Thu Jul 22, 2010 7:30 pm

Re: Yahoo Weather Problem

Postby ybizeul » Fri Jul 23, 2010 8:28 am

It looks like yahoo changed the formatting of this page, you need to adapt the script or find one that matches the current design.
ybizeul
Site Admin
 
Posts: 133
Joined: Fri Jan 22, 2010 4:34 pm


Return to GeekTool

Who is online

Users browsing this forum: No registered users and 7 guests

cron