From fc57c90cfeb6da41a75add2f2fd56bc30f20c817 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ram=C3=B3n=20Sola?= Date: Mon, 4 Oct 2021 09:42:12 +0200 Subject: [PATCH] [atresplayer] handle HTTP 400 on login as authentication failure --- yt_dlp/extractor/atresplayer.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/yt_dlp/extractor/atresplayer.py b/yt_dlp/extractor/atresplayer.py index 548998b8d..78f513cc1 100644 --- a/yt_dlp/extractor/atresplayer.py +++ b/yt_dlp/extractor/atresplayer.py @@ -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):