Forked from princePeterHansen/puppeteer_with_proxy.js
Created
August 5, 2022 06:19
-
-
Save epk2112/286efa602df89e53b3c62c3f76fa4519 to your computer and use it in GitHub Desktop.
Using a proxy in puppeteer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const puppeteer = require('puppeteer'); | |
async function run() { | |
const browser = await puppeteer.launch({ | |
headless: false, | |
args: [ '--proxy-server=200.73.128.156:3128' ] | |
}); | |
const page = await browser.newPage(); | |
const pageUrl = 'https://whatismyipaddress.com/'; | |
await page.goto(pageUrl); | |
} | |
run(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment