JimmyLaurent / cloudflare-scraper

A package to bypass Cloudflare's protection
MIT License
286 stars 30 forks source link

TypeError: browser.setMaxListeners is not a function #12

Closed ElijahDD closed 4 years ago

ElijahDD commented 4 years ago
TypeError: browser.setMaxListeners is not a function
    at StealthPlugin.onBrowser (/root/js/node_modules/puppeteer-extra-plugin-stealth/index.js:155:13)
    at StealthPlugin._bindBrowserEvents (/root/js/node_modules/puppeteer-extra-plugin/dist/index.cjs.js:479:24)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async PuppeteerExtra.callPlugins (/root/js/node_modules/puppeteer-extra/dist/index.cjs.js:376:13)
    at async PuppeteerExtra.launch (/root/js/node_modules/puppeteer-extra/dist/index.cjs.js:131:9)
    at async createBrowser (/root/js/node_modules/cloudflare-scraper/src/createBrowser.js:103:10)
    at async fillCookiesJar (/root/js/node_modules/cloudflare-scraper/src/fillCookiesJar.js:28:19)
    at async handleError (/root/js/node_modules/cloudflare-scraper/index.js:18:5)
    at async cloudflareScraper (/root/js/node_modules/cloudflare-scraper/index.js:37:20)
    at async /root/js/dev_c.js:5:22
const cloudflareScraper = require('cloudflare-scraper');

(async () => {
  try {
    const response = await cloudflareScraper.get(url);
    console.log(response);
  } catch (error) {
    console.log(error);
  }
})();
JimmyLaurent commented 4 years ago

https://github.com/berstend/puppeteer-extra/issues/211

ElijahDD commented 4 years ago

Sorry, my fault, thanks