Skip to content

Instantly share code, notes, and snippets.

@ellisio
Created June 4, 2014 20:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ellisio/e0bddaf18be64391367b to your computer and use it in GitHub Desktop.
Save ellisio/e0bddaf18be64391367b to your computer and use it in GitHub Desktop.
Scan for iTunes album art sizes.
#!/bin/bash
rm -rf images
mkdir images
for i in {1..1024}
do
for x in {1..100}
do
echo "Checking ${i}x${i}-${x}"
CODE=`curl -o /dev/null --silent --head --write-out '%{http_code}' http://a4.mzstatic.com/us/r30/Music/v4/d7/b9/de/d7b9de4b-89c0-bd93-fa99-f5508a453af2/KatyPerryiTunes.${i}x${i}-${x}.jpg`
if [ $CODE == "200" ]; then
wget -O images/${i}x${i}-${x}.jpg http://a4.mzstatic.com/us/r30/Music/v4/d7/b9/de/d7b9de4b-89c0-bd93-fa99-f5508a453af2/KatyPerryiTunes.${i}x${i}-${x}.jpg
fi
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment