aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2014-03-08 16:04:03 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2014-03-08 16:04:03 +0100
commita4ff6c4762fd01b606d54a2962530c753d4c52ec (patch)
treea4880cd78f062968a435ae09aaec7f78ddeb92f7
parent1060425cbb4beffc2a36aa361b03db60df0e40f8 (diff)
downloadyoutube-dl-a4ff6c4762fd01b606d54a2962530c753d4c52ec.tar.xz
[arte] Raise a proper error when no video is found
-rw-r--r--youtube_dl/extractor/arte.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/youtube_dl/extractor/arte.py b/youtube_dl/extractor/arte.py
index 7cf3785ac..d194f2564 100644
--- a/youtube_dl/extractor/arte.py
+++ b/youtube_dl/extractor/arte.py
@@ -72,18 +72,22 @@ class ArteTvIE(InfoExtractor):
return self._extract_liveweb(url, name, lang)
if re.search(self._LIVE_URL, url) is not None:
- raise ExtractorError(u'Arte live streams are not yet supported, sorry')
+ raise ExtractorError('Arte live streams are not yet supported, sorry')
# self.extractLiveStream(url)
# return
+ raise ExtractorError('No video found')
+
def _extract_video(self, url, video_id, lang):
"""Extract from videos.arte.tv"""
ref_xml_url = url.replace('/videos/', '/do_delegate/videos/')
ref_xml_url = ref_xml_url.replace('.html', ',view,asPlayerXml.xml')
- ref_xml_doc = self._download_xml(ref_xml_url, video_id, note=u'Downloading metadata')
+ ref_xml_doc = self._download_xml(
+ ref_xml_url, video_id, note='Downloading metadata')
config_node = find_xpath_attr(ref_xml_doc, './/video', 'lang', lang)
config_xml_url = config_node.attrib['ref']
- config_xml = self._download_webpage(config_xml_url, video_id, note=u'Downloading configuration')
+ config_xml = self._download_webpage(
+ config_xml_url, video_id, note='Downloading configuration')
video_urls = list(re.finditer(r'<url quality="(?P<quality>.*?)">(?P<url>.*?)</url>', config_xml))
def _key(m):