Last active
August 29, 2015 14:00
-
-
Save RobK/3b227a1a5802f217595c to your computer and use it in GitHub Desktop.
Photobox-download Example
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
var photoBox = require('photobox-downloader'); | |
var config = { | |
"baseDomain" : "www.photobox.ie", | |
"authCookieValue" : "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" // change to your own auth cookie value | |
}; | |
// Login and download all photos from every album | |
photoBox.login(config, function (err) { | |
if (err) { | |
console.log('ERROR! Something went wrong logging in, check your authCookieValue!'); | |
console.log(err); | |
} else { | |
console.log('Logged into Photobox!'); | |
photoBox.downloadAll( | |
{ | |
showProgress : true, | |
outputDir : __dirname + '/out' | |
}, | |
function (err) { | |
if (err) { | |
console.log(err); | |
} else { | |
console.log('Finished, all photos downloaded (that was easy!)'); | |
} | |
} | |
); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment