crawl4ai
crawl4ai copied to clipboard
[Bug]: Outdated Documentation regarding arun and arun_many return type
crawl4ai version
0.7.4
Expected Behavior
I noticed that the documentation regarding arun and arun_many suggests the return type be CrawlResult and nion[List[CrawlResult], AsyncGenerator[CrawlResult, None]] respectively. Which is incorrect, and doesn't provide auto-suggestion.
Looking through the code, the return for both methods are RunManyReturn, and in order to get the auto suggestion to work I have to cast it the following way
results = await crawler.arun(url=url, config=config)
result = cast(CrawlResult, result) // or result: CrawlResult = result
The commit where types were modified,
Current Behavior
arun and arun_many doesn't return CrawlResult and List[CrawlResult] as documentatiom suggests, and hence there is no auto-suggestion.
Is this reproducible?
Yes
Inputs Causing the Bug
Steps to Reproduce
Code snippets
OS
Linux
Python version
3.13
Browser
No response
Browser version
No response
Error logs & Screenshots (if applicable)
No response