'getting error trying to connect proxy to pupeteer
Im getting the error Error: net::ERR_TIMED_OUT at http://lumtest.com/myip.json
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch({
headless: false,
args: ['--proxy-server=191.243.218.249:53281']
});
const page = await browser.newPage();
await page.authenticate();
await page.goto('http://lumtest.com/myip.json');
await page.screenshot({path: 'example.png'});
await browser.close();
})();
Solution 1:[1]
Try to use the prefered protocol before ip address and port.
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch({
headless: false,
args: ['--proxy-server=https://191.243.218.249:53281']
});
const page = await browser.newPage();
await page.authenticate();
await page.goto('http://lumtest.com/myip.json');
await page.screenshot({path: 'example.png'});
await browser.close();
})();
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Edi Imanto |