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

Function test_css_selector_extraction

tests/async/test_content_extraction.py:79–86  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

77
78@pytest.mark.asyncio
79async def test_css_selector_extraction():
80 async with AsyncWebCrawler(verbose=True) as crawler:
81 url = "https://www.nbcnews.com/business"
82 css_selector = "h1, h2, h3"
83 result = await crawler.arun(url=url, bypass_cache=True, css_selector=css_selector)
84 assert result.success
85 assert result.markdown
86 assert all(heading in result.markdown for heading in ["#", "##", "###"])
87
88# Entry point for debugging
89if __name__ == "__main__":

Callers

nothing calls this directly

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…