Pythonでヘッドレスブラウジングがしたくていろいろ調べたのですが、エラーはなかったもののブラウザが立ち上がってしまいます。
原因がわかる方がいらっしゃいまいしたら教えていただきたいです。
Python
1from selenium import webdriver 2from selenium.webdriver.chrome.options import Options 3 4chromedriver = "path" 5 6options = Options() 7options.add_argument('--headless') 8 9driver = webdriver.Chrome(chrome_options=options,executable_path=chromedriver,) 10 11driver.get("https://www.google.co.jp") 12 13driver.save_screenshot("test.png") 14
回答2件
あなたの回答
tips
プレビュー