santhoshse7en / news-fetch

A Python Package which helps to scrape all news details from any news websites
MIT License
172 stars 110 forks source link

Chrome version 91 #96

Closed modyabhi closed 3 years ago

modyabhi commented 3 years ago

I am using a mac and Im getting the below error

`SessionNotCreatedException Traceback (most recent call last)

in ----> 1 google = google_search('ASX','https://au.news.yahoo.com/') ~/opt/anaconda3/lib/python3.8/site-packages/newsfetch/google.py in __init__(self, keyword, newspaper_url) 26 set_ignore_certificate_error(options) 27 set_browser_as_incognito(options) ---> 28 driver = get_chrome_web_driver(options) 29 driver.get(url) 30 ~/opt/anaconda3/lib/python3.8/site-packages/newsfetch/helpers.py in get_chrome_web_driver(options) 32 33 def get_chrome_web_driver(options): ---> 34 return webdriver.Chrome(chrome_options=options) 35 36 ~/opt/anaconda3/lib/python3.8/site-packages/selenium/webdriver/chrome/webdriver.py in __init__(self, executable_path, port, options, service_args, desired_capabilities, service_log_path, chrome_options, keep_alive) 74 75 try: ---> 76 RemoteWebDriver.__init__( 77 self, 78 command_executor=ChromeRemoteConnection( ~/opt/anaconda3/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py in __init__(self, command_executor, desired_capabilities, browser_profile, proxy, keep_alive, file_detector, options) 155 warnings.warn("Please use FirefoxOptions to set browser profile", 156 DeprecationWarning, stacklevel=2) --> 157 self.start_session(capabilities, browser_profile) 158 self._switch_to = SwitchTo(self) 159 self._mobile = Mobile(self) ~/opt/anaconda3/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py in start_session(self, capabilities, browser_profile) 250 parameters = {"capabilities": w3c_caps, 251 "desiredCapabilities": capabilities} --> 252 response = self.execute(Command.NEW_SESSION, parameters) 253 if 'sessionId' not in response: 254 response = response['value'] ~/opt/anaconda3/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py in execute(self, driver_command, params) 319 response = self.command_executor.execute(driver_command, params) 320 if response: --> 321 self.error_handler.check_response(response) 322 response['value'] = self._unwrap_value( 323 response.get('value', None)) ~/opt/anaconda3/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py in check_response(self, response) 240 alert_text = value['alert'].get('text') 241 raise exception_class(message, screen, stacktrace, alert_text) --> 242 raise exception_class(message, screen, stacktrace) 243 244 def _value_or_default(self, obj, key, default): SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 91 Current browser version is 90.0.4430.212 with binary path /Applications/Google Chrome.app/Contents/MacOS/Google Chrome `
santhoshse7en commented 3 years ago

Please Check your Chrome Browser Installed version in Mac.

Install respective version from chromedriver-binary.

You check the chromedriver-binary version here