VMLogin防关联浏览器如何结合使用puppeteer?

Vmlogin如何结合使用puppeteer?

1 .使用启动API,http://127.0.0.1:35000/api/v1/profile/start?skiplock=true&profileId=F6321820-2002-4A19-A69E-0E99F376D912

启动API会返回:{“status”:”OK”,”value”:”http://127.0.0.1:18500″}

  1. 用第1步返回的IP和端口访问:http://127.0.0.1:18500/json

返回一个JSON串:

[{
   "description": "",
   "devtoolsFrontendUrl": "/devtools/inspector.html?ws=127.0.0.1:18500/devtools/page/02F027712DE2BA4145EE36E931059659",
   "id": "02F027712DE2BA4145EE36E931059659",
   "title": "chrome-extension://dagmmllgpkkckbdaajfbgoggapbbdjjl/_generated_background_page.html",
   "type": "background_page",
   "url": "chrome-extension://dagmmllgpkkckbdaajfbgoggapbbdjjl/_generated_background_page.html",
   "webSocketDebuggerUrl": "ws://127.0.0.1:18500/devtools/page/02F027712DE2BA4145EE36E931059659"
}, {
   "description": "",
   "devtoolsFrontendUrl": "/devtools/inspector.html?ws=127.0.0.1:18500/devtools/page/CDCACE037C559665B711BB9E7660F8EF",
   "faviconUrl": "https://browserleaks.com/favicon.ico",
   "id": "CDCACE037C559665B711BB9E7660F8EF",
   "parentId": "508D1161361C48BB30109B1B516B407F",
   "title": "https://googleads.g.doubleclick.net/pagead/html/r20210914/r20190131/zrt_lookup.html",
   "type": "iframe",
   "url": "https://googleads.g.doubleclick.net/pagead/html/r20210914/r20190131/zrt_lookup.html",
   "webSocketDebuggerUrl": "ws://127.0.0.1:18500/devtools/page/CDCACE037C559665B711BB9E7660F8EF"
}]

  1. 第2步返回的,webSocketDebuggerUrl 就是 puppeteer 连接浏览器websocks协议地址。