mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-10-19 20:09:39 +02:00
Parse YT-EXT-AUDIO-CONTENT-ID for multiple language detection in YouTube HLS Manifests.
This commit is contained in:
parent
5904853ae5
commit
129dc46b9e
@ -2211,6 +2211,12 @@ def build_stream_name():
|
|||||||
'quality': quality,
|
'quality': quality,
|
||||||
'has_drm': has_drm,
|
'has_drm': has_drm,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# YouTube Specific
|
||||||
|
if last_stream_inf.get('YT-EXT-AUDIO-CONTENT-ID'):
|
||||||
|
# Strip anything after and including from the end '.'
|
||||||
|
f['language'] = last_stream_inf.get('YT-EXT-AUDIO-CONTENT-ID').split('.')[0]
|
||||||
|
|
||||||
resolution = last_stream_inf.get('RESOLUTION')
|
resolution = last_stream_inf.get('RESOLUTION')
|
||||||
if resolution:
|
if resolution:
|
||||||
mobj = re.search(r'(?P<width>\d+)[xX](?P<height>\d+)', resolution)
|
mobj = re.search(r'(?P<width>\d+)[xX](?P<height>\d+)', resolution)
|
||||||
|
Loading…
Reference in New Issue
Block a user