3
This commit is contained in:
1 parent
de6b43aa25
commit
b2e3ccea91
1 file changed
+6
-7
@@ -207,15 +207,14 @@ async def run_browser_task(task_id: str, task: str, max_steps: int, model: str):
|
|||||||
if i % 5 == 0:
|
if i % 5 == 0:
|
||||||
print(f"[{task_id}] Waiting for CDP at {cdp_url}... (attempt {i})")
|
print(f"[{task_id}] Waiting for CDP at {cdp_url}... (attempt {i})")
|
||||||
|
|
||||||
if not cdp_ready:
|
if not cdp_ready:
|
||||||
with open(f"/tmp/chrome_{task_id}.log", "r") as f:
|
with open(f"/tmp/chrome_{task_id}.log", "r") as f:
|
||||||
print(f"[{task_id}] Chrome Logs:\n{f.read()}")
|
print(f"[{task_id}] Chrome Logs:\n{f.read()}")
|
||||||
if task_id != "startup":
|
if task_id != "startup":
|
||||||
raise RuntimeError(f"Failed to start Chrome or CDP not ready after 30s at {cdp_url}")
|
raise RuntimeError(f"Failed to start Chrome or CDP not ready after 30s at {cdp_url}")
|
||||||
|
|
||||||
# Подключаемся через CDP
|
# Подключаемся через CDP
|
||||||
from browser_use import BrowserConfig
|
browser = Browser(cdp_url=cdp_url)
|
||||||
browser = Browser(config=BrowserConfig(cdp_url=cdp_url))
|
|
||||||
else:
|
else:
|
||||||
# Обычный запуск
|
# Обычный запуск
|
||||||
browser_profile = BrowserProfile(
|
browser_profile = BrowserProfile(
|
||||||
|
|||||||
Reference in new issue
Block a user