aboutsummaryrefslogtreecommitdiffstats
path: root/gallery_dl/extractor/noop.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2024-12-02 00:32:05 -0500
committerLibravatarUnit 193 <unit193@unit193.net>2024-12-02 00:32:05 -0500
commit7c235d96e2417306334cd93517a2723039a5a0b5 (patch)
treecd29cbb34195d8f384237d70a3f8e7405827496a /gallery_dl/extractor/noop.py
parentc68fa03f6af81fc1a23a7021fe28e73bacf71f66 (diff)
parent1981ccaaea6eab2cf32536ec5afe132a870914d8 (diff)
Update upstream source from tag 'upstream/1.28.0'
Update to upstream version '1.28.0' with Debian dir d2219dc8130062139eee5a8e4e0da3dc60db3a4e
Diffstat (limited to 'gallery_dl/extractor/noop.py')
-rw-r--r--gallery_dl/extractor/noop.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/gallery_dl/extractor/noop.py b/gallery_dl/extractor/noop.py
new file mode 100644
index 0000000..df2316c
--- /dev/null
+++ b/gallery_dl/extractor/noop.py
@@ -0,0 +1,27 @@
+# -*- coding: utf-8 -*-
+
+# Copyright 2024 Mike Fährmann
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+
+"""noop extractor"""
+
+from .common import Extractor, Message
+
+
+class NoopExtractor(Extractor):
+ category = "noop"
+ pattern = r"(?i)noo?p$"
+ example = "noop"
+
+ def items(self):
+ # yield *something* to prevent a 'No results' message
+ yield Message.Version, 1
+
+ # Save cookies manually, since it happens automatically only after
+ # extended extractor initialization, i.e. Message.Directory, which
+ # itself might cause some unintended effects.
+ if self.cookies:
+ self.cookies_store()