Puppeteer

Puppeteer proxy setup

Daria avatar
Written by Daria
Updated over a week ago

Puppeteer is a popular tool for web scraping and parsing. The installation process couldn't be simpler, which means you can get started quickly even if this isn’t something that's been done before!



First of all for work with Puppeteer install Node.js. You can download the latest version of Node.js from the official website: Node.js Downloads.


As an example, we've shown the set-up process for the IP authorisation method. Here are the steps which will help you to install Puppeteer and run your project:

1. Create a Folder for Your Project Puppeteer project;

2. Open a Command Prompt;
3. Navigate to Your Project Folder: and Example - cd C:\path\to\your\project ;

4. Initialize a Node.js Project: Run the following command to create a package.json file for your project: npm init -y

5. Install Puppeteer with the following command: npm install puppeteer

6. Create a JavaScript File in your project folder and paste the Puppeteer script you have into the file. You can open the file with Notepad, insert the script and save it. . Example name script.js

7. Run Your Puppeteer Script with the following command: node script.js

Congratulations, you're all set!

  • In Puppeteer, under the ‘proxy-server’, update the proxy server and port number (i.e. proxy.soax.com:10000).

For example:

const puppeteer = require('puppeteer');
async () => {
const browser = await puppeteer.launch({
headless: false,
args: ['--proxy-server=proxy.soax.com:10001']
});
const page = await browser.newPage();
await page.authenticate();
await page.goto('https://soax.com/');
await page.screenshot({path: 'example.png'});
await browser.close();
})();


For more detailed information - you can check out the official Puppeteer documentation, which should answer any queries you might have.

Did this answer your question?