projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
36b7d9d
)
[tudou] Improve error detection (closes #9175)
author
Yen Chi Hsuan
<yan12125@gmail.com>
Sat, 16 Apr 2016 11:11:25 +0000
(19:11 +0800)
committer
Yen Chi Hsuan
<yan12125@gmail.com>
Sat, 16 Apr 2016 11:11:25 +0000
(19:11 +0800)
youtube_dl/extractor/tudou.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/tudou.py
b/youtube_dl/extractor/tudou.py
index 63b5d5924fe3d88c95d1f9537fba07044d45e124..bb8b8e23424e7943f2133028aca187d4fcffeab9 100644
(file)
--- 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