Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@jancurn
Last active January 11, 2023 17:31
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jancurn/ecf3f04aea3c245498e06a913ce54115 to your computer and use it in GitHub Desktop.
Save jancurn/ecf3f04aea3c245498e06a913ce54115 to your computer and use it in GitHub Desktop.
Puppeteer's page.authenticate() does not work for proxy authorization!
const puppeteer = require('puppeteer');
(async() => {
const proxyUrl = 'http://proxy.example.com:8000';
const username = 'bob';
const password = 'password123';
const browser = await puppeteer.launch({
args: [`--proxy-server=${proxyUrl}`],
headless: false,
});
const page = await browser.newPage();
await page.authenticate({ username, password });
await page.goto('https://www.example.com');
await browser.close();
})();
@aditodkar
Copy link

But Apify platform is also built on aws lambda right?

@mnmkng
Copy link

mnmkng commented Jan 10, 2023

Not at all :) Apify runs primarily on EC2 and Actors run in Docker.

@aditodkar
Copy link

Not at all :) Apify runs primarily on EC2 and Actors run in Docker.

Thanks a lot for the info :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment