Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.
Python ai-agentsai-toolsbrowser-agentbrowser-automationbrowser-usecdpcloud-browsercomputer-useheadless-browserllmmcpplaywrightpythonremote-browserstealth-browserweb-automationweb-scraping
also remove remote debug addr flag
Nick Sweeting73c5668f4637
diff --git a/browser_use/browser/browser.py b/browser_use/browser/browser.pyindex c8da3f284..888f26932 100644--- a/browser_use/browser/browser.py+++ b/browser_use/browser/browser.py@@ -6,6 +6,7 @@ import asyncioimport gcimport loggingimport os+import socketimport subprocessfrom typing import Literal@@ -250,12 +251,10 @@ class Browser:}# check if port 9222 is already taken, if so remove the remote-debugging-port arg to prevent conflicts- try:- response = requests.get('http://localhost:9222/json/version', timeout=2)- if response.status_code == 200:+ with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:+ if s.connect_ex(('localhost', 9222)) == 0:chrome_args.remove('--remote-debugging-port=9222')- except Exception:- pass+ chrome_args.remove('--remote-debugging-address=0.0.0.0')browser_class = getattr(playwright, self.config.browser_class)args = {