Automatically download all images from ShutterStock!

  • 05-05-2018
  • python
Thumb

Share:

https://techconductor.com/blogs/python/automatically_download_all_images_from_shutterstock.php

Copy


ShutterStock is a beautiful website with a massive collection of images, from different categories. To get the high resolution images you must signin. But we can easily get all the medium resolution images for free here how.

To automate the task of downloading all the images from a specific category or search result we need two things Python and BeautifulSoup.

Python:

To install python just go to python.org and download the latest version depending on your operating system.

BeautifulSoup:

To install BeautifulSoup package open a command window by Ctrl + T on Linux or search cmd on windows. Then type pip install beautifulsoup4 in the command window and press enter.

Make a new folder and name it images and create a file scrapper.py inside it. Now download the script from the git repo here. and copy all the code and paste it in the file you have created earlier.

Now if you are using windows Right click anywhere in the folder containing the file while pressing the Shift key and select open command window here from the pop up. For Linux users just use Ctrl + T in the folder.
Type python scrapper.py in the command window and press Enter.

python will run the script and download all the images from the link and will save all the images in the same folder.

You first search the topic of the image you want to download from ShutterStock and then copy the link of the second page of the search result and paste it in the variable url and make sure you remove the page number at the end, change the range of the first loop to the number of pages you want to download images from. Here is a snapshot of the images downloaded.