mirror of
https://github.com/ytdl-org/youtube-dl
synced 2024-12-22 20:20:09 +09:00
[atresplayer] Handle invalid_request (auth fail) in handle_error
This commit is contained in:
parent
00f4ab1a8d
commit
25aa60a913
@ -53,6 +53,8 @@ class AtresPlayerIE(InfoExtractor):
|
||||
error = self._parse_json(e.cause.read(), None)
|
||||
if error.get('error') == 'required_registered':
|
||||
self.raise_login_required()
|
||||
if error.get('error') == 'invalid_request':
|
||||
raise ExtractorError('Authentication failed', expected=True)
|
||||
raise ExtractorError(error['error_description'], expected=True)
|
||||
raise
|
||||
|
||||
@ -71,8 +73,6 @@ class AtresPlayerIE(InfoExtractor):
|
||||
'password': password,
|
||||
}))
|
||||
except ExtractorError as e:
|
||||
if isinstance(e.cause, compat_HTTPError) and e.cause.code == 400:
|
||||
raise ExtractorError('Authentication failure', expected=True)
|
||||
self._handle_error(e, 400)
|
||||
|
||||
def _get_mpd_subtitles(self, mpd_xml, mpd_url):
|
||||
|
Loading…
Reference in New Issue
Block a user