Skip to content

Instantly share code, notes, and snippets.

@shahinism
Last active November 11, 2016 19:40
Show Gist options
  • Save shahinism/ad3dfbe0282e4ee1a186db96c408949c to your computer and use it in GitHub Desktop.
Save shahinism/ad3dfbe0282e4ee1a186db96c408949c to your computer and use it in GitHub Desktop.
Download unsplash.com collections
#!/bin/bash
# USAGE:
# Download insplash.sh
# chmod +x instplash.sh
# ./insplash.sh COLLECTION_URL
# ./insplash.sh https://unsplash.com/collections/279087/weather-and-sky
PATTERN='http:\/\/unsplash.com\/photos\/[[:alnum:]]*\/download'
COUNT=1
curl -s $1 | grep -o $PATTERN | while read -r LINK; do
aria2c -x16 -o "image.${COUNT}.jpeg" $LINK
(( COUNT++ ))
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment