-
Hello, I am trying to block some urls from loading in order to have fast rendering of web page (css, js, images) Eg, I want to load example.com and block all example.com/assets/* requests. In order to have a proxyless system, are there any solution that I can follow? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
For blocking all images, use the from seleniumbase import SB
with SB(uc=True, block_images=True) as sb:
sb.open("https://github.com/readme")
breakpoint() For blocking specific content, (eg. ads), see: SeleniumBase/examples/test_cdp_ad_blocking.py Additionally, you could set |
Beta Was this translation helpful? Give feedback.
-
Strange.. |
Beta Was this translation helpful? Give feedback.
-
Perfect. Thank you! |
Beta Was this translation helpful? Give feedback.
For blocking all images, use the
block_images
arg. Eg.For blocking specific content, (eg. ads), see: SeleniumBase/examples/test_cdp_ad_blocking.py
Additionally, you could set
host_resolver_rules
. More info: #2281