New here. Can't run the sample code with the error:
code:
import asyncio
from crawl4ai import AsyncWebCrawler
async def main():
Create an instance of AsyncWebCrawler
async with AsyncWebCrawler(verbose=True) as crawler:
# Run the crawler on a URL
result = await crawler.arun(url="https://www.nbcnews.com/business")
# Print the extracted content
print(result.markdown)
Run the async main function
asyncio.run(main())
Got the following error:
[INIT].... → Crawl4AI 0.3.741
[FETCH]... ↓ https://www.nbcnews.com/business... | Status: True | Time: 0.02s
[SCRAPE].. ◆ Processed https://www.nbcnews.com/business... | Time: 39ms
[COMPLETE] ● https://www.nbcnews.com/business... | Status: True | Total: 0.07s
Error using new markdown generation strategy: cannot access local variable 'filtered_html' where it is not associated with a value
Hi,
New here. Can't run the sample code with the error:
code: import asyncio from crawl4ai import AsyncWebCrawler
async def main():
Create an instance of AsyncWebCrawler
Run the async main function
asyncio.run(main())
Got the following error:
[INIT].... → Crawl4AI 0.3.741 [FETCH]... ↓ https://www.nbcnews.com/business... | Status: True | Time: 0.02s [SCRAPE].. ◆ Processed https://www.nbcnews.com/business... | Time: 39ms [COMPLETE] ● https://www.nbcnews.com/business... | Status: True | Total: 0.07s Error using new markdown generation strategy: cannot access local variable 'filtered_html' where it is not associated with a value
any idea? Thanks.