LoginSignup
1
2

More than 1 year has passed since last update.

pythonのChromeDriverManager記述について

Posted at
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager

options = Options()
#最初からheadlessでは書かないので、コメントアウト
#options.add_argument('--headless')

#好きなフォルダーを記載
driverfolder = r"C:\python\drivers"
driverpath = ChromeDriverManager(path=driverfolder).install()
driver = webdriver.Chrome(service=Service(driverpath),options=options)

driver.get('https://www.google.com/')

#以下必要な処理を記載

話はそれるのですが、データの取り出しはBeautifulSoupが便利です。
紹介は[Python入門]Beautiful Soup 4によるスクレイピングの基礎こちらに譲ります。

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2