From 24b3da717ae2e81345127b1431902b49b95d475e Mon Sep 17 00:00:00 2001 From: UncleCode Date: Thu, 2 Jan 2025 17:53:30 +0800 Subject: [PATCH] refactor(): - Update hello world example --- docs/examples/hello_world.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/examples/hello_world.py b/docs/examples/hello_world.py index bcec9a9a..18534d0e 100644 --- a/docs/examples/hello_world.py +++ b/docs/examples/hello_world.py @@ -2,7 +2,8 @@ import asyncio from crawl4ai import * async def main(): - async with AsyncWebCrawler() as crawler: + browser_config = BrowserConfig(headless=True, verbose=True) + async with AsyncWebCrawler(config=browser_config) as crawler: crawler_config = CrawlerRunConfig( cache_mode=CacheMode.BYPASS, markdown_generator=DefaultMarkdownGenerator( @@ -10,7 +11,7 @@ async def main(): ) ) result = await crawler.arun( - url="https://crawl4ai.com", + url="https://www.helloworld.org", config=crawler_config ) print(result.markdown_v2.raw_markdown[:500])