-2

I want to use Brave Browser on puppeteer because it has very good adblocking, but when I try it with puppeteer the adblocking feature doesn't work properly. I have read several suggestions many say should use the default profile but the adblocking is still not working.

I've tried running puppeteer with the default brave browser profile like this, but the adblocker still doesn't work. this my code :

const browser = await puppeteer.launch({
    headless: false,
    ignoreHTTPSErrors: true,
    executablePath: "C:/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe",
    userDataDir: "C:/Users/MyUser/AppData/Local/BraveSoftware/Brave-Browser/User Data/Default",
    slowMo: 0,
    devtools: false,
     args: [
        '--no-sandbox',
        '--no-zygote',
        '--no-first-run',
        '--disable-setuid-sandbox',
        '--disable-infobars',
        '--disable-dev-shm-usage',
        '--disable-accelerated-2d-canvas',
        '--disable-blink-features=AutomationControlled',
        '--ignore-certifcate-errors',
        '--ignore-certifcate-errors-spki-list',
        '--window-size=1920x1080',
    ],
});
  • 3
    Just curious, but why? Do these impact your tests, and if so how? – Phix Aug 21 '23 at 01:49
  • yes because the website shows a lot of ads so I can't do the next step with puppeteer – Irfan Fattah Aug 21 '23 at 01:51
  • Can you expand on the second part of my question? What parts of your tests fail? Edit the question and show your code and the issues you're having. – Phix Aug 21 '23 at 03:08

0 Answers0