Closed Jeferson100 closed 1 week ago
I'm facing the face issue, hopefully it is resolved soon.
@Jeferson100 @cokecanpapi Thx for trying the library. The error you are facing is because you're using the synchronous version of Crawl4ai which we no longer maintain it, however this bug is temporarily fixed for those who still want to use it and and will be available in version 0.3.74, which will be released today or tomorrow. However we no longer support the sync version. Please switch to the asynchronous version, as it's much faster. We may deprecate the synchronous version soon.
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())
Thank you, it worked.
Thank you!
You all welcome, btw I assum the sync version also is fixed.
I was testing the notebook from the video on my machine and encountered the following error: [ERROR] π« Failed to crawl https://www.eu-startups.com/directory/, error: name 'CustomHTML2Text' is not defined