Joirv

[Selenium] chrome 브라우저 실행 오류 해결하기 본문

Crawling/Errors

[Selenium] chrome 브라우저 실행 오류 해결하기

KaylaHong 2023. 2. 10. 22:17
from selenium.webdriver import Chrome
browser = Chrome()

위와 같이 크롬 브라우저를 열기 위한 코드를 작성하면 다음과 같은 오류가 떴다. 

Colab에서 실행했을 때 생긴 오류여서 jupyter notebook으로 넘어왔는데, 넘어와서도 같은 문제가 발생했다. 

WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home

 

이럴 때에는 아래와 같이 해결하면 해결된다!

from webdriver_manager.chrome import ChromeDriverManager
browser = Chrome(ChromeDriverManager().install())

참고

https://ddolcat.tistory.com/674

'Crawling > Errors' 카테고리의 다른 글

[BeautifulSoup] import bs4 오류 해결하기  (0) 2023.02.10

Comments