]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[brightcove] Fix check for url in the result
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Tue, 21 Jan 2014 20:53:10 +0000 (21:53 +0100)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Tue, 21 Jan 2014 20:53:10 +0000 (21:53 +0100)
It may have the ‘formats’ field instead of ‘url’.

youtube_dl/extractor/brightcove.py

index b873dc0d4487565564d2eb1f262ab9cdac633139..e13c040f8bc24768d68ae13fa185ceaf0224d41d 100644 (file)
@@ -230,6 +230,6 @@ class BrightcoveIE(InfoExtractor):
                 else:
                     return ad_info
 
-        if 'url' not in info:
+        if 'url' not in info and not info.get('formats'):
             raise ExtractorError('Unable to extract video url for %s' % info['id'])
         return info