본문 바로가기

자료

파이썬 셀레니움 크롬드라이버 자동설치

728x90

설치

pip install chromedriver-autoinstaller

pip install chromedriver-autoinstaller

사용

from selenium import webdriver
import chromedriver_autoinstaller


chromedriver_autoinstaller.install()  # Check if the current version of chromedriver exists
                                      # and if it doesn't exist, download it automatically,
                                      # then add chromedriver to path

driver = webdriver.Chrome()
driver.get("http://www.python.org")
assert "Python" in driver.title

https://pypi.org/project/chromedriver-autoinstaller/

 

728x90