Selenium + luminati

安装好lpm后,selenium通过如下代码即可使用luminati

const {Builder, By, Key, until} = require(‘selenium-webdriver’);

const proxy = require(‘selenium-webdriver/proxy’);
(async function example() {
let driver = await new Builder().forBrowser(‘firefox’)
.setProxy(proxy.manual( {http : ‘127.0.0.1:24000’,
https : ‘127.0.0.1:24000’ })).build()

try {
await driver.get(‘http://lumtest.com/myip.json’);
driver.switchTo().alert().accept();
} finally {

await driver.quit();
}})();

selenium + luminati视频教程 >>