admin管理员组文章数量:1130349
# 设置ChromeDriver的路径
chrome_driver_path = r'E:\python_code\MyDemo\ZhongHe\bin\chromedriver.exe' # 替换为你的ChromeDriver路径
# 创建ChromeOptions对象
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('ignore-certificate-errors')
out_path = os.getcwd() + r'.\download' # 是你想指定的下载路径
prefs = {'profile.default_content_settings.popups': 0, 'download.default_directory': out_path}
chrome_options.add_experimental_option('prefs', prefs)
chrome_options.add_experimental_option('excludeSwitches',['enable-logging'])
chrome_options.binary_location = r'E:\安装包\360极速浏览器\360ChromeX\Chrome\Application\360ChromeX.exe' # 替换为360极速浏览器的实际路径
# 创建Service对象
service = Service(chrome_driver_path)
# 初始化WebDriver
self.driver = webdriver.Chrome(service=service, options=chrome_options)
# 设置ChromeDriver的路径
chrome_driver_path = r'E:\python_code\MyDemo\ZhongHe\bin\chromedriver.exe' # 替换为你的ChromeDriver路径
# 创建ChromeOptions对象
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('ignore-certificate-errors')
out_path = os.getcwd() + r'.\download' # 是你想指定的下载路径
prefs = {'profile.default_content_settings.popups': 0, 'download.default_directory': out_path}
chrome_options.add_experimental_option('prefs', prefs)
chrome_options.add_experimental_option('excludeSwitches',['enable-logging'])
chrome_options.binary_location = r'E:\安装包\360极速浏览器\360ChromeX\Chrome\Application\360ChromeX.exe' # 替换为360极速浏览器的实际路径
# 创建Service对象
service = Service(chrome_driver_path)
# 初始化WebDriver
self.driver = webdriver.Chrome(service=service, options=chrome_options)
版权声明:本文标题:selenium驱动360极速浏览器 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/jiaocheng/1763883621a2969951.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论