[atresplayer] handle HTTP 400 on login as authentication failure

This commit is contained in:
Ramón Sola 2021-10-04 09:42:12 +02:00
parent 408965e75d
commit fc57c90cfe

View file

@ -65,6 +65,8 @@ def _login(self):
'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 _real_extract(self, url):