I’ve been using yt-dlp to grab Twitch clips and full VODs in my Python program. It works great for downloading, but I’m stuck on one thing. I need to find out what game was being played in each clip. This is important for my analysis later on.
Here’s a snippet of my code for downloading clips:
def get_clip(url):
clip_part = extract_clip_id(url)
full_url = f'https://clips.twitch.tv/{clip_part}'
options = {'format': 'best[ext=mp4]'}
try:
with YoutubeDL(options) as downloader:
downloader.download([full_url])
except Exception:
print('Download failed')
I’ve looked through the yt-dlp docs and even checked youtube-dl, but I can’t find anything about getting game info. Does anyone know if there’s a way to do this with yt-dlp? Or maybe there’s another method I could try? Any help would be awesome!