cat-message icon indicating copy to clipboard operation
cat-message copied to clipboard

Handle youtube video posts

Open ginglis13 opened this issue 5 years ago • 3 comments

Hoping to include functionality for downloading youtube videos (probably with youtube-dl or similar).

ginglis13 avatar Oct 03 '19 14:10 ginglis13

I will work on this. I will need to know more about how you want it implemented though.

MasterOfTheTiger avatar Oct 03 '19 16:10 MasterOfTheTiger

I am also trying to figure out how to test this properly once it is mostly working.

MasterOfTheTiger avatar Oct 03 '19 16:10 MasterOfTheTiger

@MasterOfTheTiger thanks for the help. To be honest, I haven't touched much of this project in a few months. For this, the only opinions I have on how it should be implemented is that it follows the pattern of other media types, i.e. for gfycat, the URL for the source media file is in the Reddit JSON response. I assume the same for youtube videos. Just use some python lib (or just stdlib if that works instead) to download the youtube video to the current working directory, and name it "cat.mp4"

I would prefer that this new funcitonality is given its own function in get_cats.py, maybe name it get_yt or something.

As for testing goes, I would simply try to find a source reddit post that uses a youtube video. Edit the script to use a hardcoded URL (not random). Test the new functionality on that (./get_cats.py).

Feel free to ask any more questions here.

ginglis13 avatar Oct 03 '19 17:10 ginglis13