QianyanTech / Image-Downloader

Download images from Google, Bing, Baidu. 谷歌、百度、必应图片下载.
MIT License
2.15k stars 561 forks source link

It fails to download anything #22

Closed aparico closed 4 years ago

aparico commented 4 years ago
[18:09:39]   -e Google -d chrome_headless -n 10 -j 50 -o "./download_images/pear" "pear"
[18:09:39]  Scraping From Google Image Search ...
[18:09:39]  Keywords:  pear
[18:09:39]  Number:  10
[18:09:39]  Face Only:  False
[18:09:39]  Safe Mode:  False
[18:09:39]  Query URL:  https://www.google.com/search?tbm=isch&hl=en&q=pear&safe=off
[18:09:42]  Exception in thread Thread-1:
[18:09:42]  Traceback (most recent call last):
[18:09:42]    File "C:\Python37\lib\threading.py", line 917, in _bootstrap_inner
[18:09:42]      self.run()
[18:09:42]    File "C:\Python37\lib\threading.py", line 865, in run
[18:09:42]      self._target(*self._args, **self._kwargs)
[18:09:42]    File "C:\Python37\Image-Downloader\image_downloader.py", line 54, in main
[18:09:42]      browser=args.driver)
[18:09:42]    File "C:\Python37\Image-Downloader\crawler.py", line 282, in crawl_image_urls
[18:09:42]      driver = webdriver.Chrome(chrome_path, chrome_options=chrome_options)
[18:09:42]    File "C:\Python37\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 81, in __init__
[18:09:42]      desired_capabilities=desired_capabilities)
[18:09:42]    File "C:\Python37\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in __init__
[18:09:42]      self.start_session(capabilities, browser_profile)
[18:09:42]    File "C:\Python37\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in start_session
[18:09:42]      response = self.execute(Command.NEW_SESSION, parameters)
[18:09:42]    File "C:\Python37\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
[18:09:42]      self.error_handler.check_response(response)
[18:09:42]    File "C:\Python37\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
[18:09:42]      raise exception_class(message, screen, stacktrace)
[18:09:42]  selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 83
[18:09:43]  stopped

I already downloaded all the requirements. I'm using Python3.7.2 and ChromeDriver 81.

image

sczhengyabin commented 4 years ago

@addieira03 As the error messages says, the chromedriver version is not correct. Remember to download the corresponding version that matches the version of your Chrome or Chromium browser, which is may not be the lastest version.

aparico commented 4 years ago

Thank you! It works now. I just matched the chromedriver version