Download photo albums from photobucket without watermark

Photobucket is a well-known photographs stored website for us. But It's so hard for us to download and share your images to blog,websites.
It's time for you to download all your photos from photobucket without watermark.
1. Get images direct links.
Get image link
Save the link list to a text file called photobucket_links.txt
2. Download your photos
Run the following script in your non-Windows OS PC

cd ~/Desktop/photobucket
cut -d\/ -f 7 photobucket_files.txt | grep "\." | while read file; do grep "${file}$" photobucket_files.txt; done | while read file; do curl -O --referer "http://s.photobucket.com/" ${file}; done
cut -d\/ -f 7 photobucket_files.txt | grep -v "\." | sort -u | while read dir; do mkdir ${dir}; cd ${dir}; grep "/${dir}/" ../photobucket_files.txt | while read file; do curl -O --referer "http://s.photobucket.com/" ${file}; done; cd -; done

3. Upload your photos to other photo sharing website: google drive, one drive, amazon cloud...
You can get more details on github: https://gist.github.com/philipjewell/a9e1eae2d999a2529a08c15b06deb13d