unclecode / crawl4ai

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

AttributeError: 'CrawlResult' object has no attribute 'fit_markdown' #211

Open wg20170107 opened 2 weeks ago

wg20170107 commented 2 weeks ago

import asyncio from crawl4ai import AsyncWebCrawler import json

async def main(): async with AsyncWebCrawler(verbos=True) as crawler: result = await crawler.arun( url="https://batteriesnews.com/lg-chem-files-lawsuit-against-unit-of-chinas-ronbay-over-battery-tech", bypass_cache=True, word_count_threshold=10, ) print(result.fit_markdown) # Print clean markdown content

AttributeError: 'CrawlResult' object has no attribute 'fit_markdown' result.markdown no problem

unclecode commented 1 week ago

@wg20170107 Make sure to update your library (current version 0.3.72). If not, reinstall it with pip using 'pip install -U cralw4ai', as it already includes the added feature, which should be the only reason.