diff options
| author | 2024-09-28 20:01:25 -0400 | |
|---|---|---|
| committer | 2024-09-28 20:01:25 -0400 | |
| commit | 1a457ed68769880ab7760e0746f0cbbd9ca00487 (patch) | |
| tree | a5e2f36fa6537e24a7a8851dab900ea03efdbd00 /gallery_dl/__init__.py | |
| parent | 1f3ffe32342852fd9ea9e7704022488f3a1222bd (diff) | |
New upstream version 1.27.5.upstream/1.27.5
Diffstat (limited to 'gallery_dl/__init__.py')
| -rw-r--r-- | gallery_dl/__init__.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gallery_dl/__init__.py b/gallery_dl/__init__.py index 663fe99..7a9e0be 100644 --- a/gallery_dl/__init__.py +++ b/gallery_dl/__init__.py @@ -202,12 +202,18 @@ def main(): extractor.modules.append("") sys.stdout.write("\n".join(extractor.modules)) - elif args.list_extractors: + elif args.list_extractors is not None: write = sys.stdout.write fmt = ("{}{}\nCategory: {} - Subcategory: {}" "\nExample : {}\n\n").format - for extr in extractor.extractors(): + extractors = extractor.extractors() + if args.list_extractors: + fltr = util.build_extractor_filter( + args.list_extractors, negate=False) + extractors = filter(fltr, extractors) + + for extr in extractors: write(fmt( extr.__name__, "\n" + extr.__doc__ if extr.__doc__ else "", |
