Blocking certain requests
I'm trying to block some requests in Puppeteer but it doesn't seem to work if I run the script headed :
Any ideas ?
7 Replies
@NeoNomade just advanced to level 8! Thanks for your contributions! 🎉
@NeoNomade
I mostly go for something like (it should be almost identical for JS and Pupeteer):
certainly routes don't work with Pupeteer
@NeoNomade
Rewrote it for Pupeteer/JS:
Actually found a decent article about it on google https://www.scrapingbee.com/blog/block-requests-puppeteer/
Block ressources with Puppeteer
This article will show you how to intercept and block requests with Puppeteer using the request interception API and the puppeteer extra plugin.
Thanks will try immediately
Works absolutely great, also in conjuction with puppeteer ad-blocker
thank you very much !
Can I ask another thing here ?
If it is a different topic please create another thread 🙂
new thread created