pip install webdriver-manager
설치
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager
def set_chrome_driver():
chrome_options = webdriver.ChromeOptions()
set_driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=chrome_options)
return set_driver
driver = set_chrome_driver()
사용