| 1 | # -*- coding: utf-8 -*- |
| 2 | |
| 3 | # Copyright 2024 Mike Fährmann |
| 4 | # |
| 5 | # This program is free software; you can redistribute it and/or modify |
| 6 | # it under the terms of the GNU General Public License version 2 as |
| 7 | # published by the Free Software Foundation. |
| 8 | |
| 9 | """noop extractor""" |
| 10 | |
| 11 | from .common import Extractor |
| 12 | |
| 13 | |
| 14 | class NoopExtractor(Extractor): |
| 15 | category = "noop" |
| 16 | pattern = r"(?i)noo?p$" |
| 17 | example = "noop" |
| 18 | |
| 19 | def items(self): |
| 20 | # Save cookies manually, since it happens automatically only after |
| 21 | # extended extractor initialization, i.e. Message.Directory, which |
| 22 | # itself might cause some unintended effects. |
| 23 | if self.cookies: |
| 24 | self.cookies_store() |
| 25 | return iter(((-1, "", None),)) |