Fork me on GitHub


Downloading Reddit Images in Bulk

January 29, 2019

several images loor nicolas

Illustration by loornicolas

There are some cool wallpapers on r/wallpapers. Earlier this year, I started saving them on a folder on my computer in order to display them on my desktop in a random fashion.

This picking and downloading process was kind of tedious, so I’ve built a small Node.js program to automate it.

πŸŒ„ The program is available here.

The way it works is very simple: It grabs the URL of the specified subreddit, adds some user defined variables and fetches it adding a .json extension.

It’s so nice of Reddit to make things so easy by exposing the whole content of any page in JSON form by just adding a .json extension. E.G., returns a normal page but returns the whole content in JSON form.

After that, it is just a matter of finding and filtering the image URL in the JSON content and downloading it.

Jon Portella

Written by Jon Portella.
Twitter GitHub LinkedIn