跳转到内容

启动浏览器

Request

用于启动浏览器;您必须指定配置文件 ID。

启动成功后,您可以获取浏览器调试界面,用于 执行 Selenium 和 Puppeteer 自动化脚本。对于 Selenium,请使用 与相应内核版本匹配的 WebDriver。WebDriver 路径 可以从配置文件启动后的响应中获取。需要 MoreLogin 客户端版本 2.15.0 或更高版本。

Bodyapplication/jsonrequired
envIdstring

环境 ID。必须提供 envIduniqueId 中的一个。

如果同时提供了这两个 ID,则以 envId 为准。

Example:"1993244721490239488"
uniqueIdinteger

环境序列号(小整数 ID)。必须提供 envIduniqueId 中的一个。

如果两者都提供了,则 envId 优先。

Example:1
encryptKeystring

加密密钥。仅当环境启用端到端加密时才需要。

Example:"xxx"
isHeadlessboolean

是否以无头模式启动。如果省略,则默认为 false

注意:需要客户端版本 v2.36.0 或更高版本。

Example:false
cdpEvasionboolean

启用 CDP 指纹规避功能以降低检测风险。

仅适用于 PC 环境。

默认值:false

注意:需要客户端版本 v2.36.0 或更高版本。

Example:false
closeCheckIPPageboolean

Whether to skip opening the detection page. true: Proxy detection before execution false: Proxy detection after execution Note: Requires client version v2.56.0 or higher.

Example:false
checkIPErrorHandleinteger

Action to take if proxy detection fails Numeric type: 1 or 2 1: Do not start the environment if proxy detection fails 2: Start the environment even if proxy detection fails If closeCheckIPPage is passed a parameter, this parameter is omitted; default: 1 Note: Requires client version v2.56.0 or higher.

Example:1
POST
/api/env/start
curl -i -X POST \
  http://127.0.0.1:40000/api/env/start \
  -H 'Content-Type: application/json' \
  -d '{
    "envId": "1993244721490239488",
    "isHeadless": false,
    "cdpEvasion": true
  }'

Responses

Headers
any
Bodyapplication/json
codeinteger
msgstring
dataobjectrequired
Response
{ "code": 0, "msg": "string", "data": { "envId": "string", "debugPort": "string", "type": "string", "version": 0, "webdriver": "string" } }