Puppeteer
Puppeteer is a commonly used browser automation tool that can be useful for accessing and processing web pages programatically. In this guide, we'll walk you step-by-step through connecting Puppeteer with Nimble IP used Node.js.
This guide assumes you have already installed Puppeteer and Node.js on the relevant computer/server.
To use Puppeteer with Nimble IP, first install the proxy-chain extension.
With proxy-chain installed, we can now build our main script:
Explanation:
Anonymize the Proxy URL: The
proxyChain.anonymizeProxy(oldProxyUrl)
function takes your proxy URL (which includes the username and password for authentication) and creates a new anonymized proxy URL. This URL will be used by Puppeteer to route its requests.Use the New Proxy URL in Puppeteer: The new proxy URL is passed as an argument to Puppeteer's
launch
method. This lets Puppeteer connect through the proxy without needing to handle the authentication headers manually.Clean Up: After your browsing is done, it’s good practice to close the anonymized proxy server using
proxyChain.closeAnonymizedProxy(newProxyUrl, true)
, which ensures that the server is not left running unnecessarily.
This method effectively integrates Nimble IP seamlessly with Puppeteer, allowing for all the benefits of Nimble IP to be used in conjunction with existing Puppeteer-based workflows.
If you're interested in upgrade to a modern data Browser, we recommend seeing Nimble Unlocker Proxy.