码迷,mamicode.com
首页 > 编程语言 > 详细

Selenium chrome配置不加载图片Python版

时间:2017-06-03 00:52:50      阅读:227      评论:0      收藏:0      [点我收藏+]

标签:ref   efault   bsp   加载   man   import   3.5   tin   add   

环境: windows 7 + Python 3.5.2 + Selenium 3.4.2 + Chrome Driver 2.29 + Chrome 58.0.3029.110 (64-bit)

 

from selenium import webdriver

chrome_options = webdriver.ChromeOptions()
prefs = {"profile.managed_default_content_settings.images":2}
chrome_options.add_experimental_option("prefs",prefs)
            
driver = webdriver.Chrome(chrome_options=chrome_options)

 

Selenium chrome配置不加载图片Python版

标签:ref   efault   bsp   加载   man   import   3.5   tin   add   

原文地址:http://www.cnblogs.com/roystime/p/6935585.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!