mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-06-27 19:55:26 +02:00
[ie/Boosty] improve error handling during auth cookie parsing
This commit is contained in:
parent
22acb01956
commit
3cf701bc59
|
@ -171,7 +171,7 @@ def _real_extract(self, url):
|
||||||
if auth_cookie is not None:
|
if auth_cookie is not None:
|
||||||
try:
|
try:
|
||||||
auth_data = json.loads(compat_urllib_parse_unquote(auth_cookie.value))
|
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):
|
except (json.JSONDecodeError, KeyError):
|
||||||
self.report_warning('Failed to extract token from auth cookie.')
|
self.report_warning('Failed to extract token from auth cookie.')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user