Skip to content

Instantly share code, notes, and snippets.

@rrader
Created November 18, 2013 14:27
Show Gist options
  • Save rrader/7528628 to your computer and use it in GitHub Desktop.
Save rrader/7528628 to your computer and use it in GitHub Desktop.
download photos from wwii-photos-maps.com
IFS=$'\n'
BASE="http://www.wwii-photos-maps.com/kievaerialscans/GX3938SG%282%29-260943/"
index=1
for x in `curl "$BASE/index.html" 2>/dev/null | grep -io 'slides/.*html'`; do
for img in $(curl -L `echo "${BASE}${x}" | sed 's/ /%20/'` 2>/dev/null | grep -ioP 'src=".*?jpg"' | grep -v thumbs | sed -r "s/src=\"(.*)\"/\1/g"); do
curl "$BASE/slides/$img" > "$index-$img"
index=$((index+1))
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment