aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2016-04-16 19:11:25 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2016-04-16 19:11:25 +0800
commitbec47a0748e11cfd2e92f6c9c3f71347dc6ed2f8 (patch)
tree446d8fdb40040292646966decb271f07498bf4d8 /youtube_dl
parent36b7d9dbfaf43c357034e8b8792cdd5fb1363fb9 (diff)
[tudou] Improve error detection (closes #9175)
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/tudou.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/youtube_dl/extractor/tudou.py b/youtube_dl/extractor/tudou.py
index 63b5d5924..bb8b8e234 100644
--- a/youtube_dl/extractor/tudou.py
+++ b/youtube_dl/extractor/tudou.py
@@ -65,6 +65,9 @@ class TudouIE(InfoExtractor):
if quality:
info_url += '&hd' + quality
xml_data = self._download_xml(info_url, video_id, 'Opening the info XML page')
+ error = xml_data.attrib.get('error')
+ if error is not None:
+ raise ExtractorError('Tudou said: %s' % error, expected=True)
final_url = xml_data.text
return final_url