Skip to content

Enhancing Web Automation with Nodriver: An Alternative to Selenium and Playwright #551

Closed Answered by unclecode
prokopis3 asked this question in Forums - Q&A
Discussion options

You must be logged in to vote

@prokopis3 Thx for the interest in Crawl4ai and such a good suggestion. Actually, crawl4ai already supports direct CDP communication - we just use Playwright as a thin WebSocket wrapper. Here's what's possible right now:

# Direct CDP connection using existing browser 
browser_config = BrowserConfig(
    use_managed_browser=True,  # This enables CDP mode
    debugging_port=9222,  # Default CDP port
    user_data_dir="/path/to/chrome/profile",  # Real user profile
    headless=False  # For real browser 
)

# Or let crawl4ai launch browser in CDP mode
browser_config = BrowserConfig(
    use_managed_browser=True,
    browser_type="chromium",
    user_data_dir="~/.config/google-chrome",
    de…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by prokopis3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants