You have to use certain Yahoo urls for this shell script to work the url you need is below. Like I said before, the script is looking for "forecast-icon" before it does the regular expressions, if it cannot find that, the script won't progress further.
Code:http://weather.yahoo.com/england/greater-london/london-44418/?unit=c
The full shell script for you would be the following:
Code:curl --silent http://weather.yahoo.com/england/greater-london/london-44418/?unit=c | grep "forecast-icon" | sed "s/.*background\\:url(\\'\\(.*\\)\\')\\;\\ _background.*/\\1/" | xargs curl --silent -o /tmp/weather.png
I'm slowly working on an ultimate weather script that will have the option of downloading the weather image. I don't have an ETA on the script though.
Thanks a lot for your help, it's all working perfectly now....Really appreciate it!