Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Discussion on how to block ads in headless browser Playwright
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Discussion on how to block ads in headless browser Playwright

Let's talk about what your best solution would be.

Comments

  • FAT32FAT32 Administrator, Deal Compiler Extraordinaire

    You can install custom Chrome Extension using --load-extension= with uBlock Origin or the like.

    https://playwright.dev/docs/chrome-extensions

  • air4xair4x Member

    Shouldn't setting the nameservers to some ad-blocking public dns servers like adguard dns or something else work with playwright.

  • bdlbdl Member

    To see (ads) or not to see (ads)?

  • In a larger scale setup I'd go with a https proxy like squid and filter there using the sources of ublock origin and friends. That way you have fine grained control over the transport while keeping the config centralized. This can be scaled up to do additional testing with different GeoIP endpoints as that might influence the target test. Additionally you could configure specific nameservers at the proxy that also does ad-blocking and make sure lookups are performed remotely. It's important to keep track of the ad block sources as they influence the tests once the sources change. I'd recommend going with a self hosted setup to have all variables in control.

  • What's the advantage of this Playwright browser?

Sign In or Register to comment.