QianyanTech / Image-Downloader

Download images from Google, Bing, Baidu. 谷歌、百度、必应图片下载.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Any ideas?

Dnick421 opened this issue · comments

[15:04:41] -e Google -d chrome_headless -n 100 -j 50 -o "./download_images/as" -S "as"
[15:04:41] Scraping From Google Image Search ...
[15:04:41] Keywords: as
[15:04:41] Number: 100
[15:04:41] Face Only: False
[15:04:41] Safe Mode: True
[15:04:41] Query URL: https://www.google.com/search?tbm=isch&hl=en&q=as&safe=on
[15:04:41] Exception in thread Thread-1:
[15:04:41] Traceback (most recent call last):
[15:04:41] File "C:\Users\sya\Desktop\Image-Downloader-master\venv\lib\site-packages\selenium\webdriver\common\service.py", line 76, in start
[15:04:41] stdin=PIPE)
[15:04:41] File "C:\Users\sya\AppData\Local\Programs\Python\Python36\lib\subprocess.py", line 709, in init
[15:04:41] restore_signals, start_new_session)
[15:04:41] File "C:\Users\sya\AppData\Local\Programs\Python\Python36\lib\subprocess.py", line 997, in _execute_child
[15:04:41] startupinfo)
[15:04:41] FileNotFoundError: [WinError 2] A rendszer nem találja a megadott fájlt
[15:04:41] During handling of the above exception, another exception occurred:
[15:04:41] Traceback (most recent call last):
[15:04:41] File "C:\Users\sya\AppData\Local\Programs\Python\Python36\lib\threading.py", line 916, in _bootstrap_inner
[15:04:41] self.run()
[15:04:41] File "C:\Users\sya\AppData\Local\Programs\Python\Python36\lib\threading.py", line 864, in run
[15:04:41] self._target(*self._args, **self._kwargs)
[15:04:41] File "C:\Users\sya\Desktop\Image-Downloader-master\image_downloader.py", line 54, in main
[15:04:41] browser=args.driver)
[15:04:41] File "C:\Users\sya\Desktop\Image-Downloader-master\crawler.py", line 300, in crawl_image_urls
[15:04:41] driver = webdriver.Chrome(chrome_path, chrome_options=chrome_options)
[15:04:41] File "C:\Users\sya\Desktop\Image-Downloader-master\venv\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 73, in init
[15:04:41] self.service.start()
[15:04:41] File "C:\Users\sya\Desktop\Image-Downloader-master\venv\lib\site-packages\selenium\webdriver\common\service.py", line 83, in start
[15:04:41] os.path.basename(self.path), self.start_error_message)
[15:04:41] selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
[15:04:42] stopped

Has your problem been solved? And how did you solve it?

This error message says you need to add 'chromedriver' executable to your PATH. To do so, first download the chromedriver executable from https://sites.google.com/a/chromium.org/chromedriver/downloads . My chrome version is 89.xxxx so I download this one: https://chromedriver.storage.googleapis.com/index.html?path=89.0.4389.23/ . Then you need to place the downloaded chromedriver executable to your PATH.
Please refer to this: https://zwbetz.com/download-chromedriver-binary-and-add-to-your-path-for-automated-functional-testing/