[postprocessor] Add plugin support
Adds option `--use-postprocessor` to enable them
This commit is contained in:
parent
8e3fd7e034
commit
3ae5e79774
11 changed files with 94 additions and 48 deletions
|
|
@ -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():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue