From 25be609dae7f25b18a8e374e8de86537bc7e4746 Mon Sep 17 00:00:00 2001 From: imnyang Date: Sat, 14 Jun 2025 22:11:41 +0900 Subject: [PATCH] =?UTF-8?q?[Enhancement]=20Browser=20Use=20=ED=8C=A8?= =?UTF-8?q?=ED=82=A4=EC=A7=80=20=EB=B2=84=EC=A0=84=20=EC=97=85=EB=8D=B0?= =?UTF-8?q?=EC=9D=B4=ED=8A=B8=20=EB=B0=8F=20subprocess=EB=A5=BC=20?= =?UTF-8?q?=ED=86=B5=ED=95=9C=20=ED=8C=A8=ED=82=A4=EC=A7=80=20=EC=A0=95?= =?UTF-8?q?=EB=B3=B4=20=EC=B6=9C=EB=A0=A5=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 14 ++++++++++++-- uv.lock | 8 ++++---- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/main.py b/main.py index ad7bb31..b53a1af 100644 --- a/main.py +++ b/main.py @@ -39,6 +39,17 @@ if os.getenv("GOOGLE_PLANNER_MODEL") is None: backend_url = os.getenv("BACKEND_URL", "http://localhost:11081") print("🔧 환경 설정:") +try: + # run uv pip show browser-use + import subprocess + result = subprocess.run( + ["uv", "pip", "show", "browser-use"], capture_output=True, text=True, check=True + ) + + print("📦 Browser Use 패키지 정보:") + print(result.stdout.strip()) +except ImportError: + browser_use_version = "unknown" print(f"🔗 Backend URL: {backend_url}") api_key = os.getenv("GOOGLE_API_KEY") print(f"🔑 Google API Key: {api_key[-4:] if api_key else None}") @@ -159,7 +170,7 @@ async def scan_one_url(url: str, skip_html_check: bool = False): if storage_state_temp_path.exists(): storage_state_temp_path.unlink() storage_state_temp_path.write_text( - storage_state_path.read_text(), encoding="utf-8" + storage_state_path.read_text(encoding="utf-8"), encoding="utf-8" ) print(f"🔄 Using existing storage state: {storage_state_temp_path}") else: @@ -173,7 +184,6 @@ async def scan_one_url(url: str, skip_html_check: bool = False): headless=False, # user_data_dir=str(user_data_path), user_data_dir=None, - executable_path="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome", storage_state=( str(storage_state_temp_path) if storage_state_temp_path and storage_state_temp_path.exists() diff --git a/uv.lock b/uv.lock index acf776e..cb6a0d6 100644 --- a/uv.lock +++ b/uv.lock @@ -103,7 +103,7 @@ wheels = [ [[package]] name = "browser-use" -version = "0.2.6" +version = "0.2.7" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "aiofiles" }, @@ -134,9 +134,9 @@ dependencies = [ { name = "typing-extensions" }, { name = "uuid7" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/50/75/1b5f7e63bcb6bf6426e3c74a9b15d538fe4dae7f988b01852ee003cef1bc/browser_use-0.2.6.tar.gz", hash = "sha256:8a7f1b2217fb344101a36473446073ad642f259197477f5d7044124f2ba7d895", size = 151752, upload-time = "2025-06-10T10:55:42.02Z" } +sdist = { url = "https://files.pythonhosted.org/packages/42/86/8d25175730145a8f94715e5ceb3e050d8221fc81d7dee8c8f18ddf4206a3/browser_use-0.2.7.tar.gz", hash = "sha256:a2e0b0eb34e6fb5ef46e4e10ad0b4a42854fc2445d3e53b3ba393b9295019725", size = 155467, upload-time = "2025-06-14T08:55:54.739Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/ac/d4/695a753f3631d8888fa6942154254291473ee6cbde4938505024b39e244b/browser_use-0.2.6-py3-none-any.whl", hash = "sha256:9142ee79555eca1ea29aad0a8b44d31f4f50a3a8d7e91ca6367fb733bc36a4e1", size = 168764, upload-time = "2025-06-10T10:55:40.474Z" }, + { url = "https://files.pythonhosted.org/packages/e7/93/2305e33ca4470abafd087be820256bd96c495ab685425582d811bb22837a/browser_use-0.2.7-py3-none-any.whl", hash = "sha256:bc534a369ef85ff3905abae05dab1d4a996676ad285a3dff9aa6c5211854872d", size = 172584, upload-time = "2025-06-14T08:55:53.355Z" }, ] [package.optional-dependencies] @@ -155,7 +155,7 @@ dependencies = [ [package.metadata] requires-dist = [ - { name = "browser-use", extras = ["memory"], specifier = ">=0.2.6" }, + { name = "browser-use", extras = ["memory"], specifier = ">=0.2.7" }, { name = "patchright", specifier = ">=1.52.5" }, ]