Skip to content

Instantly share code, notes, and snippets.

@sillage
Created May 24, 2013 23:35
Show Gist options
  • Save sillage/5647220 to your computer and use it in GitHub Desktop.
Save sillage/5647220 to your computer and use it in GitHub Desktop.
Get all Magic card pictures from gatherer.wizards.com (format:number-title.jpg)
#!/bin/sh
for n in {1..4980}
do curl -s "http://gatherer.wizards.com/Handlers/Image.ashx?multiverseid=${n}&type=card" > "${n}-$(hxextract title http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=$n | grep -v title | sed 's/^.\(.*\).\{35\}$/\1/').jpg"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment