[ie/Boosty] improve error handling during auth cookie parsing

This commit is contained in:
Rasmus Antons 2024-03-29 02:15:46 +01:00 committed by GitHub
parent c1f7be9b01
commit 72a8e24ed4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -171,7 +171,7 @@ class BoostyIE(InfoExtractor):
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.')