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

Method __init__

crawl4ai/web_crawler.py:20–27  ·  view source on GitHub ↗
(self, crawler_strategy: CrawlerStrategy = None, always_by_pass_cache: bool = False, verbose: bool = False)

Source from the content-addressed store, hash-verified

18
19class WebCrawler:
20 def __init__(self, crawler_strategy: CrawlerStrategy = None, always_by_pass_cache: bool = False, verbose: bool = False):
21 self.crawler_strategy = crawler_strategy or LocalSeleniumCrawlerStrategy(verbose=verbose)
22 self.always_by_pass_cache = always_by_pass_cache
23 self.crawl4ai_folder = os.path.join(Path.home(), ".crawl4ai")
24 os.makedirs(self.crawl4ai_folder, exist_ok=True)
25 os.makedirs(f"{self.crawl4ai_folder}/cache", exist_ok=True)
26 init_db()
27 self.ready = False
28
29 def warmup(self):
30 print("[LOG] 🌤️ Warming up the WebCrawler")

Callers

nothing calls this directly

Calls 2

init_dbFunction · 0.85

Tested by

no test coverage detected