-
-
Save robwalkerco/81ea04284ad713888a077825e4bc1479 to your computer and use it in GitHub Desktop.
var paths = [] | |
var count = 1 | |
// Before running this script, you will need to scroll | |
// to the bottom of the zenfolio page to ensure all the | |
// images in the dom | |
function openAllPhotos() { | |
// Collect the paths for each photo | |
$('.pv-inner img:first-child').each((index, image) => { | |
paths.push(image.style.backgroundImage.split('"')[1]) | |
}) | |
// We set an increasing timeout for each photo so we | |
// dont hammer the servers too hard! | |
paths.forEach((path, index) => { | |
setTimeout(() => { | |
var element = document.createElement('a'); | |
element.setAttribute('href', path.replace(/-\d.jpg/, '-6.jpg')); | |
element.setAttribute('target', '_blank'); | |
element.style.display = 'none'; | |
document.body.appendChild(element); | |
element.click(); | |
document.body.removeChild(element); | |
}, count * 500) | |
count = count + 1 | |
}) | |
} | |
// Run the script! | |
openAllPhotos() |
This script has been uploaded, as it was no longer working.
The script will now open a new tab for each photo, displaying the best quality photo possible. You can then go through each tab and save as necessary.
(p.s. Please respect copyright etc)
Thanks for the original! I adapted it so it actually downloads the images again: https://gist.github.com/balbuf/83eede995eb4e07226a20e36a36c9c6f
Thanks for the original! I adapted it so it actually downloads the images again: https://gist.github.com/balbuf/83eede995eb4e07226a20e36a36c9c6f
it's very low resolution
Thanks for the original! I adapted it so it actually downloads the images again: https://gist.github.com/balbuf/83eede995eb4e07226a20e36a36c9c6f
it's very low resolution
I had to modify the regular expression from (/-\d.jpg/, '-6.jpg') to (/-\d+.jpg/, '-6.jpg') because my images had two digits (-11.jpg) in their file names. After the change, the correct images with the 1440px resolution were downloaded
Copy the above script to the developer console in Chrome and run to download all the photos 😄