update start.sh
This commit is contained in:
parent
bccb369fe9
commit
a6e2aed482
14
app.py
14
app.py
|
|
@ -21,10 +21,16 @@ async def mail_qq_spider(account: str,display: int) -> str:
|
||||||
Returns:
|
Returns:
|
||||||
str: 爬虫结果
|
str: 爬虫结果
|
||||||
"""
|
"""
|
||||||
os.environ['DISPLAY'] = f':{display}' # 改成你的 VNC 显示器编号
|
data={"display": display}
|
||||||
|
try:
|
||||||
result = await asyncio.to_thread(a1, account, display)
|
os.environ['DISPLAY'] = f':{display}'
|
||||||
return result
|
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()
|
@mcp.tool()
|
||||||
async def start_vnc_server(display: int) -> str:
|
async def start_vnc_server(display: int) -> str:
|
||||||
"""启动VNC服务
|
"""启动VNC服务
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue