티스토리 뷰

 


 

2023.05.23 - [Productivity/tips] - [Python selenuim] ChromeDriver 버전오류-selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 111

 

[Python selenuim] ChromeDriver 버전오류-selenium.common.exceptions.SessionNotCreatedException: Message: session not created:

ChromeDriver는 Python selenuim 사용시 필수 프로그램인데, 이 오류는 ChromeDriver 버전이 현재 사용중인 Chrome 브라우저 버전과 호환되지 않아 나타나는 오류이다. 해결방법은 간단하다. ChromeDriver 버전을

arc-viewpoint.tistory.com


갑자기 웹크롤링이 안되는 상황이 발생(잘못된 결과를 보여줌)

VScode 콘솔창에는 어떤 오류내용도 표시하고 있지 않는데 이럴 경우에는 굉장히 난감하다.

 

크롤링하고자 하는 웹사이트에서 사이트의 구조를 변경하면 내가 작성한 code에 오류가 있기 때문에 이런 상황이 나올수도 있다. 몇 시간 해결하기 위해 이것 저것 테스트해보다가 chromedriver 버전이 chrome 버전과 맞지 않는 것을 확인.

 

오히려 다행이다. 

chromedriver 만 변경해주면 되기 때문이다.

 

chrome 이 115 version 으로 업데이트되었고 115 version에 대응하는 chromedriver만 변경해주면 된다.

chromedriver를 다운로드 받기위해 아래 사이트 방문

 

https://chromedriver.chromium.org/downloads

 

ChromeDriver - WebDriver for Chrome - Downloads

Current Releases If you are using Chrome version 115 or newer, please consult the Chrome for Testing availability dashboard. This page provides convenient JSON endpoints for specific ChromeDriver version downloading. For older versions of Chrome, please se

chromedriver.chromium.org

 

Chrome version 115 또는 그 이상의 버전은 the Chrome for Testing availabilith dashboard 로 문의하라고 한다. 

 

 

 the Chrome for Testing availabilith dashboard 를 따라가면 여러가지 버전이 나오는데 Stable 버전을 다운 받아서 설치하였다. 운영체재와 chrome 버전에 맞는 URL 을 복사하여 주소창에 붙여 넣어주면 자동 다운로드가 실행된다. 

 

https://googlechromelabs.github.io/chrome-for-testing/

 

Chrome for Testing availability

This page lists the latest available cross-platform Chrome for Testing versions and assets per Chrome release channel. Consult our JSON API endpoints if you’re looking to build automated scripts based on Chrome for Testing release data. Last updated @ 20

googlechromelabs.github.io

 

 

 

Chrome 115버전에 대응하는 Chromedriver 설치하고 다시 웹스크래핑 수행하니 정상 작동한다.