crawl4ai icon indicating copy to clipboard operation
crawl4ai copied to clipboard

0.3.741 - fit_markdown flag not recognized and not set

Open chanmathew opened this issue 3 months ago • 6 comments

Hi @unclecode - Just did some testing on 0.3.741, and I noticed that even when fit_markdown is set, the results.fit_markdown will always return Set flag 'fit_markdown' to True to get cleaned HTML content.

Here's how I'm calling it:

async def main(url: str):
    async with AsyncWebCrawler() as crawler:
        result = await crawler.arun(
            url=url,
            verbose=True,
            headless=True,
            fit_markdown=True,
            bypass_cache=True,
            word_count_threshold=1
        )
        if result.success:
            print(result.fit_markdown)
            return result
        else:
            print(f"Crawl failed: {result.error_message}")

I've tried adjusting a few settings, such as headless=False, but that doesn't seem to affect it.

chanmathew avatar Nov 24 '24 02:11 chanmathew