from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager
browser=webdriver.Chrome(service=Service(ChromeDriverManager().install()))
browser.get('https://www.naver.com')
선행조건
webdriver-manager 설치되어있어야함(pip install webdriver-manager 입력하여 설치)
위와 같이 하면 별도로 Chromedriver를 다운받지 않아도 됨.
반응형
'python' 카테고리의 다른 글
python pyinstaller 파이썬 실행 파일 만들기 사용법 (0) | 2023.03.06 |
---|---|
Visual Studio Code에서 Python Extension 설치 안될 때 (0) | 2023.01.09 |
python 설치된 라이브러리 모듈 전체 버전 확인 (0) | 2022.11.03 |
python selenium chrome 창 꺼지지 않게 유지하는 코드 (0) | 2022.11.03 |