cat-message
cat-message copied to clipboard
Handle youtube video posts
Hoping to include functionality for downloading youtube videos (probably with youtube-dl or similar).
I will work on this. I will need to know more about how you want it implemented though.
I am also trying to figure out how to test this properly once it is mostly working.
@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.