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

Function test_extract_metadata

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

Source from the content-addressed store, hash-verified

65
66@pytest.mark.asyncio
67async def test_extract_metadata():
68 async with AsyncWebCrawler(verbose=True) as crawler:
69 url = "https://www.nbcnews.com/business"
70 result = await crawler.arun(url=url, bypass_cache=True)
71 assert result.success
72 assert result.metadata
73 metadata = result.metadata
74 assert isinstance(metadata, dict)
75 assert "title" in metadata
76 assert isinstance(metadata["title"], str)
77
78@pytest.mark.asyncio
79async def test_css_selector_extraction():

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…