Closed Revadike closed 4 years ago
You should be able to override puppeteer options in the last version.
const puppeteer = require('puppeteer');
const cloudflareScraper = require('cloudflare-scraper');
(async () => {
try {
const response = await cloudflareScraper.get('https://cloudflare-url.com', {
puppeteerOptions: {
executablePath: puppeteer.executablePath().replace('app.asar', 'app.asar.unpacked')
}
});
console.log(response);
} catch (error) {
console.log(error);
}
})();
You should be able to override puppeteer options in the last version.
const puppeteer = require('puppeteer'); const cloudflareScraper = require('cloudflare-scraper'); (async () => { try { const response = await cloudflareScraper.get('https://cloudflare-url.com', { puppeteerOptions: { executablePath: puppeteer.executablePath().replace('app.asar', 'app.asar.unpacked') } }); console.log(response); } catch (error) { console.log(error); } })();
Does this also work for the .defaults(/* ... */)
method?
I think so.
https://github.com/puppeteer/puppeteer/issues/2134#issuecomment-408221446
This shouldn't affect anything else.