From 4a6e5af28ea5b25a9c6c1ea26febad47f2c4b51d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Mon, 28 Oct 2024 17:19:47 +0100 Subject: [PATCH] [noop] insert noop extractor when loading cookies without URL allows writing --cookies-from-browser results with just gallery-dl --cookies-from-browser BROWSER --cookies-export DEST --- gallery_dl/__init__.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/gallery_dl/__init__.py b/gallery_dl/__init__.py index 62e96ae7..d0702337 100644 --- a/gallery_dl/__init__.py +++ b/gallery_dl/__init__.py @@ -252,9 +252,13 @@ def main(): args.input_files.append(input_file) if not args.urls and not args.input_files: - parser.error( - "The following arguments are required: URL\n" - "Use 'gallery-dl --help' to get a list of all options.") + if args.cookies_from_browser or config.interpolate( + ("extractor",), "cookies"): + args.urls.append("noop") + else: + parser.error( + "The following arguments are required: URL\nUse " + "'gallery-dl --help' to get a list of all options.") if args.list_urls: jobtype = job.UrlJob