Skip to content

Instantly share code, notes, and snippets.

// Navigate to https://facebook.com/MY_PROFILE/photos_of
// Paste this code, it will download each image and click "next" then download the next one
// The delays are to avoid being blocked by facebook
// If it hits an error you can restart by calling download(300) again (or whatever number)
async function downloadImage(imageSrc) {
const image = await fetch(imageSrc);
const imageBlog = await image.blob();
const imageURL = URL.createObjectURL(imageBlog);