I'm using Puppeteer and JS to write a web scraper. The site I'm scraping is pretty intense, so I need to use a local chrome instance and a residential proxy service to get it working. Here's my basic setup.
const chromeProcess = spawn(chromePath, [
`--remote-debugging-port=${PORT}`,
`--user-data-dir=${userDataDir}`,
`--proxy-server=${proxyUrl}`,
"--no-first-run",
"--no-default-browser-check",
"--disable-extensions",
"--start-maximized",
"--disable-features=IsolateOrigins,site-per-process"
], { stdio: "ignore" });
let browser = await puppeteer.connect({ browserURL: `http://127.0.0.1:${PORT}` });
let page = await browser.newPage();
I've been getting a multitude of errors trying to get the proxy service working, however, (like net::ERR_NO_SUPPORTED_PROXIES) where the page won't load, or will show a "page not found" error in the browser. I've tried tunneling with mitmproxy with no luck, so I'm just not sure what's possible at this point.
Does anyone have any insight into using proxies with a local chrome instance? Is this even possible?
net::ERR_NO_SUPPORTED_PROXIESerror when I try to connect with a proxy as shown above. This is happening for all sites. The site is intense enough that it tracks IP so I need to use the proxy service, but this is more of a general question about how to get this working with local chrome instances rather than a question about any specific website, as I've heard that puppeteer has problems with proxy + local chrome instance but could not find any solutions on how to get it working.