mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-21 20:46:36 -05:00
[tudou] Improve error detection (closes #9175)
This commit is contained in:
parent
36b7d9dbfa
commit
bec47a0748
1 changed files with 3 additions and 0 deletions
|
@ -65,6 +65,9 @@ def _url_for_id(self, video_id, quality=None):
|
|||
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
|
||||
|
||||
|
|
Loading…
Reference in a new issue