()
| 77 | |
| 78 | @pytest.mark.asyncio |
| 79 | async 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 |
| 89 | if __name__ == "__main__": |
nothing calls this directly
no test coverage detected
searching dependent graphs…