From a6e2aed48284f7eb5aabd9f3e731d6022ad8612f Mon Sep 17 00:00:00 2001 From: mshe <666666666@666666666.666666666> Date: Mon, 8 Jun 2026 17:02:32 +0800 Subject: [PATCH] update start.sh --- app.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/app.py b/app.py index 1258150..7c4b082 100755 --- a/app.py +++ b/app.py @@ -21,10 +21,16 @@ async def mail_qq_spider(account: str,display: int) -> str: Returns: str: 爬虫结果 """ - os.environ['DISPLAY'] = f':{display}' # 改成你的 VNC 显示器编号 - - result = await asyncio.to_thread(a1, account, display) - return result + data={"display": display} + try: + os.environ['DISPLAY'] = f':{display}' + result = await asyncio.to_thread(a1, account, display) + data["status"] = 200 + data["result"] = result + return json.dumps(data, ensure_ascii=False) + except Exception as e: + data["status"] = 500 + return json.dumps(data, ensure_ascii=False) @mcp.tool() async def start_vnc_server(display: int) -> str: """启动VNC服务