ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
132.41k stars 10.04k forks source link

How to download all videos form user's twitch channel? #22979

Closed shadowzoom closed 4 years ago

shadowzoom commented 5 years ago

How to download all videos form user's twitch channel? youtube-dl "https://www.twitch.tv/username/videos?filter=all&sort=time" -f best is not working

ualnwe commented 5 years ago

Since the new web UI design, most of the URLs changed to use ?filter=xxx

As a work around until the Twitch extractor is updated, using /all still works. E.g. https://www.twitch.tv/username/videos/all

Side note, the current parsing will interpret that ?filter=xxx url as wanting to download the user's live stream, as if you passed https://www.twitch.tv/username, which may download partial streams if they’re live when you run it

HeySteets commented 4 years ago

Heads-up: As of commit 841b683, this issue has been resolved by rewriting the Twitch extractor. Runyoutube-dl -U to get the latest version. The solution below no longer works.

Previous comment: For anybody reading this in the future, the /all workaround no longer functions. The latest version of Twitch's API now requires a UserID instead of a channel name. To obtain a channel's UserID, Register an application on Twitch's Developer Portal. Then, using Postman, you can send an API request to https://api.twitch.tv/kraken/users?login=<username> with the Client-ID header of [yourClientID] and an Accept header of application/vnd.twitchtv.v5+json. The endpoint will respond with basic information about the channel; display name, type, bio, logo, and, importantly, "id". Copy the contents of that field and replace the channel name with it in your youtube-dl command, and it'll work like new.