1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-06-30 10:28:31 +00:00
This commit is contained in:
Martijn van der Ven 2025-06-20 21:50:08 +02:00 committed by GitHub
commit a8ecdfdfd4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -154,6 +154,7 @@ def _extract_firefox_cookies(profile, container, logger):
container_id = next((context.get('userContextId') for context in identities if container in ( container_id = next((context.get('userContextId') for context in identities if container in (
context.get('name'), 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) )), None)
if not isinstance(container_id, int): if not isinstance(container_id, int):
raise ValueError(f'could not find firefox container "{container}" in containers.json') raise ValueError(f'could not find firefox container "{container}" in containers.json')