since extension not supported in headless mode, any possible way to block all ads? like ublock extension which block all ads
--
You received this message because you are subscribed to the Google Groups "headless-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to headless-dev...@chromium.org.
To post to this group, send email to headle...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/headless-dev/ab6836f4-819e-4da4-850c-05a9f6bc8daa%40chromium.org.
since extension not supported in headless mode, any possible way to block all ads? like ublock extension which block all ads
Hey there,
If anyone is still looking for a well-maintained and robust ad-blocking solution for puppeteer-based projects. I am maintaining one at https://www.npmjs.com/package/@cliqz/adblocker-puppeteer (source: https://github.com/cliqz-oss/adblocker/tree/master/packages/adblocker-puppeteer#usage ). It only takes a few lines to setup, it’s written in pure JavaScript (so no compilation step required), and it’s really efficient.
Best,
Rémi
Hi there,
Yes the adblocker is able to block Youtube ads. It might be the only one for Puppeteer able to do that (except if you load an adblocker extension but then I think you cannot do that in headless mode).