Skip to content
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

Unfortunately all 20 could not be downloaded because some images were not downloadable #360

Open
livewithsjsj opened this issue Feb 7, 2022 · 11 comments

Comments

@livewithsjsj
Copy link

when I run the command line googleimagesdownload --keywords "Polar bears, baloons, Beaches" --limit 20, it just doesn't work...

@livewithsjsj
Copy link
Author

ex)

Item no.: 3 --> Item name = Beaches
Evaluating...
Starting Download...

Unfortunately all 20 could not be downloaded because some images were not downloadable. 0 is all we got for this search filter!

Errors: 0

@NicolasGrosjean
Copy link

Hi @livewithsjsj ,
This issue is a duplicate with issue #354

Have you tried the Joeclinton1's fork who can setup with the 2 commands in the first post of #298 ?

If you still have the issue with this fork, could you provide us additional information like I am unable to reproduce the issue :

  • The command line or Python code you use
  • The name of your Environment System
  • The version of Python you use

Thanks in advance.

@livewithsjsj
Copy link
Author

livewithsjsj commented Feb 8, 2022

Hi @NicolasGrosjean

  1. command line (code)
    : i used sample code

from google_images_download import google_images_download #importing the library
response = google_images_download.googleimagesdownload() #class instantiation
arguments = {"keywords":"Polar bears,baloons,Beaches","limit":20,"print_urls":True} #creating list of arguments
paths = response.download(arguments) #passing the arguments to the function
print(paths) #printing absolute paths of the downloaded images

  1. Environment System
    I used GroomIDE,
    OS : Ubuntu 18.04 LTS
    Python 3.7.4
    pip 20.2.4
    Jupyter 4.6.3
    Django 2.2.4
    Flask 1.1.2
    TensorFlow 2.3.1
    Caffe 1.0.0
    Spark 3.0.1

  2. Version of python
    3.7.4

and the result..

root@goorm:/workspace/crawlling-google-ima# python google-image-crowlling.py
Item no.: 1 --> Item name = Polar bears
Evaluating...
Starting Download...

Unfortunately all 20 could not be downloaded because some images were not downloadable. 0 is all we got for this search filter!
Errors: 0

@livewithsjsj
Copy link
Author

and i tryed to Joeclinton1's method but it didnt works

@NicolasGrosjean
Copy link

Hi @livewithsjsj ,

I tried again with a new conda environment with Python 3.7.4 on Ubuntu 18.04 LTS, and I have still no issue.

My full test conda environment
name: google_images_download
channels:
  - defaults
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=4.5=1_gnu
  - ca-certificates=2021.10.26=h06a4308_2
  - certifi=2021.10.8=py37h06a4308_2
  - libedit=3.1.20210910=h7f8727e_0
  - libffi=3.2.1=hf484d3e_1007
  - libgcc-ng=9.3.0=h5101ec6_17
  - libgomp=9.3.0=h5101ec6_17
  - libstdcxx-ng=9.3.0=hd4cf53a_17
  - ncurses=6.3=h7f8727e_2
  - openssl=1.1.1m=h7f8727e_0
  - pip=21.2.2=py37h06a4308_0
  - python=3.7.4=h265db76_1
  - readline=7.0=h7b6447c_5
  - setuptools=58.0.4=py37h06a4308_0
  - sqlite=3.33.0=h62c20be_0
  - tk=8.6.11=h1ccaba5_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.2.5=h7b6447c_0
  - zlib=1.2.11=h7f8727e_4
  - pip:
    - async-generator==1.10
    - attrs==21.4.0
    - cffi==1.15.0
    - cryptography==36.0.1
    - h11==0.13.0
    - idna==3.3
    - outcome==1.1.0
    - pycparser==2.21
    - pyopenssl==22.0.0
    - selenium==4.1.0
    - sniffio==1.2.0
    - sortedcontainers==2.4.0
    - trio==0.19.0
    - trio-websocket==0.9.2
    - typing-extensions==4.0.1
    - urllib3==1.26.8
    - wsproto==1.0.0

The only thing I see to try to help you is to compare the raw result you get to the mine.

Please use this version of google_images_download/google_images_download.py, it will export the raw results in raw_google_data/ directory if you replace the 3rd line of your script by

arguments = {"keywords":"Polar bears,baloons,Beaches","limit":20,"print_urls":True,"raw_google_data":True} #creating list of arguments

You can share me one of the 3 json file with website like https://jsonblob.com/

P.S : Before replacing google_images_download/google_images_download.py by my version, you can check with a diff, there is only something like that in diff.

@NareshBisht
Copy link

I have the same problem. Did you resolve the issue?

@mondn
Copy link

mondn commented Feb 22, 2022

Hi @NareshBisht @livewithsjsj ,

I had the same problem. Some step below fixed the issue in my case:

  1. Get the correct ChromeDriver as instructed here: Link. My Chrome version is 98.0.4758.102 so this gives me the correct chromedriver file https://chromedriver.storage.googleapis.com/index.html?path=98.0.4758.102/
  2. Add chromedrive to PATH ( you might not need this step )
  3. Follow Fixed issue with links not being found #298 and git clone https://github.com/Joeclinton1/google-images-download.git cd google-images-download && python setup.py install
  4. Then I copied the google-images-download/google_images_download ( module ) to my project.
  5. In my python code I just import the module : from google_images_download import google_images_download and download works.
  6. For 100+ images make sure you add 'chromedriver': 'path/chromedriver' arg

This works in my case and I hope it will also help you.

@gitagogaming
Copy link

Having this same issue, first time user of the module.. I followed two different examples and both returned the same error..

@mog129
Copy link

mog129 commented Jul 27, 2022

I have been getting this issue as well both on my bare metal Windows PC as well as the latest available python container from docker hub...
docker pull python:latest
docker run python /bin/bash -c "pip install google_images_download; googleimagesdownload --keywords 'Polar bears, baloons, Beaches' --limit 20"

Running that I get the same error.

@mog129
Copy link

mog129 commented Jul 27, 2022

When I tried Joeclinton1's on my bare metal PC it gave me the same error.
when I updated my docker test from above to use Joeclinton1's it worked.
docker run python /bin/bash -c "git clone https://github.com/Joeclinton1/google-images-download.git; cd google-images-download; python setup.py install; googleimagesdownload --keywords 'Polar bears, baloons, Beaches' --limit 20"

@yashrajOjha
Copy link

I had the same issues, when using pip, instead go into the terminal and use the following commands,

 
git clone https://github.com/Joeclinton1/google-images-download.git
cd google-images-download
python setup.py install 
googleimagesdownload --keywords 'Polar bears, baloons, Beaches' --limit 20`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants