[ie/youtube] Extract all formats from multi-language m3u8s (#9875)

Authored by: clienthax, bashonly

Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
This commit is contained in:
Haxy
2024-06-20 22:54:53 +01:00
committed by GitHub
parent 90c3721a32
commit 9bd8501993
2 changed files with 20 additions and 9 deletions

View File

@@ -2222,6 +2222,11 @@ class InfoExtractor:
'quality': quality,
'has_drm': has_drm,
}
# YouTube-specific
if yt_audio_content_id := last_stream_inf.get('YT-EXT-AUDIO-CONTENT-ID'):
f['language'] = yt_audio_content_id.split('.')[0]
resolution = last_stream_inf.get('RESOLUTION')
if resolution:
mobj = re.search(r'(?P<width>\d+)[xX](?P<height>\d+)', resolution)