Search code examples
seleniumhttpselenium-chromedrivergeckodriverblacklist

Selenium block requests, scripts before page loaded


I am trying to block some requests for example; gAnalytics or gMaps and so on. I used BrowserMobProxy before but for now, I am using the Tor network as my proxy. Anyway, What I need to do is block some specific URLs before the driver opened or when the driver opened. I need it because the gMaps loading really takes time for my scraper.

Related topics:

enter link description here
enter link description here
enter link description here
enter link description here


Solution

  • The solution is:

    https://chrome.google.com/webstore/detail/http-request-blocker/eckpjmeijpoipmldfbckahppeonkoeko?hl=en

    edit and install an extension like this. This can be a solution for request blocking.