Profiles launched through the WADE X anti-detect browser operate with the DevTools Protocol enabled.
To automate actions in the anti-detect browser using popular marketing tools such as Puppeteer, Selenium, Postman, or other compatible options, you need to launch a browser profile and connect to it using the port generated during the launch.
To create a profile, send a POST request to the following address:
POST
http://127.0.0.1:40080/sessions/create_quick
The profile will be created with the selected provider on your desktop.
The response will include the name of the newly created profile and its unique "uuid", which serves as a foundation for further script operations.
{
"name": "Default provider 4",
"uuid": "19bb5764-98a3-4ee1-bff8-5306e434493d"
}
Once the required profile's "uuid" is obtained, you can launch the profile by sending a POST request to:
POST
http://127.0.0.1:40080/sessions/start
and passing the following data in the body:
{
"uuid": "3d82892d-6426-45fd-a42a-a217975a711a",
"headless": false,
"debug_port": 12345,
}
The parameters "headless" and "debug_port" are optional. If they are not specified, the profile will launch without "headless" mode, and the port will be assigned automatically.
If everything is executed correctly, the response will return a structure similar to the following:
{
"debug_port": 12345,
"uuid": "3d82892d-6426-45fd-a42a-a217975a711a",
}
To work with Selenium, download and install ChromeWebDriver by selecting the appropriate version for your operating system:
To connect Selenium to an already launched browser, use the following code:
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.chrome.service import Service
debug_port = 12345
chromedriver_path = 'ваш/путь/к/chromedriver.exe'
options = Options()
options.add_experimental_option("debuggerAddress", f"127.0.0.1:{debug_port}")
service = Service(executable_path=chromedriver_path)
driver = webdriver.Chrome(service=service, options=options)
driver.get("https://ls.app")
print(driver.title)
driver.quit()
An example of connecting to a launched profile using Puppeteer:
const puppeteer = require('puppeteer');
(async() => {
const debugPort = 12345;
const browser = await puppeteer.connect({ browserURL: `http://localhost: ${debugPort}`});
const page = await browser.newPage();
await page.goto('https://ls.app');
console.log(await page.title());
await browser.close();
})();
To stop a profile via the API, send a POST request to the following address:
POST
http://127.0.0.1:40080/sessions/stop
and specify the "uuid" in the request body:
{
"uuid": "3d82892d-6426-45fd-a42a-a217975a711a"
}
📖 Find detailed documentation on working with the API