Jump to content

How to download VODs and lives from Twitch in python ?

mouarflenoob

Hello everyone, I'm a bit of a coding noob, and I am looking to put my homeserver to the use of my insatiable hunger for twitch lives and VODs.

For the moment, I am using Twitch Leecher https://github.com/Franiac/TwitchLeecher  to download VODs from Twitch streamers I want to watch later.
What I do is that I fire up the software on my main machine (W10), I manually search for the channels I like to get a list of the videos, and then I select those I have not downloaded yet to start the download. ()basically, using Twitch Leecher normally)
What I want to do going forward is to automatize the process. I want to use python and CRON on a VM to check if the channel I want is live every 5 minutes, and then if it is, I want to start downloading the stream live.
If that is not possible, I want to check every 5 minutes if the stream has finished, and if it has, then download the VOD right away.

I have learn C# and PHP in University, but it's been a while and I have not programmed anything in a long time. I recently decided I wanted to learn python, so this seemed like a nice way to combine business with pleasure.

Would anyone here know of something similar already existing, or of a way that I would be able to achieve this? Thanks a lot.

Link to comment
Share on other sites

Link to post
Share on other sites

Quite difficult to automate stuffs that run on a pretty gui and needs user to click instead of a shell command. I guess you can have python fire up that application every 5 minutes and then hard code the mouse to click on certain position to have it do whatever you need. This is so much more complicated than if there is an API available for your python to call on or if it can be run off a command line tho. For the latter, you don't even need python, you can just do it with bash script. 

Sudo make me a sandwich 

Link to comment
Share on other sites

Link to post
Share on other sites

My goal is not to use the app I mention, but to create my own API call in python. I linked to the software in order to better describe what I am doing at the moment.

My goal is to use a Linux VM in command line. Sorry I forgot to mention that

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×