开发者

Restricting Selenium/Webdriver/HtmlUnit to a certain domain

开发者 https://www.devze.com 2023-03-15 09:07 出处:网络
While using selenium/webdriver for web scraping, I realized the target site has google analytics script running. Is there a way to restri开发者_StackOverflow社区ct selenium/webdriver/htmlunit to avoid

While using selenium/webdriver for web scraping, I realized the target site has google analytics script running. Is there a way to restri开发者_StackOverflow社区ct selenium/webdriver/htmlunit to avoid certain urls/domains ?

Thanks,


I think it is impossible becouse Selenium is actually adapter for several implementation. So he can't deny to load some scripts to firefox or chrome. Perhaps you can check driver api(firefox profile, htmlunit configuration file) to accomplish this.

0

精彩评论

暂无评论...
验证码 换一张
取 消