DEV Community

Itachi Uchiha
Itachi Uchiha

Posted on

5 2

I published Reddit Media Downloader on GitHub

Hi everyone!

I published a repository called Reddit Media Downloader for a hobby. It is written in JavaScript.

Reddit Media Downloader downloads video or image files from the thread URL.

I didn't write any tests. So, I'm sure there are many errors. You can find them and yes we can fix errors together. Currently there are no elegant codes. It took only about 25~30 minutes

Pull Requests are welcome. Thanks!

GitHub logo aligoren / reddit-media-downloader

A very simple media downloader for Reddit.

Reddit Media Downloader

A very simple media downloader for Reddit.

Usage

These are CLI parameters. All media files, will be downloaded with their best quality.

--url

Reddit thread URL. For example, https://www.reddit.com/r/badUIbattles/comments/gqgk79/humanproof_twofactor_authentication/

Usage example

node index.js --url=https://www.reddit.com/r/badUIbattles/comments/gqgk79/humanproof_twofactor_authentication/

By default media will be image.png.

--type

There are two types you can select. These are video and image. By default type is image.

Usage example

node index.js --url=https://www.reddit.com/r/badUIbattles/comments/gqgk79/humanproof_twofactor_authentication/ --type=video

--file

If you didn't specify the file name, it will be image.png for images and video.mp4 for videos.

Usage example

node index.js --url=https://www.reddit.com/r/badUIbattles/comments/gqgk79/humanproof_twofactor_authentication/ --type=video --file="humanproof twofactor humanproof_twofactor_authentication.mp4"

--folder

By default, media files will be downloaded to the current directory. But, if you want to use different folder, use this argument.

Usage example

node index.js --url=https://www.reddit.com/r/badUIbattles/comments/gqgk79/humanproof_twofactor_authentication/ --type=video --file="humanproof twofactor humanproof_twofactor_authentication.mp4" --folder="/home/opcode/Videos"

To Do

  • Try to handle media files without specify type
  • Write tests



Top comments (0)

Image of Datadog

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

👋 Kindness is contagious

Immerse yourself in a wealth of knowledge with this piece, supported by the inclusive DEV Community—every developer, no matter where they are in their journey, is invited to contribute to our collective wisdom.

A simple “thank you” goes a long way—express your gratitude below in the comments!

Gathering insights enriches our journey on DEV and fortifies our community ties. Did you find this article valuable? Taking a moment to thank the author can have a significant impact.

Okay