Skip to content

Instantly share code, notes, and snippets.

@kurosuke
Created June 12, 2012 01:39
Show Gist options
  • Save kurosuke/2913878 to your computer and use it in GitHub Desktop.
Save kurosuke/2913878 to your computer and use it in GitHub Desktop.
get Tokyo weather image file(png)
#!/bin/sh
#
# yahoo weather
#
# weather image
URL=`curl --silent "http://weather.yahoo.com/japan/tokyo-prefecture/tokyo-1118370/" | \
grep background:url | sed -e "s/.*background:url('//" -e 's/png.*/png/' | grep -v partner-logo`
curl --silent -o /tmp/weather.png $URL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment