From f027c601b0d16c03d58afdccc17115b21b62f55c Mon Sep 17 00:00:00 2001 From: Martijn van der Ven Date: Sun, 12 May 2024 17:05:40 +0200 Subject: [PATCH] [cookies] Update regex for Firefox containers JSON version 4 Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com> --- yt_dlp/cookies.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yt_dlp/cookies.py b/yt_dlp/cookies.py index 8488a68a1..42193bb79 100644 --- a/yt_dlp/cookies.py +++ b/yt_dlp/cookies.py @@ -146,7 +146,7 @@ def _extract_firefox_cookies(profile, container, logger): identities = json.load(containers).get('identities', []) container_id = next((context.get('userContextId') for context in identities if container in ( context.get('name'), - try_call(lambda: re.fullmatch(r'userContext([^\.]+)\.label', context['l10nID']).group()), + try_call(lambda: re.fullmatch(r'userContext([^.]+)\.label', context['l10nID']).group()), try_call(lambda: re.fullmatch(r'user-context-(.+)', context['l10nId']).group()) )), None) if not isinstance(container_id, int):