-
-
Notifications
You must be signed in to change notification settings - Fork 6k
Open
Labels
🐞 BugSomething isn't workingSomething isn't working📌 Root causedidentified the root cause of bugidentified the root cause of bug
Description
crawl4ai version
0.8.0
Expected Behavior
While in a crawl run, use 'q' to quit the loop gracefully. Also, not throw errors if code is not ran on Linux.
Current Behavior
- Terminal is blocked, the only way to stop the crawl run in to Ctrl-C, leading to plenty of errors being displayed.
- At the beginning of any crawl run, an import error is thrown.
Same issue as this bug from another project, which was linked in this bug in your repo
Is this reproducible?
Yes
Inputs Causing the Bug
- Windows Machine
- arun_many function from AsyncWebCrawler
- Default browser config, headless and verbose.
- Run config cache_mode = CacheMode.BYPASS, stream=FalseSteps to Reproduce
1. Create a function that uses AsyncWebCrawler.arun_many()
2. Run that function on a non-Linux machineCode snippets
from crawl4ai import BrowserConfig, CrawlerRunConfig, CacheMode, MemoryAdaptiveDispatcher, CrawlerMonitor, AsyncWebCrawler
import asyncio
async def crawl_list(urls_list: list) -> None:
browser_config = BrowserConfig(headless=True, verbose=False)
run_config = CrawlerRunConfig(
cache_mode=CacheMode.BYPASS,
stream=False # Default: get all results at once
)
dispatcher = MemoryAdaptiveDispatcher(
memory_threshold_percent=70.0,
check_interval=1.0,
max_session_permit=10,
monitor=CrawlerMonitor(enable_ui=True)
)
async with AsyncWebCrawler(config=browser_config) as crawler:
results = await crawler.arun_many(
urls=urls_list,
config=run_config,
dispatcher=dispatcher
)
if __name__ == "__main__":
urls_list = ['https://www.google.com', 'https://www.live.com']
asyncio.run(crawl_list(urls_list))OS
Windows
Python version
3.12.10
Browser
Default (Chromium?)
Browser version
Default (idk dude)
Error logs & Screenshots (if applicable)
(When pressing Ctrl-C to quit)

Metadata
Metadata
Assignees
Labels
🐞 BugSomething isn't workingSomething isn't working📌 Root causedidentified the root cause of bugidentified the root cause of bug