Puppeteer
npm install puppeteer proxy-chainconst puppeteer = require('puppeteer');
const proxyChain = require('proxy-chain');
(async () => {
const oldProxyUrl = 'http://account-accountName-pipeline-pipelineName:[email protected]:7000'; // Replace with your Nimble Pipeline proxy credentials
const newProxyUrl = await proxyChain.anonymizeProxy(oldProxyUrl);
const browser = await puppeteer.launch({
args: [
'--no-sandbox',
'--disable-setuid-sandbox',
`--proxy-server=${newProxyUrl}`, // Use the new anonymized proxy URL
],
});
const page = await browser.newPage();
await page.goto('https://example.com'); // Replace with your target URL
console.log('Page loaded');
// Add any actions you want to perform on the page here
// Close the anonymized proxy server
await proxyChain.closeAnonymizedProxy(newProxyUrl, true);
await browser.close();
})();