Beispiel #1
0
 def from_crawler(cls, crawler):
     return cls(crawler,
                load_obj_and_call(crawler.settings.get('DECISION_FUNCTION')),
                load_callable_chain(crawler.settings.get('PREPROCESSORS'),
                                    AllCaller),
                load_callable_chain(crawler.settings.get('TRANSITION_EXTRACTORS'),
                                    CallAndChain),
                load_callable_chain(crawler.settings.get('PAGE_ANALYZERS'),
                                    DictUnion))
Beispiel #2
0
 def from_crawler(cls, crawler):
     return cls(
         crawler,
         load_obj_and_call(crawler.settings.get('DECISION_FUNCTION')),
         load_callable_chain(crawler.settings.get('PREPROCESSORS'),
                             AllCaller),
         load_callable_chain(crawler.settings.get('TRANSITION_EXTRACTORS'),
                             CallAndChain),
         load_callable_chain(crawler.settings.get('PAGE_ANALYZERS'),
                             DictUnion))
Beispiel #3
0
 def __init__(self, *args, **kwargs):
     self.functions = [
         load_obj_and_call(d)
         for d in kwargs.get('TRANSITION_PROCESSORS', [])
     ]
Beispiel #4
0
 def __init__(self, *args, **kwargs):
     self.functions = [load_obj_and_call(d) for d in
                       kwargs.get('TRANSITION_PROCESSORS', [])]