Skip to content

Instantly share code, notes, and snippets.

@prehensile
Last active August 3, 2023 14:54
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prehensile/ce9f60e1aa75fe4bc22e1b61afbcdc02 to your computer and use it in GitHub Desktop.
Save prehensile/ce9f60e1aa75fe4bc22e1b61afbcdc02 to your computer and use it in GitHub Desktop.
Userscript and instructions for downloading images from a ParentZone gallery

Hello! Presumbably you're reading this because you'd like to download all of the photos from your ParentZone gallery. Good! I've worked out the following process, and it seems to work (as far as I can tell. I'm currently in a little house on the edge of the Lake District and getting internet through my phone).

We're going to work on a PC or Mac (an actual computer, not a phone - sorry), and we're going to add two extensions to your web browser. One adds a list of photo links to the ParentZone gallery page, and the other bulk downloads all the photos in that list. This should work in Chrome or Firefox - I have no idea how to do it in Internet Explorer or Edge or whatever it is that Windows does for web browsing by itself these days.

If this is all starting to sound technical and arcane, don't worry! It's actually pretty straightforward - look below 👀, there's like three steps. You could also always just go and find a nerd at this point, or you could send me a Whatsapp message or whatever if you need some help - although I can't promise to answer immediately, since we're away visiting family at the moment.

Step 1: Installing the browser extensions

  • Install TamperMonkey. Despite the stupid name, this isn't going to do anything terrifying to your browser. Neither I, nor Russian hackers will be stealing your credit card details, I promise. This is the extension which will generate the image lists in the gallery.
  • Install DownThemAll. This extension does the batch downloading of the image list generated by TamperMonkey.

Don't forget to remove these extensions when you're done.

Step 2: Install the gallery image link generator script

This script (which I wrote on a Friday night on holiday, becuase I am cool) will generate the list of gallery images.

  • The TamperMonkey extension should have added a little icon that looks like two little circles at the bottom of a square to your browser window, to the right of the address bar. Click that, then Dashboard in the menu that pops up.
  • In the Dashboard window that appears, click the Utilities tab, then look for Install from URL. Copy and paste the following URL into the text box next to that heading, then click Install.

https://gist.github.com/prehensile/ce9f60e1aa75fe4bc22e1b61afbcdc02/raw/1b90e206cfe6f0bacfbb98f5e66852ecf76da809/GenerateParentzoneGalleryImageLinks.user.js

  • On the next screen that appears, there's another Install button to press.

That's it! The script should now be installed.

Step 3: Download the images

We're nearly there, team. Told you it wasn't so hard!

  • Go to parentzone.me/gallery/. You might need to login. I can't help with forgotten passwords 🙃.
  • Once the Gallery has loaded, you should see an ugly list of image links appear at the top of the page. This has been inserted by the script we installed in Step 2. Now there's a list of images on the page, we can use DownThemAll to, er, download them all.
  • The DownThemAll extension should have added a little blue and yellow arrow icon to your browser window, next to the TamperMonkey icon. Click this, then click DownThemAll! in the menu that pops up.
  • The DownThemAll window should appear, with the Links tab selected. By default, it should select all of the photo links that the TamperMonkey script generated. In our case, there's 926 of them!
  • Click the Download button. You should see a big queue of files appear, and some green progress bars appear as DownThemAll starts to download the images.

That's it! I've tested it on a few images here, and it seems to work fine. I haven't tested it on all 926 yet - that can wait 'til I get to a proper internet connection.

Step 4: Remove the extensions

Once you've downloaded the photos, you don't need TamperMonkey and DownThemAll any more (and you probably don't want the ugly list of links appearing in the ParentZone gallery any more). Right click the icons in your browser and select Remove extension.

Hope it works for you! Send me a WhatsApp message if you get stuck.

@TeeeeLS
Copy link

TeeeeLS commented Aug 25, 2021

This is great, thank you!

But for lots of people I've shared this with it doesn't work because Chrome loads https://www.parentzone.me/gallery and not the URL without the www that you have in your script. This means that Tampermonkey doesn't do it's job for them.

@prehensile
Copy link
Author

@TeeeeLS oh, thanks for the tip! I've updated the script so it now should work on either URL. Unfortunately I no longer have a ParentZone account to test it with 🙃

@chris-fifo
Copy link

Thanks for this, still working perfectly. Just downloaded 994 photos.

@johnpcampbell
Copy link

johnpcampbell commented Aug 12, 2022

Cheers, worked for me after i added a trailing slash on line 7 - https://parentzone.me/gallery/

4307 photos downloaded!

@badkill23
Copy link

Hello! Is there something similar for WhatsApp web? I need to download all the images received in this chat from a conversation. Could you help me with this?

@arturboszczyk
Copy link

instead of the random file names, it would be useful to have the dates when the picture was taken. To accomplish that replace some code with the code below:
.....
var d =item["updated"];
d=d.replace('T', ' ').replaceAll(':', '.');

....
hrefTag.innerHTML =d.toString() + '.jpg'
...

Then you can run following commands in COMMAND PROMPT (but first go to folder by typing 'cd C:\xxxxxx\xxxxx')
exiftool "-datetimeoriginal<filename" .
and later:
exiftool "-FileName<DateTimeOriginal" -d "IMG_%Y%m%d_%H%M%S.%%e" .

and you would end up with files named like IMG_20200106_135301.jpg with EXIF data being set in the file, so you can drop them into Google Photos and they will show in the correct place when these photos were taken, not when uploaded into Google Photos.

Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment