MCPcopy Create free account
hub / github.com/WwwwwyDev/crawlipt / process

Method process

crawlipt/script.py:548–570  ·  view source on GitHub ↗

process the script

(self, webdriver: WebDriver, variable: VariableBase = None, store: StoreBase = None)

Source from the content-addressed store, hash-verified

546
547 @check
548 def process(self, webdriver: WebDriver, variable: VariableBase = None, store: StoreBase = None) -> Any:
549 """
550 process the script
551 """
552 self.return_record.clear()
553 if self.is_need_syntax_check:
554 ScriptProcess.syntax_check(self.script)
555 ScriptProcess.syntax_check(self.global_script)
556 script = copy.deepcopy(self.script)
557 global_script = copy.deepcopy(self.global_script)
558 if variable:
559 ScriptProcess._replace_variable(script, variable)
560 ScriptProcess._replace_variable(global_script, variable)
561 if self.is_need_syntax_check:
562 ScriptProcess.syntax_check(script)
563 ScriptProcess.syntax_check(global_script)
564 return ScriptProcess._process_script(script=script,
565 global_script=global_script,
566 webdriver=webdriver,
567 return_record=self.return_record,
568 store=store,
569 interval=self.interval,
570 wait=self.wait)
571
572 def __call__(self, webdriver: WebDriver):
573 return self.process(webdriver)

Callers 4

test_variableMethod · 0.95
test_storeMethod · 0.95
test_08Method · 0.95
__call__Method · 0.95

Calls 4

clearMethod · 0.80
syntax_checkMethod · 0.80
_replace_variableMethod · 0.80
_process_scriptMethod · 0.80

Tested by 3

test_variableMethod · 0.76
test_storeMethod · 0.76
test_08Method · 0.76