Created
November 23, 2014 15:56
-
-
Save sashazykov/1372302fb6f6112c855e to your computer and use it in GitHub Desktop.
Download originals of all photos in a flickr photo set
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1. Open a photo set | |
// 2. Scroll to the bottom to see all photos | |
// 3. Run this script in javascript console | |
// => you will see all links to original files (now you can download it using DownThemAll!) | |
var jq = document.createElement('script'); | |
jq.src = "//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"; | |
document.getElementsByTagName('head')[0].appendChild(jq); | |
photos = $('.photo-click'); | |
$('body').html(''); | |
for (var i = 0; i < photos.length; i++) { | |
_url = $(photos[i]).attr('href').split('/') | |
url = 'https://secure.flickr.com/photos/'+_url[2]+'/'+_url[3]+'/sizes/o/' | |
// https://secure.flickr.com/photos/infanticida/14216232047/sizes/o/ | |
$.get(url, function (data) { | |
$('body').append('<a href="'+$(data).find('#allsizes-photo img').attr('src')+'">'+$(data).find('#allsizes-photo img').attr('src')+'</a><br />'); | |
}) | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment