1
0
Fork 0

[postprocessor] Add plugin support

Adds option `--use-postprocessor` to enable them
This commit is contained in:
pukkandan 2021-09-30 02:23:33 +05:30
commit 3ae5e79774
No known key found for this signature in database
GPG key ID: 0F00D95A001F4698
11 changed files with 94 additions and 48 deletions

View file

@ -6,7 +6,7 @@ try:
from .lazy_extractors import *
from .lazy_extractors import _ALL_CLASSES
_LAZY_LOADER = True
_PLUGIN_CLASSES = []
_PLUGIN_CLASSES = {}
except ImportError:
_LAZY_LOADER = False
@ -20,7 +20,7 @@ if not _LAZY_LOADER:
_ALL_CLASSES.append(GenericIE)
_PLUGIN_CLASSES = load_plugins('extractor', 'IE', globals())
_ALL_CLASSES = _PLUGIN_CLASSES + _ALL_CLASSES
_ALL_CLASSES = list(_PLUGIN_CLASSES.values()) + _ALL_CLASSES
def gen_extractor_classes():