implement --cookies-from-browser (#1606)

most of the code is adapted from yt-dlp's implementation
and *should* work the same.
This commit is contained in:
Mike Fährmann
2022-05-07 23:03:48 +02:00
parent c4b9f7bab8
commit 6742f3bc1e
6 changed files with 1654 additions and 13 deletions

View File

@@ -131,6 +131,10 @@ def main():
config.set((), "skip", "abort:" + str(args.abort))
if args.terminate:
config.set((), "skip", "terminate:" + str(args.terminate))
if args.cookies_from_browser:
browser, _, profile = args.cookies_from_browser.partition(":")
browser, _, keyring = browser.partition("+")
config.set((), "cookies", (browser, profile, keyring))
for opts in args.options:
config.set(*opts)