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
lint fixes
Nick Sweetinga2b97b64a910
diff --git a/browser_use/browser/session.py b/browser_use/browser/session.pyindex 42fd13d8a..cc874a172 100644--- a/browser_use/browser/session.py+++ b/browser_use/browser/session.py@@ -1258,7 +1258,7 @@ class BrowserSession(BaseModel):# assume they're using the old API when path meant a cookies_file path,# also save new format next to it for convenience to help them migrateawait self._save_cookies_to_file(cookies, path)- await self._save_storage_state_to_file(storage_state, (Path(path or self.browser_profile.cookies_file).parent) / 'storage_state.json')+ await self._save_storage_state_to_file(storage_state, path.parent / 'storage_state.json')logger.warning('⚠️ cookies_file is deprecated and will be removed in a future version. ''Please use storage_state="path/to/storage_state.json" instead for persisting cookies and other browser state. 'diff --git a/browser_use/utils.py b/browser_use/utils.pyindex 91bf543f6..7994b7118 100644--- a/browser_use/utils.py+++ b/browser_use/utils.py@@ -505,7 +505,7 @@ def get_browser_use_version() -> str:if pyproject_path.exists():import re- with open(pyproject_path, encoding="utf-8") as f:+ with open(pyproject_path, encoding='utf-8') as f:content = f.read()match = re.search(r'version\s*=\s*["\']([^"\']+)["\']', content)if match: