1
0
Fork 0
mirror of https://gitlab.com/dstftw/youtube-dl.git synced 2020-11-16 09:42:26 +00:00

[tudou] Improve error detection (closes #9175)

This commit is contained in:
Yen Chi Hsuan 2016-04-16 19:11:25 +08:00
parent 36b7d9dbfa
commit bec47a0748
No known key found for this signature in database
GPG key ID: 3FDDD575826C5C30

View file

@ -65,6 +65,9 @@ class TudouIE(InfoExtractor):
if quality: if quality:
info_url += '&hd' + quality info_url += '&hd' + quality
xml_data = self._download_xml(info_url, video_id, 'Opening the info XML page') 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 final_url = xml_data.text
return final_url return final_url