I got a request from a teacher who wanted to download a years worth of images from a Glow Blog (for end of year slideshow).

Although there are plugins that can do this these are not available on Glow Blogs. I was stumped apart from going through the site and downloading them 1 by 1. But after a wee bit of thinking I though I’d try using the REST API via AppleScript.

The REST API will list in JSON format the media:

http://johnjohnston.info/blog/wp-json/wp/v2/media/

Look at that in FireFox for a pretty view.

JSON Helper is

an agent (or scriptable background application) which allows you to do useful things with JSON directly from AppleScript.

So I can grab the list of media from a site in JSON format use appleScript to download all the files.

The script I wrote is not great, you can’t download from a particular year, but a quick look at the JSON will help in working out how many files to download.

I am sure there are more efficient ways to do this and I’ve only tested on a couple of site, but it seems to do the trick and might be useful again sometime.

Continue for the script: