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
preload url fix punctuation
Magnus Müller2246231cfc5e
diff --git a/browser_use/agent/service.py b/browser_use/agent/service.pyindex 9461b21d4..4a1658503 100644--- a/browser_use/agent/service.py+++ b/browser_use/agent/service.py@@ -1205,6 +1205,8 @@ class Agent(Generic[Context, AgentStructuredOutput]):match = re.search(pattern, task)if match:url = match.group(0)+ # Remove trailing punctuation that's not part of URLs+ url = re.sub(r'[.,;:!?]+$', '', url)# Add https:// if missingif not url.startswith(('http://', 'https://')):url = 'https://' + url