unclecode / crawl4ai

🔥🕷️ Crawl4AI: Open-source LLM Friendly Web Crawler & Scrapper
Apache License 2.0
16.43k stars 1.21k forks source link

cannot access local variable 'filtered_html" #290

Open valtahomes opened 4 hours ago

valtahomes commented 4 hours ago

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

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

any idea? Thanks.

didntpay commented 3 hours ago

Plus one here