Skip to content

Instantly share code, notes, and snippets.

@thinkerbot
Created December 14, 2011 17:53
Show Gist options
  • Save thinkerbot/1477669 to your computer and use it in GitHub Desktop.
Save thinkerbot/1477669 to your computer and use it in GitHub Desktop.
HTTP status cats
STATUS_CAT_URL="http://www.flickr.com/photos/girliemac/sets/72157628409467125"
curl "$STATUS_CAT_URL" |
grep 'class="photo_container' |
sed -e 's/.*\(src.*\)/\1/' -e 's/class.*//' -e 's/[[:alnum:]]\{1,\}=//g' -e 's/ \{1,\}/ /g' |
tr -d '"' |
cut -d ' ' -f 1,4 |
while read url code
do printf "$code $url\n"
done |
sed -e 's/_[ms]\.jpg$/\.jpg/' |
sort -u
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment