Git Product home page Git Product logo

unsplash-album-downloader's Introduction

Unsplash Public Album Downloader

Using this script you will be able to download the entire album of a user (uploads, likes or collections) or a just collection (by specifying Collection-ID) in any size you like.

Dependencies

Make sure you have Python installed and PATH variable set.

Ubuntu

If you don't have pip for Python:

sudo apt-get install python-pip

You will need modules requests installed, which are in requirements.txt

pip install -r requirements.txt

Windows

Follow this guide to install pip and configure PATH variable. The rest is the same.

Using script

Before running the script, please assign a Application ID to APP_ID variable in the python script download_user_album.py. If you do not have one, you can create here. For downloading user albums, simply run:

python download_user_album.py [username] [albumtype] [size]

Username is mandatory and by default, if no flags are passed, the script will download all the uploads of the user (If any) in a regular size. To customize the nature of downloads, Please include following flags

albumtype takes the following values -

  • uploads to download all the photos uploaded by user

  • likes to download all the photos liked by user

  • collections to download all the collections of a user

  • all to download all of the above uploads, likes, collections

size takes the following values -

  • raw to download the raw size

  • full to download the full size

  • regular to download the regular size

  • small to download the small size

  • thumb to download the thumb size

Example :

python download_user_album.py likes small

downloads all photos liked by user in small size.

For downloading a particular collection, simply run

python download_collection_album.py [collection-id] [curated flag] [size]
  • collection-id is the id of the collection

  • size is similar to above and takes the same values

Please include a -c flag when it's a curated collection you are trying to download. For example,

python download_collection_album.py 160 -c full

downloads the collection with id #160 (which is a curated collection) in a full size. So, we have to include the -c flag.

app_id text file

You can also include the application ID in app_id.txt file. Make sure the file is in the same location as the above scripts.

Downloaded files

All the photos will be downloaded in a separate folder with the name of the user and the type of download you requested.

Example folder names:

  • yaswanth amara-unsplash-likes-full

  • Jakob Owens-unsplash-collection-Behind The Scenes-regular

Since there is a API limit for a public access application for Unsplash (50 requests per hour), if you are trying to download a large number of photos, you might want to run the same command again once you are out of requests. The above scripts will check the folder for the photos that were already downloaded and then will download ONLY the remaining photos.

Thanks

This program would not be possible without UNSPLASH and their awesome photographers.

I sincerely appreciate if you give necessary credit to the Photographers and Unsplash whenever you use their photos.

unsplash-album-downloader's People

Contributors

ki3n avatar mehulagg avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.