美文网首页
selenium设置谷歌无头浏览器

selenium设置谷歌无头浏览器

作者: wa23333 | 来源:发表于2019-03-26 16:47 被阅读0次

当然你得先下载谷歌驱动chromedriver.exe,安装selenium

from selenium import webdriver

from selenium.webdriver.chrome.options import Options

chrome_options = Options()

chrome_options.add_argument('--headless')

driver = webdriver.Chrome(chrome_options=chrome_options,executable_path = 'D:\APPS\dir\chromedriver.exe')

相关文章

网友评论

      本文标题:selenium设置谷歌无头浏览器

      本文链接:https://www.haomeiwen.com/subject/pqlnvqtx.html