Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

yetiboy

macrumors member
Original poster
Mar 23, 2011
35
0
I'm sure this will come as a shock, but the script for Yahoo Weather image is once again not working. I just don't know if it's an issue with Yahoo or it's because I just had to restore my computer and there's something wrong with my setup, script, etc. I've tried every possible incarnation of the script but there's nothing being saved no matter where I try to save the file, so I'm assuming it's an issue with Yahoo. Anyone else having the problem and/or have a solution?

yeti

edit: The title should be Yahoo Weather IMAGE, not icon - realized it too late and I'm not able to edit it.
 
Last edited:

yetiboy

macrumors member
Original poster
Mar 23, 2011
35
0
Problem solved. Turns out Yahoo has changed from http:// to https:// Hope that helps someone.

yeti
 

yetiboy

macrumors member
Original poster
Mar 23, 2011
35
0
This should work. Make sure you put in the path to your weather image.

Code:
curl --silent "https://uk.weather.yahoo.com/england/oxfordshire/oxford-31278/" | grep "current-weather" | sed "s/.*background\:url.'//g" | sed "s/'. no.*.//g" | xargs curl --silent -o /Path/to/weather/image/weather.png

yeti
 

bhtwo

macrumors 65816
Dec 31, 2012
1,188
1,431
Oxford UK
Thanks yetiboy... still can't get it to work, probably operator error.

I'll keep trying.

Ta.
 

yetiboy

macrumors member
Original poster
Mar 23, 2011
35
0
I'm able to get it to work for me using your location, so there must be something you're missing on your end, you're right.

Try, just as a test, to see if you can get the image to download to your Desktop - change the file location to /Users/yourusername/Desktop/weather.png and see what happens - it could be a problem with the location you've chosen. You can also try testing it out in Terminal using the exact same code to see what happens.

And, just to make sure - you're using 2 geeklets for this, right? This script will only download the image to your computer, you also have to set up an image geeklet and point it to the location of the downloaded image.

yeti
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.