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
fix: Use Path.write_bytes() to avoid SYNC230 lint error
avocardio9ce8416b50d8
diff --git a/browser_use/browser/session.py b/browser_use/browser/session.pyindex 448705271..7087e305d 100644--- a/browser_use/browser/session.py+++ b/browser_use/browser/session.py@@ -2304,9 +2304,7 @@ class BrowserSession(BaseModel):screenshot_data = base64.b64decode(result['data'])- if path:- with open(path, 'wb') as f:- f.write(screenshot_data)+ if path: Path(path).write_bytes(screenshot_data)return screenshot_data