1
1
mirror of https://github.com/ytdl-org/youtube-dl synced 2024-11-27 10:56:48 +01:00

[extractor/common] Extract height from res attribute of source tag for HTML5 videos (closes #14034)

This commit is contained in:
Sergey M․ 2017-08-27 03:12:56 +07:00
parent a3c3a1e128
commit dd121cc1ca
No known key found for this signature in database
GPG Key ID: 2C393E0F18A9236D

View File

@ -2184,6 +2184,9 @@ class InfoExtractor(object):
f = parse_content_type(source_attributes.get('type'))
is_plain_url, formats = _media_formats(src, media_type, f)
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])
media_info['formats'].append(f)
else: