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

Function test_extract_media

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

Source from the content-addressed store, hash-verified

32
33@pytest.mark.asyncio
34async def test_extract_media():
35 async with AsyncWebCrawler(verbose=True) as crawler:
36 url = "https://www.nbcnews.com/business"
37 result = await crawler.arun(url=url, bypass_cache=True)
38 assert result.success
39 assert result.media
40 media = result.media
41 assert isinstance(media, dict)
42 assert "images" in media
43 assert isinstance(media["images"], list)
44 for image in media["images"]:
45 assert "src" in image
46 assert "alt" in image
47 assert "type" in image
48
49@pytest.mark.asyncio
50async def test_extract_links():

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…