chrome_optiOns= webdriver.ChromeOptions()
chrome_options.add_argument('--disable-gpu')# win 必须使用该选项
chrome_options.add_argument('log-level=2')#屏蔽日志
chrome_options.add_argument('--disable-software-rasterizer')
chrome_options.add_argument("--disable-extensions")
chrome_options.add_argument('--disable-logging')
chrome_options.add_argument('--ignore-certificate-errors')
chrome_options.add_argument('--ignore-ssl-errors')
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument("--window-size=1220,800")
chrome_options.add_argument('user-agent=' + spider_utils.get_ua())
chrome_options.add_argument('--proxy-server={0}'.format(proxy_ip))
prefs = {
'profile.default_content_setting_values' : {
'notifications' : 2
}
}
chrome_options.add_experimental_option('prefs',prefs)
前几个月是能正常工作的, 最近不好使了, 有经验的朋友,请帮忙瞅瞅
chrome_options.add_argument('--disable-gpu')# win 必须使用该选项
chrome_options.add_argument('log-level=2')#屏蔽日志
chrome_options.add_argument('--disable-software-rasterizer')
chrome_options.add_argument("--disable-extensions")
chrome_options.add_argument('--disable-logging')
chrome_options.add_argument('--ignore-certificate-errors')
chrome_options.add_argument('--ignore-ssl-errors')
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument("--window-size=1220,800")
chrome_options.add_argument('user-agent=' + spider_utils.get_ua())
chrome_options.add_argument('--proxy-server={0}'.format(proxy_ip))
prefs = {
'profile.default_content_setting_values' : {
'notifications' : 2
}
}
chrome_options.add_experimental_option('prefs',prefs)
前几个月是能正常工作的, 最近不好使了, 有经验的朋友,请帮忙瞅瞅
