• Descent 298 publication date

    Our June/July issue will be published on Saturday 8 June

    Now with four extra pages as standard. If you want to receive it as part of your subscription, make sure you sign up or renew by Monday 27 May.

    Click here for more

photobucket album download for geeks

Recently someone sent me a link to their photo album hosted on photobucket. As there were over a hundred photos I wrote a script to do the job.

Here is a link to the script photobucket_download.py

It can run in two modes depending on whether you give a password

Code:
python photobucket_dowmload.py albumurl password directoryname
or

Code:
python photobucket_download.py albumurl directoryname

A real example off ukcaving
Code:
python python_src/photobucket_download.py http://i245.photobucket.com/albums/gg44/highpeak/ highpeak
The last '/' in the album url is needed (because I add ?start=all to the url to view all the photos in the album in one web page)

It downloads 100s of images into highpeak sub-directory of the current directory

This takes ages and is not a good idea. I also made the mistake of trying it on the old ruminators photo album but that has even more photos which are even more diverse. A smaller example album would be useful

It uses various python modules (mechanize, urllib, ..) which must be installed for the script to be used.

The password version is slower as it downloads the web page several times because it needs to submit the loginform first.

Once it has a thumbnail view of the photos it scrapes the urls of the thumbnails from the web page - the actual high resolution urls are easily determined from the thumbnail url.

Sadly photobuckets password protection for an album is little protection as the site does not  support https: and so the password is
sent unencrypted!?! As are all the photos that are downloaded!?! Beware!
 
I have written a new related python script for downloading all the photo collections from a photobucket account.

The previous script only downloads the photos from a single album - whereas the new script can download a complete sub-tree from a users
photobucket account. i.e. it downloads all the photos and sub-folders recursively.

The new python script has now seen action downloading sheep2405's photo collection. This took ages
and the script needed resuming several times (I need to work out why). However it downloaded
240MBytes of photos successfully.

The script is here

The script logs in to www.photobucket.com and so requires a userid or user-email plus a password to identify an account

It also requires the url of the photoalbum in the tree to download from (this allows a halted run to be resumed)
plus a path on you local computer in which to download the photos

python photobucket_dump.py albumurl useremail password directory
 
Top