I know this is similar to https://support.scrapinghub.com/support/discussions/topics/22000010422
but I am using my API key. I'm not sure if I am using it in the right section, I am just following some of the documentation I have seen for puppeteer. Below are the relevant sections of my code.
args: [/*'--disable-dev-shm-usage', */
`--proxy-server=proxy.crawlera.com:8010`,'--ignore-certificaterrors https://httpbin.org/get'
],
ignoreHTTPSErrors: true
});
await page.setExtraHTTPHeaders({
'Proxy-Authorization': 'Basic ' + Buffer.from ('<MYAPIKEY>:').toString('base64'),
Thanks in advance
Hi,
The is kinda messy, but seem right.
I'm attaching a working example using puppeteer@1.17.0
Hope this helps.
varunsub
I know this is similar to https://support.scrapinghub.com/support/discussions/topics/22000010422
but I am using my API key. I'm not sure if I am using it in the right section, I am just following some of the documentation I have seen for puppeteer. Below are the relevant sections of my code.
args: [/*'--disable-dev-shm-usage', */
`--proxy-server=proxy.crawlera.com:8010`,'--ignore-certificaterrors https://httpbin.org/get'
],
ignoreHTTPSErrors: true
});
await page.setExtraHTTPHeaders({
'Proxy-Authorization': 'Basic ' + Buffer.from ('<MYAPIKEY>:').toString('base64'),
});
Thanks in advance
1 person has this question