I would like to introduce an easy way to download lots of pictures from websites that name them sequentially, meaning they simply add a number and maybe some chars to every new picture added. Smugmug for instance uses one directory /photos/ on their website and puts all pictures, or at least links to them in that directory. All pictures look like number-M.jpg which makes it very easy to use a script to download all pictures within a certain range.
I'm going to use the Firefox extension Batch Download to download the pictures from a site like Smugmug. The CEO of Smugmug said that it was intended behavior that the private pictures at Smugmug were still publicly available which I do find a little bit odd but who am I to complain ?
Install the Batch Download Firefox extension and restart Firefox afterwards. Open the options of Batch Download afterwards, this can be done by right-clicking a blank space in Firefox and selecting Batch Download from the menu.
The Base Url is the url of the photo directory at Smugmug, in our case it is http://www.smugmug.com/photos/(*)-M.jpg. The Wildcard is the numeric part of each image that changes with each unique image. We define that part below. Since it consists only of numbers we use the numbers from 1 which would be the image 1-M.jpg to 10000 which would be image 10000-M.jpg.
Batch Download would now scan the directory photos at Smugmug for all images between 1-M.jpg and 10000-M.jpg, which means a total of 10000 images will be scanned. If an image is found it will be downloaded to the directory you specify at the bottom in the form entitled Download Folder.
The numbers that you enter are arbitrary. You could start by 10000 instead and end at 96000. It takes of course longer to download the images if you select huge numbers. This technique can be used for many different websites who save their images - or other files like videos - this way. It is furthermore possible to start over at a certain number where you stopped.
There are some ways of blocking Batch Download. The easiest way would be a referrer check which would ensure that only visitors from the same website would be allowed to download the files.Advertisement
Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.
We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats or subscription fees.
If you like our content, and would like to help, please consider making a contribution:
Ghacks is a technology news blog that was founded in 2005 by Martin Brinkmann. It has since then become one of the most popular tech news sites on the Internet with five authors and regular contributions from freelance writers.