mysteryengineer / reddit-downloader

Download all the pictures/videos posts from a particular user on Reddit.
MIT License
32 stars 1 forks source link
docker ffmpeg go linux macos reddit windows yt-dlp

Reddit Downloader

Download all the pictures/videos posts from a particular user on Reddit. It also removes duplicates and convert files to better formats, with higher image quality and smaller file sizes.

✨ Works with new Reddit API restrictions of July 1st 2023!

πŸŽ₯ Demo

asciicast

πŸ–ΌοΈ Usage

There are 2 ways to use this app: through the CLI tool or using Docker. Here are some points to consider to help you choose which solution is best for you:

  1. CLI tool: this is quick and easier way to use reddit-dl however you must make sure that you have some dependencies installed in your computer before using it.

    • Dependencies: Install yt-dlp (required) and libavif / FFmpeg (both optional) before using the CLI tool. You can verify if all dependencies are properly installed by running the command reddit-dl check-deps.
  2. Docker: if you don't want to worry about installing dependencies in your computer before using reddit-dl then the Docker version is probably better since it comes with all the dependencies ready to use.

CLI Tool

Download the latest version of reddit-dl that matches your computer architecture and operating system. Extract the .zip file somewhere and then run the command below in the terminal:

$ reddit-dl -s user -n atomicbrunette18 -d /Downloads/Reddit

Where:

For the full list of parameters, type reddit-dl --help in the terminal.

Docker

Install Docker in your computer, then run the command below:

$ docker run --rm -t \
    -e REDDIT_SOURCE=user \
    -e REDDIT_NAME=atomicbrunette18 \
    -v "/path/in/your/computer:/tmp/reddit" \
    ghcr.io/mysteryengineer/reddit-downloader

Where:

Volume

For those that are not familiar with Docker, the -v (volume) parameter defines where the media will be saved, and it's divided in two parts, separated by the colon sign :. You just need to worry about the first part, on the left side of the colon sign (don't change anything on the right side) and update it according to a path in your computer where you want the media to be downloaded.

For example, if you want to download the media in the directory /Downloads/Reddit then the volume parameter should look like this -v "/Downloads/Reddit:/tmp/reddit".

πŸ’‘ Features

Remove duplicates

This application will automatically delete all files that are identical.

File filtering

You can filter the files that you want to download based on their extension, separated by comma. To do that you must:

Convert images/videos

You can convert the media downloaded to better formats (AVIF for images and AV1 for videos); this will make the files smaller but preserving the same quality. To do that you must:

πŸ› οΈ Build

In the project's root folder run in the CLI:

Go:

$ go build -o reddit-dl

Docker:

$ docker build -t ghcr.io/mysteryengineer/reddit-downloader . --build-arg="VERSION=24.1.4"

πŸ“ˆ Telemetry

This app collects information about the data that you're downloading to help me track bugs and improve the general stability of the software.

No identifiable information about you or your computer is tracked. But if you still want to stop the telemetry, you can do that by adding the flag --no-telemetry in the CLI tool or the environment variable -e REDDIT_TELEMETRY=false when you run the Docker container.

πŸ“ License

reddit-dl is released under the MIT License. See LICENSE for details.