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

Function simple_example_with_css_selector

docs/examples/quickstart_async.py:58–66  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

56 print(result.markdown[:500]) # Print first 500 characters
57
58async def simple_example_with_css_selector():
59 print("\n--- Using CSS Selectors ---")
60 async with AsyncWebCrawler(verbose=True) as crawler:
61 result = await crawler.arun(
62 url="https://www.nbcnews.com/business",
63 css_selector=".wide-tease-item__description",
64 bypass_cache=True,
65 )
66 print(result.markdown[:500]) # Print first 500 characters
67
68async def use_proxy():
69 print("\n--- Using a Proxy ---")

Callers 1

mainFunction · 0.85

Calls 2

AsyncWebCrawlerClass · 0.90
arunMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…