Python爬虫 selenium chrome不加载图片

头部加入下面代码

chrom_opt = webdriver.ChromeOptions()
prefs = { "profile.managed_default_content_settings.images": 2 }
chrom_opt.add_experimental_option("prefs", prefs)
browser = webdriver.Chrome(executable_path="D:/Google Chrome/chromedriver.exe", chrome_options=chrom_opt)
browser.get("https://www.taobao.com")

你可能感兴趣的:(爬虫,数据采集,自动化测试,chrome,python,爬虫)