MCPcopy
hub / github.com/unclecode/crawl4ai / set_hook

Method set_hook

crawl4ai/crawler_strategy.py:159–163  ·  view source on GitHub ↗
(self, hook_type: str, hook: Callable)

Source from the content-addressed store, hash-verified

157
158
159 def set_hook(self, hook_type: str, hook: Callable):
160 if hook_type in self.hooks:
161 self.hooks[hook_type] = hook
162 else:
163 raise ValueError(f"Invalid hook type: {hook_type}")
164
165 def execute_hook(self, hook_type: str, *args):
166 hook = self.hooks.get(hook_type)

Callers 2

using_crawler_hooksFunction · 0.95
create_crawlerFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected