{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/zh/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"浏览器","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"浏览器","__idx":0},"children":["浏览器"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["通过 MoreLogin 本地 API 以编程方式管理测浏览器环境。"]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"概述","__idx":1},"children":["概述"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["浏览器 API 允许您使用唯一的指纹创建、启动和控制浏览器。它专为多帐户管理、网络抓取和自动化测试等自动化场景而设计。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["基本网址"]},"：",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["http://127.0.0.1:40000"]}]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["本地 API 与 MoreLogin 桌面应用程序一起在您的计算机上运行。所有请求必须来自同一台机器。"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"能力","__idx":2},"children":["能力"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"资源"},"children":["资源"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"描述"},"children":["描述"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"关键操作"},"children":["关键操作"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["浏览器"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["指纹浏览器实例"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["创建、启动、停止、删除、修改、检查状态"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["代理"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["浏览器的代理配置"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["添加、更新、删除、列出代理"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["分组"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["将浏览器环境分组"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["创建、编辑、删除分组"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["标签"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["用标签标记浏览器环境"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["创建、编辑、删除标签"]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"快速示例","__idx":3},"children":["快速示例"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["创建并启动 Chrome 浏览器："]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"# 1. Create a profile\ncurl -X POST \"http://127.0.0.1:40000/api/env/create/quick\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"browserTypeId\": 1, \"operatorSystemId\": 1, \"quantity\": 1}'\n\n# 2. Start the profile (use envId from step 1)\ncurl -X POST \"http://127.0.0.1:40000/api/env/start\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"envId\": \"YOUR_ENV_ID\"}'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["开始后，您将收到："]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["调试端口"]}," — 用于 Selenium/Puppeteer 连接"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["WebDriver 路径"]}," — 用于浏览器自动化"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"自动化集成","__idx":4},"children":["自动化集成"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"selenium","__idx":5},"children":["Selenium"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"from selenium import webdriver\n\noptions = webdriver.ChromeOptions()\noptions.debugger_address = \"127.0.0.1:DEBUG_PORT\"\ndriver = webdriver.Chrome(\n    executable_path=\"WEBDRIVER_PATH\",\n    options=options\n)\ndriver.get(\"https://example.com\")\n","lang":"python"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"puppeteer","__idx":6},"children":["Puppeteer"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"const puppeteer = require('puppeteer');\n\nconst browser = await puppeteer.connect({\n  browserWSEndpoint: 'ws://127.0.0.1:DEBUG_PORT'\n});\nconst page = await browser.newPage();\nawait page.goto('https://example.com');\n","lang":"javascript"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"要求","__idx":7},"children":["要求"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["MoreLogin 桌面应用程序 ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["v2.15.0+"]}," 已安装并运行"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["已登录您的 MoreLogin 帐户"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["请求必须来自本地机器"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["注意"]},"：本地 API 还支持云手机管理端点。对于云手机操作，我们建议使用",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/zh/api-reference/cloud-phone"},"children":["开放 API"]}," 来实现远程访问功能。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["有关身份验证的详细信息，请参阅",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/zh/api-reference/getting-started/authentication"},"children":["身份验证"]},"。"]}]},"headings":[{"value":"浏览器","id":"浏览器","depth":1},{"value":"概述","id":"概述","depth":2},{"value":"能力","id":"能力","depth":2},{"value":"快速示例","id":"快速示例","depth":2},{"value":"自动化集成","id":"自动化集成","depth":2},{"value":"Selenium","id":"selenium","depth":3},{"value":"Puppeteer","id":"puppeteer","depth":3},{"value":"要求","id":"要求","depth":2}],"frontmatter":{"seo":{"title":"浏览器"}},"lastModified":"2026-06-10T12:22:57.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/zh/api-reference/browser","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}