I am trying to create a webcrawler using Selenium, but I get this error when I try to create the webdriver object.
selenium.common.exceptions.SessionNotCreatedEx
You have to match the chromedriver version number and your web browser chrome version , If both of the version match then it is best.
> For Example - 1- your web browser chrome version is 77 ( For checking your web browser chrome version got to your web browser help and then About Google Chrome there you will find your web browser chrome version ) . 2- Now download same version here 77 chromedriver from https://chromedriver.chromium.org/downloads . 3- Make google chrome as your default web browser . All done . Your code will run fine.
from selenium import webdriver
driver=webdriver.Chrome("chromedriver.exe")
# Below line of code provide
driver.get('http://python.org')
html_doc=driver.page_source
print("Html code of http://python.org web page :",html_doc)