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

FreemanW

macrumors 6502
Original poster
Sep 10, 2012
483
93
The Real Northern California
Title says it all.

My GeekTool weather scripts, specifically, "Current Conditions" along with the PNG file grab and the "Four-day Forecast" have gone AWOL.

Everything was fine, it was working, then there was a day or maybe two where it looked as though it was pulling forecast information for somewhere else, the highs, lows, and weather were off from what the National Weather Service forecasts were. Then, finally, nothing. Just gone.

Does anyone have any information or resolution for this issue?

Here is the curl code that I've been using, location is Mount Shasta, CA

Weather Image Grab =
curl --silent "https://uk.weather.yahoo.com/23424977/california/mount-shasta-2455436/" | grep "current-weather" | sed "s/.*background\:url(\'\(.*\)\') .*/\1/" | xargs curl --silent -o /tmp/weather1.png\

Current Conditions =
curl --silent "http://xml.weather.yahoo.com/forecastrss?p=USCA0741&u=f" | grep -E '(Current Conditions:|F<BR)' | sed -e 's/Current Conditions://' -e 's/<br \/>//' -e 's/<b>//' -e 's/<\/b>//' -e 's/<BR \/>//' -e 's/<description>//' -e 's/<\/description>//'

Four Day Forecast =
curl --silent "http://xml.weather.yahoo.com/forecastrss?p=USCA0741&u=f" | grep -E '(High:)' | sed -e 's/<BR \/>//' -e 's/<b>//' -e 's/<\/b>//' -e 's/<BR \/>//' -e 's/<br \/>//'

[edit] The smilie after 'High' is actually a colon and close parenthesis.
 
Last edited:

miK.

macrumors 6502
Mar 13, 2008
261
21
This thread may be of some help:
https://forum.rainmeter.net/viewtopic.php?f=13&t=23010&sid=4aaccd03b6a6795bb8227936f4ec0263

I totally abandoned Yahoo for weather info a while back. I use the below accuweather settings to get my attached look. I don't use a forecast geeklet, though.

Current Conditions:
curl --silent "http://www.accuweather.com/en/us/albany-ny/12208/weather-forecast/4543_pc" | awk -F\' '/acm_RecentLocationsCarousel.push/{print$14", "$10"°" }'| head -1
(use link with your city at the http)

Weather Image Grab:

curl --silent "http://www.accuweather.com/en/us/albany-ny/12208/current-weather/4543_pc" | grep -o 'http://vortex.accuweather.com/adc2010/images/icons-numbered/[0-9][0-9]-xl.png' | xargs curl -o /tmp/weather.png
(use link with your city at the http)

Screen shot 2016-04-24 at 8.14.14 PM.png
 
Last edited:

FreemanW

macrumors 6502
Original poster
Sep 10, 2012
483
93
The Real Northern California
This thread may be of some help:
https://forum.rainmeter.net/viewtopic.php?f=13&t=23010&sid=4aaccd03b6a6795bb8227936f4ec0263

I totally abandoned Yahoo for weather info a while back. I use the below accuweather settings to get my attached look. I don't use a forecast geeklet, though.

Current Conditions:
curl --silent "http://www.accuweather.com/en/us/albany-ny/12208/weather-forecast/4543_pc" | awk -F\' '/acm_RecentLocationsCarousel.push/{print$14", "$10"°" }'| head -1
(copy link with your city at the http)

Weather Image Grab:

curl --silent "http://www.accuweather.com/en/us/albany-ny/12208/current-weather/4543_pc" | grep -o 'http://vortex.accuweather.com/adc2010/images/icons-numbered/[0-9][0-9]-xl.png' | xargs curl -o /tmp/weather.png
(copy link with your city at the http)

View attachment 628498

Thank you!

I will check this link out and utilize the information you've graciously provided.
 

AZhappyjack

macrumors G3
Jul 3, 2011
9,681
22,826
Happy Jack, AZ
This thread may be of some help:
https://forum.rainmeter.net/viewtopic.php?f=13&t=23010&sid=4aaccd03b6a6795bb8227936f4ec0263

I totally abandoned Yahoo for weather info a while back. I use the below accuweather settings to get my attached look. I don't use a forecast geeklet, though.

Current Conditions:
curl --silent "http://www.accuweather.com/en/us/albany-ny/12208/weather-forecast/4543_pc" | awk -F\' '/acm_RecentLocationsCarousel.push/{print$14", "$10"°" }'| head -1
(copy link with your city at the http)

Weather Image Grab:

curl --silent "http://www.accuweather.com/en/us/albany-ny/12208/current-weather/4543_pc" | grep -o 'http://vortex.accuweather.com/adc2010/images/icons-numbered/[0-9][0-9]-xl.png' | xargs curl -o /tmp/weather.png
(copy link with your city at the http)

View attachment 628498

Great info... thanks. A minor tweak to replace Albany with my location and I am golden.
 
  • Like
Reactions: miK.

bluereef

macrumors member
Jan 29, 2012
33
0

AZhappyjack

macrumors G3
Jul 3, 2011
9,681
22,826
Happy Jack, AZ
[doublepost=1461720698][/doublepost]dwfaust, can't get the image to work,... using:

curl --silent "http://www.accuweather.com/en/us/rio-ranchoa-nm/87124/weather-forecast/37157_pc" | grep -o 'http://vortex.accuweather.com/adc2010/images/icons-numbered/[0-9][0-9]-xl.png' | xargs curl -o /tmp/weather.png

also do you have a 3- 4 day forecast with image??

The command that you quoted simply captures the image and stores it locally at tmp/weather.png.

You need to add an IMAGE applet with the URL of file:///tmp/weather.png, which will actually display the image.
 

bluereef

macrumors member
Jan 29, 2012
33
0
The command that you quoted simply captures the image and stores it locally at tmp/weather.png.

You need to add an IMAGE applet with the URL of file:///tmp/weather.png, which will actually display the image.
[doublepost=1461756764][/doublepost]Thanks, it worked fine.

Can the icons be changed to a flat weather icon that I used before with Yahoo???

I have the png files on my laptop.

I have been running a apple script for the 2 day forecast but since Yahoo weather has shut down, I am kind of lost on how to get my 2 day forecast back and the icons...along with current wind chill humidity. I can post the scripts if you think you can help us??

Thanks again for your time.
 
Last edited:

AZhappyjack

macrumors G3
Jul 3, 2011
9,681
22,826
Happy Jack, AZ
[doublepost=1461756764][/doublepost]Thanks, it worked fine.

Can the icons be changed to a flat weather icon that I used before with Yahoo???

I have the png files on my laptop.

I have been running a apple script for the 2 day forecast but since Yahoo weather has shut down, I am kind of lost on how to get my 2 day forecast back and the icons...along with current wind chill humidity. I can post the scripts if you think you can help us??

Thanks again for your time.

I am sure all of that is possible, but I am not sure how to do it. The script shown uses the images stored on the Accuweather site and references them with the appropriate "current conditions" indicator. You would need to know what that indicator is on the Accuweather site, and be able to translate that to match the image file name for the appropriate that you have stored locally.

As for the 2 day forecast, again, it can probably be done, but not sure how, as the data to build that 2 day forecast would have to be built from different areas of the Accuweather page.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.