unsplash.com image downloader
This little Python script allows you to download the fine public domain images from http://unsplash.com
This will not download images that already exist locally, thus making it possible to run this from a cron job.
author - jmorris1501
You can use pip/PyPI, which will automatically resolve all dependencies:
pip install unsplash-download
To install unsplash-download you can also clone the repo and install it via setup.py:
git clone https://github.com/mkzero/unsplash-download python setup.py install
After that you should be able to use the unsplash_download command from your command line.
The featured collections can be retrieved using
‘unsplash_download [output_location_of_choice] [‘collections’ by default, this is optional] [starting index, featured collections start at ‘1’] [end index, currently ‘126’ as of 28 October 2016, this will change over time]’
unsplash_download /unsplash_output 1 126
The other collections should be able to be retrieved using minimum index greater than 126, and a maximum index of something around 270000.
It should be noted that not every index is used, which is why the script doesn’t exit on each html error.
Also, 270000 is close to the maximum encountered index, so if a higher index is found, use that in your command.
It should be noted that these images are not small when downloaded in large batches (the 116 featured collections are 3.14GB altogether), so rather run the index range as that of 50 or 100, for example:
‘unsplash_download <output_location_of_choice> 150 250’
This is especially important if you are running on a weaker or intermittant internet connection.