I want to scrap this site http://cheapinsurancebyzip.info/medicare using puppeteer node js and proxy serevers from iproyal. When I scrap this using http or https protocol, its gives error. SO I have to use socks5 protocol for this, But its not changing my public ip.
This is my code if I use http
const launch = async (
url = 'http://cheapinsurancebyzip.info/medicare',
index = 1
) => {
const puppeteer = require('puppeteer');
const browser = await puppeteer.launch({
executablePath: 'chrome-win/chrome.exe',
args: [
// ! Error: Socks connect tcp 168.xxx.xxx.xxx:xxxxx-> unknown error host unreachable
// '--proxy-server=http://geo.iproyal.com:12321',
// * NO error but ip remains same as before ( 58.65.164.138 )
'--proxy-server=socks5=http://geo.iproyal.com:42324',
],
});
const page = await browser.newPage();
await page.authenticate({
username: 'myusername',
password: 'mypassword',
});
await page.goto(url);
console.log('page loaded');
const axios = require('axios');
const response = await axios.get('https://api.ipify.org');
const publicIp = response.data;
console.log('publicIp', publicIp);
return;
// browser.close();
};
I tried changing proxy servers of iproyal but it not worked. My Iproyal proxy servers are also getting proxy royal residential api of iproyal.