Update api.py
Browse files
api.py
CHANGED
@@ -249,6 +249,7 @@ async def open_browser(request: Request):
|
|
249 |
resp = await client.get(f"http://127.0.0.1:{port}/json/version")
|
250 |
if resp.status_code == 200:
|
251 |
browser_info = resp.json()
|
|
|
252 |
ws_url = browser_info.get("webSocketDebuggerUrl").replace("ws://127.0.0.1", "wss://0.0.0.0")
|
253 |
# 去掉端口号
|
254 |
ws_url = re.sub(r":\d+", "", ws_url)
|
|
|
249 |
resp = await client.get(f"http://127.0.0.1:{port}/json/version")
|
250 |
if resp.status_code == 200:
|
251 |
browser_info = resp.json()
|
252 |
+
logger.info(f"Browser opened with ID: {browser_id}, Info: {browser_info}")
|
253 |
ws_url = browser_info.get("webSocketDebuggerUrl").replace("ws://127.0.0.1", "wss://0.0.0.0")
|
254 |
# 去掉端口号
|
255 |
ws_url = re.sub(r":\d+", "", ws_url)
|