From 3cf701bc59cae92e6039265f7b590ec076c98952 Mon Sep 17 00:00:00 2001 From: Rasmus Antons Date: Fri, 29 Mar 2024 02:15:46 +0100 Subject: [PATCH] [ie/Boosty] improve error handling during auth cookie parsing --- yt_dlp/extractor/boosty.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yt_dlp/extractor/boosty.py b/yt_dlp/extractor/boosty.py index 1f0f41e89..025b65334 100644 --- a/yt_dlp/extractor/boosty.py +++ b/yt_dlp/extractor/boosty.py @@ -171,7 +171,7 @@ def _real_extract(self, url): if auth_cookie is not None: try: auth_data = json.loads(compat_urllib_parse_unquote(auth_cookie.value)) - auth_headers['Authorization'] = f'Bearer {auth_data.get("accessToken")}' + auth_headers['Authorization'] = f'Bearer {auth_data["accessToken"]}' except (json.JSONDecodeError, KeyError): self.report_warning('Failed to extract token from auth cookie.')