ihabunek / twitch-dl

CLI tool for downloading videos from Twitch.
GNU General Public License v3.0
663 stars 84 forks source link

Download the X most recent VODs from a chanel #83

Open mouarflenoob opened 2 years ago

mouarflenoob commented 2 years ago

Hello, I have seen several request for adding multiple downloads in the script in one form or another. I'm here to request an other one, but one I think that can be of interest to a lot of people : adding a simple way to download the X most recent VODs from a channel. For example, I want to download the last 5 VODs from channel abc12345 I type : twitch-dl downloadMultiple -n 5 -q source abc12345

Is that something that would be doable ?

I could also use a script to first list the ID for the 5 latest VODs and then download them all in the script using the usual command. If anyone has worked on this, and can help me start my script, I would appreciate it.

gosadaque commented 2 years ago

It's not the added feature, but I created for myself a python script to download streamers' clips of last week. You can see it here: https://github.com/gosadaque/small-script-collection-public/blob/main/downloadLastWeeksTwitchClips.py

The script downloads each streamer's json and sorts it by id (from oldest to newest). So the last array entry is the newest. Just edit the loop to go over the last 5 instead over all.

garoto commented 2 years ago

for /f %N in ('twitch-dl.exe videos -t archive --limit 5 --no-color abc12345 ^| findstr /r ^http') do @echo twitch-dl.exe download --max-workers 8 --format mp4 --quality source %N