I am currently trying to do web scraping with node and puppeteer headless chrome. I use a voting website, where you can vote only 1time/hour, and I am trying to vote more (like 10times/hour for exemple). For this purpose I use different IP adresses and different User Agent. But, the problem is, when I switch IP it doesn't seems to work( I cannot put an other vote) and when I check my IP on (on some website like https://ipcost.com/) I see my real Ip address.
Here is the code I use to achieve this:
const chromeOptions = {
headless:false,
defaultViewport: null,
args: [
'--disable-features=IsolateOrigins,site-per-process',
'--flag-switches-begin --disable-site-isolation-trials --flag-switches-end',
'--disable-features=UserAgentClientHint',
`--proxy-server=http=user::passwordx@ip:port`
]
(async() => {
const browser = await puppeteer.launch(chromeOptions);
....
})()
};
This is the first time I am working on web scraping and I use proxy like that. I wasn't able to find any answer to my question, I think I am missing something or I am doing something wrong.
Thanks in advance for your help
Okay I got the answer. In fact pupperteer does not manage authentication proxy request So I change
`--proxy-server=http=user::passwordx@ip:port`
by
`--proxy-server=http://ip:port`
and add
await page.authenticate({
username: 'username',
password: 'password'
})