google-images-download icon indicating copy to clipboard operation
google-images-download copied to clipboard

All image cannot be downloaded on google colab.

Open Fliw opened this issue 3 years ago • 5 comments

Hello there, i was using this package as an img downloader to train my Artificial intelligence project, after installing this package using pip, i ran code like this :

response = google_images_download.googleimagesdownload()
arguments = {"keywords":"people wearing mask","limit":60,"print_urls":False}
paths = response.download(arguments)
print(paths)

after executing the cell i got the response like this :

Item no.: 1 --> Item name = people wearing mask
Evaluating...
Starting Download...


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

Errors: 0

({'people wearing mask': []}, 0)

why? is the frontend of google has change or what? can you help me??

Fliw avatar Oct 16 '20 10:10 Fliw

Having the same issue

for i in df['Breed']: arguments={"keywords":i,"output_directory":'./Images/'+i+'/',"limit":100,"print_urls":True,'chromedriver':'./chromedriver','delay':1} paths = response.download(arguments) # passing the arguments to the function print(paths) # printing absolute paths of the downloaded images'''

Item no.: 1 --> Item name = Weimaraner Evaluating... Starting Download... Unfortunately all 100 could not be downloaded because some images were not downloadable. 0 is all we got for this search filter!

k-fillmore avatar Oct 16 '20 14:10 k-fillmore

Have you tried my fork which fixes this problem? #298

git clone https://github.com/Joeclinton1/google-images-download.git cd google-images-download && python setup.py install

Joeclinton1 avatar Oct 16 '20 14:10 Joeclinton1

Have you tried my fork which fixes this problem? #298

git clone https://github.com/Joeclinton1/google-images-download.git cd google-images-download && python setup.py install

Thank you so much, i'll try it tomorrow! I'm really sad to see that this repo is so much potential, so much who interest, so much who send PR but not maintained and abandoned by creator :(

Fliw avatar Oct 16 '20 17:10 Fliw

@Joeclinton1 thanks for the fork! It works..sort of.

Was going for the script based example at first, directly from the docs:

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

It didn't work, oddly, showing ModuleNotFoundError.

However it worked from the command line nicely. Any possible explanations?

riffAt2013 avatar Oct 18 '20 07:10 riffAt2013

Have you tried my fork which fixes this problem? #298

git clone https://github.com/Joeclinton1/google-images-download.git cd google-images-download && python setup.py install

Does the format filter does not work in this i am trying this but it is still downloading jpeg and webp formats

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,"format":"jpg"}
paths = response.download(arguments)

Hardik-G1 avatar Oct 19 '20 06:10 Hardik-G1