chrome

mac2022-06-30  23

用法 from selenium.webdriver.chrome.options import Options chorme_option=Options() chorme_option.add_argument("--disable-gpu") chorme_option.add_argument("--disable-infobars") #禁止图片加载,禁止推送通知 prefs = { "profile.default_content_setting_values" : { "images": 2 },"profile.default_content_setting_values.notifications" : 2 } chorme_option.add_experimental_option("prefs",prefs) chorme_option.add_argument('--ignore-certificate-errors') #SSLエラー対策 driver = webdriver.Chrome(chrome_options = chorme_option)

  

chromedriver中的浏览器选项

selenium 定制启动 chrome 的选项

 

转载于:https://www.cnblogs.com/c-x-a/p/8452802.html

最新回复(0)