]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
Fix parsing of HTML5 media elements
authorChristian Pointner <equinox@helsinki.at>
Fri, 2 Sep 2016 23:50:26 +0000 (01:50 +0200)
committerSergey M․ <dstftw@gmail.com>
Sat, 3 Sep 2016 09:09:35 +0000 (16:09 +0700)
This fixes an error in _parse_html5_media_entries in case
an audio or video tag directly uses a src attribute insted
of <source> elements in it's body.

youtube_dl/extractor/common.py

index a9c7a8d164d7e7b126eccc78a23462b44dfb96ac..a8296816257ca8a2e0b9b38f44c48edbaa689756 100644 (file)
@@ -1749,7 +1749,7 @@ class InfoExtractor(object):
             media_attributes = extract_attributes(media_tag)
             src = media_attributes.get('src')
             if src:
-                _, formats = _media_formats(src)
+                _, formats = _media_formats(src, media_type)
                 media_info['formats'].extend(formats)
             media_info['thumbnail'] = media_attributes.get('poster')
             if media_content: