kopia lustrzana https://github.com/yt-dlp/yt-dlp
Parse YT-EXT-AUDIO-CONTENT-ID for multiple language detection in YouTube HLS Manifests.
rodzic
5904853ae5
commit
129dc46b9e
|
@ -2211,6 +2211,12 @@ class InfoExtractor:
|
||||||
'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)
|
||||||
|
|
Ładowanie…
Reference in New Issue