Hi guys, sorry to bother with Yet Another weather question!
Now... i've got lynx installed into applications and so on.
Then i placed this: lynx -dump http://printer.wunderground.com/global/stations/94767.html|awk '/Cond/ && !/Fore/ {for (i=2; i<=10; i++) printf $i " " }''/Temp/{printf $2, ": "; for (i=3; i<=3; i++) printf $i " " }'
into the shell....
As a result.. i am getting in the box... only the word "conditions".... How can this be?
Thanks
dont use lynx... use this instead...
the current weather :
Code:
curl "http://weather.yahooapis.com/forecastrss?p=CAXX0301&u=c" | grep -E '(Current Conditions:|C<BR)' | sed -e 's/Current Conditions://' -e 's/<br \/>//' -e 's/<b>//' -e 's/<\/b>//' -e 's/<BR \/>//' -e 's/<description>//' -e 's/<\/description>//'
Code:
curl "http://weather.yahooapis.com/forecastrss?p=CAXX0301&u=c" | grep -e "Forecast:" -A 2 | tail -n 2 | sed -e 's/<br \/>//' -e 's/<BR \/>//' | sed "s/\(.*\)\.\ \(.*\)/\1\?\2/" | tr "?" "\n" | sed "s/High\:\ \(.*\)\ Low\:\ \(.*\)/\?H\: \1\ L\:\ \2/" | sed "s/\?\(.*\)/\\1/"
thats a really good video about the weather images if you want... really well explained
http://www.youtube.com/watch?v=uNFkW1lLxtU