Vmlogin结合使用puppeteer

1 .使用启动API:

http://127.0.0.1:35000/api/v1/profile/start?skiplock=true&profileId=xxxxxxxxxxxxxxxxxxxxxxxxxxx

启动API会返回:

{"status":"OK","value":"http://127.0.0.1:18500"}



2. 用第1步返回的IP和端口访问:

http://127.0.0.1:18500/json/version

返回一个JSON串:

{
   "Browser": "Chrome/102.0.5005.63",
   "Protocol-Version": "1.3",
   "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.63 Safari/537.36",
   "V8-Version": "10.2.154.4",
   "WebKit-Version": "537.36 (@a45dd701fe466f94d3b0e13d1e51227b77b2b9ef)",
   "webSocketDebuggerUrl": "ws://127.0.0.1:18500/devtools/browser/15ed04d8-c64c-46a3-8b9a-f0f1dc27f586"
}


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