码迷,mamicode.com
首页 > 其他好文 > 详细

scrapy selenium 设置chromedriver不加载图片

时间:2017-10-24 11:49:10      阅读:139      评论:0      收藏:0      [点我收藏+]

标签:path   from   profile   cut   imp   image   taobao   port   exe   

from selenium import webdriver
‘‘‘设置chromedriver不加载图片,可以加速加载页面的速度‘‘‘
chrome_opt = webdriver.ChromeOptions()
prefs={"profile.managed_default_content_settings.images":2}
chrome_opt.add_experimental_option("prefs",prefs)
browser = webdriver.Chrome(executable_path="C:\Program Files (x86)\Google\Chrome\Application\chromedriver.exe",chrome_options=chrome_opt)
browser.get("https://www.taobao.com")

scrapy selenium 设置chromedriver不加载图片

标签:path   from   profile   cut   imp   image   taobao   port   exe   

原文地址:http://www.cnblogs.com/fh-fendou/p/7722106.html

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