Selenium
npm install selenium-webdriver proxy-chainconst { Builder } = require('selenium-webdriver');
const proxyChain = require('proxy-chain');
const chrome = require('selenium-webdriver/chrome');
(async () => {
const oldProxyUrl = 'http://account-accountName-pipeline-pipelineName:[email protected]:7000'; // Replace with your actual proxy credentials and URL
const newProxyUrl = await proxyChain.anonymizeProxy(oldProxyUrl);
const options = new chrome.Options();
options.addArguments(`--proxy-server=${newProxyUrl}`);
const driver = await new Builder()
.forBrowser('chrome')
.setChromeOptions(options)
.build();
try {
await driver.get('https://example.com'); // Replace with your target URL
console.log('Page loaded');
// Add any actions you want to perform on the page here
} finally {
await driver.quit();
await proxyChain.closeAnonymizedProxy(newProxyUrl, true);
}
})();