-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AttributeError: 'WebDriver' object has no attribute 'find_element_by_css_selector' #371
Comments
The find_element function has been changed in the new selenium version, you can find more here To fix the issue, navigate to the google_images_download.py file then find and change the following:
Don't forget to import: You can also copy-paste the file from here |
it still didnt work. Can you help ? One more thing that it is enough to copy google_images_download.py and paste then use it ? The error i got when i try to run: Item no.: 1 --> Item name = Man face |
i could sove the problem by creating new project and installed by this command
then i've copied and pasted the changed you've mentioned after that i got another error which is mentioned here and after this it worked. I used version 108 of chrome and chromedriver, and python 3.6. Thanks for everybody. |
@zahir2000's solution above in addition to changing |
I want to get more than 100 images. So I try the "chromedriver".
Here is my code:
from google_images_download import google_images_download
response = google_images_download.googleimagesdownload()
arguments = {"keywords":"Michael Jordan","limit":200,"print_urls":True
,"raw_google_data":True,"no_download":True,
"chromedriver":"C:\Program Files (x86)\Google\Chrome\Application\chromedriver.exe"}
paths = response.download(arguments)
Here is the result:
Item no.: 1 --> Item name = Michael Jordan
Evaluating...
Traceback (most recent call last):
File "C:/Users/MJ Zhou/PycharmProjects/SEV/download_image.py", line 8, in
paths = response.download(arguments) #passing the arguments to the function
File "D:\anaconda3\envs\paper1\lib\site-packages\google_images_download-2.8.0-py3.8.egg\google_images_download\google_images_download.py", line 970, in download
File "D:\anaconda3\envs\paper1\lib\site-packages\google_images_download-2.8.0-py3.8.egg\google_images_download\google_images_download.py", line 1111, in download_executor
File "D:\anaconda3\envs\paper1\lib\site-packages\google_images_download-2.8.0-py3.8.egg\google_images_download\google_images_download.py", line 310, in download_extended_page
AttributeError: 'WebDriver' object has no attribute 'find_element_by_css_selector'
How to solve this problem?
The text was updated successfully, but these errors were encountered: