Created
December 13, 2016 03:36
-
-
Save etra0/56747dce568852f29a648f56b33fb8c2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
url=$1 | |
album_id="${url##*/}" | |
json_data="`curl -s http://imgur.com/ajaxalbums/getimages/$album_id/hit.json`" | |
for line in $json_data; do | |
image_id="`echo $line | grep -o '"hash":"[A-Za-z0-9]*"' | perl -pe 's/"hash":"(.*)"/$1/g'`" | |
if [ ! -z $image_id ]; then | |
wget "i.imgur.com/$image_id.jpg" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment