A command-line utility to automate crawling through a photo album and downloading all images within the album on Facebook.
Supported sites:
Coming soon:
- Tumblr
- Flickr
Currently, there is no feature on Facebook to download all images in an album. Someone would have to go through each and every photo and download them one by one manually. I was required to download images a client had of their work from Facebook so that they could be uploaded on their site. So I created this project.
This command line tool will automatically crawl through a photo album and save all the images.
- PHP 5.4 or greater
- Composer
- Git
- cURL
- At the moment it is only available as a command line utility, but could be available either as a website anyone can use, or an self-hosted installable web application.
- Only Facebook is supported, but other sites will have support (see above for a list).
- This project will be split out into different packages.
- The installation process will be simplified by downloading a single packaged executable (PHAR).
$ git clone https://github.com/adamelso/albumgrab
$ curl -sS https://getcomposer.org/installer | php
$ php composer.phar install
Enter the Albumgrab directory
$ cd albumgrab
Then execute the app
$ bin/albumgrab download
You will then be prompted to provide the folder/directory name you want the images to be saved to, followed by the URL/link to first image in the album.
Please enter the name of the directory your images will be saved to:
images/summer-2014
Please enter the URL to the first image of the Facebook Photo Album you would like to download:
https://facebook.com/photo.php?fbid=11111&set=a.222.333.444
The crawler will look for a link labeled Next to find the next image.
If your Facebook is in another language, please run the command using
the -x
or --next
option, with the equivalent word for Next in
your language.
Example for Spanish:
$ bin/albumgrab download --next="Siguiente"
or
$ bin/albumgrab download -x Siguiente
Please use responsibly and at your own risk, as Facebook frown upon such tools.
3.2. You will not collect users' content or information, or otherwise access Facebook, using automated means (such as harvesting bots, robots, spiders, or scrapers) without our prior permission.