support Firefox containers for --cookies-from-browser (#3346)

This commit is contained in:
Mike Fährmann
2022-12-09 19:43:55 +01:00
parent cd931e1139
commit dfe7b23579
4 changed files with 78 additions and 27 deletions

View File

@@ -66,7 +66,12 @@ def main():
if args.cookies_from_browser:
browser, _, profile = args.cookies_from_browser.partition(":")
browser, _, keyring = browser.partition("+")
config.set((), "cookies", (browser, profile, keyring))
if profile.startswith(":"):
container = profile[1:]
profile = None
else:
profile, _, container = profile.partition("::")
config.set((), "cookies", (browser, profile, keyring, container))
for opts in args.options:
config.set(*opts)