Compare commits

...

2 Commits

Author SHA1 Message Date
Martijn van der Ven 792096ae49
Merge 624451ffae into bec9a59e8e 2024-05-05 03:52:47 +05:30
Martijn van der Ven 624451ffae [cookies] Support Firefox containers JSON version 5 2024-04-09 23:02:41 +02:00
1 changed files with 2 additions and 1 deletions

View File

@ -146,7 +146,8 @@ 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):
raise ValueError(f'could not find firefox container "{container}" in containers.json')