Last active
November 11, 2016 19:40
-
-
Save shahinism/ad3dfbe0282e4ee1a186db96c408949c to your computer and use it in GitHub Desktop.
Download unsplash.com collections
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
#!/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