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
refactor the imports
Naymul Islam1f3115e63a46
diff --git a/browser_use/controller/service.py b/browser_use/controller/service.pyindex 86cc720f3..56c0821b0 100644--- a/browser_use/controller/service.py+++ b/browser_use/controller/service.py@@ -2,7 +2,7 @@ import asyncioimport jsonimport loggingfrom typing import Dict, Generic, Optional, Type, TypeVar-+import datetimefrom langchain_core.language_models.chat_models import BaseChatModelfrom langchain_core.prompts import PromptTemplate@@ -191,8 +191,6 @@ class Controller(Generic[Context]):async def download_html(_: NoParamsAction, browser: BrowserContext) -> ActionResult:"""Retrieves and returns the full HTML content of the current page to a file"""try:- import re- import datetimepage = await browser.get_current_page()html_content = await page.content()