]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[extractor/common] Extract height from res attribute of source tag for HTML5 videos...
authorSergey M․ <dstftw@gmail.com>
Sat, 26 Aug 2017 20:12:56 +0000 (03:12 +0700)
committerSergey M․ <dstftw@gmail.com>
Sat, 26 Aug 2017 20:12:56 +0000 (03:12 +0700)
youtube_dl/extractor/common.py

index 1804c4de0249e8f5d0401509577e6b839a8faea9..b4af3f987a4fadd0085a18e50b7909ec4eb5e6e5 100644 (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: