Merge branch 'master' of github.com:rg3/youtube-dl
authorPhilipp Hagemeister <phihag@phihag.de>
Thu, 28 Nov 2013 03:37:02 +0000 (04:37 +0100)
committerPhilipp Hagemeister <phihag@phihag.de>
Thu, 28 Nov 2013 03:37:02 +0000 (04:37 +0100)
youtube_dl/extractor/clipfish.py

index 5f0b5602f8fb59a50a956b2a3366b304841060b9..05afce338547a2fb5c4e73227bdbf78eef3e026a 100644 (file)
@@ -1,5 +1,6 @@
 import re
 import time
+import xml.etree.ElementTree
 
 from .common import InfoExtractor
 
@@ -28,6 +29,10 @@ class ClipfishIE(InfoExtractor):
             info_url, video_id, note=u'Downloading info page')
         title = doc.find('title').text
         video_url = doc.find('filename').text
+        if video_url is None:
+            xml_bytes = xml.etree.ElementTree.tostring(doc)
+            raise ExtractorError(u'Cannot find video URL in document %r' %
+                                 xml_bytes)
         thumbnail = doc.find('imageurl').text
         duration_str = doc.find('duration').text
         m = re.match(