Mở/Tắt môi trường
Path:/api/v1/browser/start
Method:POST
Content-Type:application/json
Mô tả giao diện: Dùng để khởi động môi trường được chỉ định, sau khi khởi động thành công có thể lấy giao diện gỡ lỗi (debug port) của trình duyệt để thực thi tập lệnh tự động hóa Selenium và Puppeteer.
Tham số yêu cầu
| Tên tham số | Loại | Bắt buộc | Chuỗi mẫu/Giá trị mặc định | Mô tả |
| Session_ID | array | Có | 373808cb37bd63f5f7d92415e736e85f,705cc4c139e69b729a2fd277f30e1863 | ID môi trường |
| isHeadless | boolean | Không | true | true:Chế độ không đầu (Headless) mặc định false:Chế độ có đầu (GUI) |
| args | array | Không | "args": ["--disable-extensions", "--blink-settings=imagesEnabled=false"] | Tham số khởi động |
Ví dụ yêu cầu một môi trường đơn lẻ
{
"Session_ID": [
"373808cb37bd63f5f7d92415e736e85f"
],
"args": [
"--disable-extensions",
"--enable-logging",
"--v=1",
"--blink-settings=imagesEnabled=false"
]
} Ví dụ yêu cầu nhiều môi trường
{
"Session_ID": [
"373808cb37bd63f5f7d92415e736e85f",
"705cc4c139e69b729a2fd277f30e1863"
],
"args": [
"--disable-extensions",
"--blink-settings=imagesEnabled=false",
"--interval-seconds=3"
]
} --disable-extensions Vô hiệu hóa tiện ích mở rộng
--blink-settings=imagesEnabled=false Cấm tải hình ảnh
--interval-seconds Thời gian giãn cách giữa các lần khởi động trình duyệt (giây)
Trả về khi thực thi thành công
{
"message": "Success",
"code": 0,
"data": {
"listid": [{
"Session_Name": "Môi trường kinh doanh 1",
"Session_ID": "373808cb37bd63f5f7d92415e736e85f",
"Group_Name": "default",
"Actived_script_id": "O73808cb37bd63f5f7d92415e736e999",
"Actiived_script_name": "Đây là một ví dụ tập lệnh",
"Actiived_script_encode": "true",
"Weblogin_Account_Count": "4",
"Weblogin_Account_name": "aaa@163.com, aaa1@163.com, aaa2@163.com, aaa3@163.com",
"Plugins_Count": "4",
"Plugin_Id": "jjbnhpnlakcdgfnnldamfeinfmahhdlm,jjbnhpnlakcdgfnnldamfeinfmahhdlm,jjbnhpnlakcdgfnnldamfeinfmahhdlm,jjbnhpnlakcdgfnnldamfeinfmahhdlm",
"template_id": "123456",
"template_name": "TikTok phiên bản quốc tế",
"browser_Path": "D:\\mbbrowser\\Chromium_x64\\chromium.exe",
"browser_CDP_Port": 46973,
"MBData_Path": "C:\\MBDATA\xxxxxxxxxx\xxxxxxxxxx\xxxxxxxxxxx",
"Public_ip": "8.208.80.219",
"Internel_ip": "192.168.225.69",
"isDynamicIp": false,
"StartPage": "about:blank",
"proxyType": "socks5",
"proxy_ip": "127.0.0.1",
"proxy_port": "1080",
"isHeadless": "true",
"webdriver": "C:\\Users\\Administrator\\houniao\\Driver\\100\\chromedriver.exe", //Trả về đường dẫn trình điều khiển webdriver tương ứng dựa trên nhân trình duyệt đang mở
"status": 0
}],
"total": 1
}
}
