⚠️ 2021 notice: It's completely idiotic to use PHP for this task, but as you can see it works lol
This is a simple PHP script to download an entire Reddit subreddit for archiving / data hoarding purposes. The script makes heavy use of Pushift.io (API). youtube-dl does the video downloads.
It's intended to be used on a windows machine and for rather small subreddits.
- Posts as JSON
- Reddit media attached to posts (Images (i.redd.it), Videos (v.redd.it))
- Comments as JSON
- Put the
dl.php
on your PHP-enabled webserver - Edit the config variables in
dl.php
- Open
dl.php
in a browser
F:\reddit-dl\2019-09-30 db8evj
│ image.jpg
│ post.json
│
└──comments
f1z4o5p.json
f1z5830.json
f1z9zdu.json
f1zbonk.json
f1zsw8u.json
f218hsx.json
f21xct1.json
f286m6f.json
F:\reddit-dl\2019-09-30 dbbfoc
post.json
F:\reddit-dl\2019-09-30 dbhw4z
│ post.json
│
└──comments
f221fxt.json
f236hxd.json
f23dzkv.json
f23hcz9.json
f23om96.json
f243auk.json
f245zju.json