I would like to block third party websites when I acess a website using selenium to avoid being slowed down while scraping (the same way as Umatrix does)
I've seen i could do something like this (I'm using Chrome):
driver.execute_cdp_cmd('Network.setBlockedURLs', {"urls": ["www.baidu.com"]}) driver.execute_cdp_cmd('Network.enable', {})
Instead of quoting each URL, can I specify "thirdparty" in a way or another ? Thanks