diff options
| author | 2024-12-02 00:31:59 -0500 | |
|---|---|---|
| committer | 2024-12-02 00:31:59 -0500 | |
| commit | 1981ccaaea6eab2cf32536ec5afe132a870914d8 (patch) | |
| tree | 013f1e17d922d3a6abf7f57aa6a175c2ce5d93bc /gallery_dl/__init__.py | |
| parent | fc004701f923bb954a22c7fec2ae8d607e78cb2b (diff) | |
New upstream version 1.28.0.upstream/1.28.0
Diffstat (limited to 'gallery_dl/__init__.py')
| -rw-r--r-- | gallery_dl/__init__.py | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/gallery_dl/__init__.py b/gallery_dl/__init__.py index 62e96ae..ec882c3 100644 --- a/gallery_dl/__init__.py +++ b/gallery_dl/__init__.py @@ -107,8 +107,15 @@ def main(): # filter environment filterenv = config.get((), "filters-environment", True) - if not filterenv: + if filterenv is True: + pass + elif not filterenv: util.compile_expression = util.compile_expression_raw + elif isinstance(filterenv, str): + if filterenv == "raw": + util.compile_expression = util.compile_expression_raw + elif filterenv.startswith("default"): + util.compile_expression = util.compile_expression_defaultdict # format string separator separator = config.get((), "format-separator") @@ -252,9 +259,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 |
