]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[extractor/common] Keep going in some media_url is missing
authorSergey M․ <dstftw@gmail.com>
Wed, 15 Jul 2015 19:25:33 +0000 (01:25 +0600)
committerSergey M․ <dstftw@gmail.com>
Wed, 15 Jul 2015 19:25:33 +0000 (01:25 +0600)
youtube_dl/extractor/common.py

index e3c610aa42fa5ff519c2889d11fa757a36279a6e..271bf85968690f00e25252294b51aa0e4cdecb15 100644 (file)
@@ -852,7 +852,9 @@ class InfoExtractor(object):
             media_nodes = manifest.findall('{http://ns.adobe.com/f4m/2.0}media')
         for i, media_el in enumerate(media_nodes):
             if manifest_version == '2.0':
-                media_url = media_el.attrib.get('href') or media_el.attrib['url']
+                media_url = media_el.attrib.get('href') or media_el.attrib.get('url')
+                if not media_url:
+                    continue
                 manifest_url = (
                     media_url if media_url.startswith('http://') or media_url.startswith('https://')
                     else ('/'.join(manifest_url.split('/')[:-1]) + '/' + media_url))