1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-17 15:55:56 +00:00

[clipfish] Effect a better error message (#1842)

This commit is contained in:
Philipp Hagemeister 2013-11-27 18:33:51 +01:00
parent 4b19e38954
commit dcca796ce4

View file

@ -1,5 +1,6 @@
import re import re
import time import time
import xml.etree.ElementTree
from .common import InfoExtractor from .common import InfoExtractor
@ -28,6 +29,10 @@ class ClipfishIE(InfoExtractor):
info_url, video_id, note=u'Downloading info page') info_url, video_id, note=u'Downloading info page')
title = doc.find('title').text title = doc.find('title').text
video_url = doc.find('filename').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 thumbnail = doc.find('imageurl').text
duration_str = doc.find('duration').text duration_str = doc.find('duration').text
m = re.match( m = re.match(