selenium

作者: wang_souris | 来源:发表于2019-10-09 20:58 被阅读0次

from selenium import webdriver

chrome_opt = webdriver.ChromeOptions()

chrome_opt.add_argument('--headless')  #设置chrome无头模式

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(url)

相关文章

网友评论

      本文标题:selenium

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