mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-21 20:46:36 -05:00
[extractor/common] Extract height from res attribute of source tag for HTML5 videos (closes #14034)
This commit is contained in:
parent
a3c3a1e128
commit
dd121cc1ca
1 changed files with 3 additions and 0 deletions
|
@ -2184,6 +2184,9 @@ def _media_formats(src, cur_media_type, type_info={}):
|
||||||
f = parse_content_type(source_attributes.get('type'))
|
f = parse_content_type(source_attributes.get('type'))
|
||||||
is_plain_url, formats = _media_formats(src, media_type, f)
|
is_plain_url, formats = _media_formats(src, media_type, f)
|
||||||
if is_plain_url:
|
if is_plain_url:
|
||||||
|
# res attribute is not standard but seen several times
|
||||||
|
# in the wild
|
||||||
|
f['height'] = int_or_none(source_attributes.get('res'))
|
||||||
f.update(formats[0])
|
f.update(formats[0])
|
||||||
media_info['formats'].append(f)
|
media_info['formats'].append(f)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue