Open rafarios opened 3 years ago
Hi @rafarios,
Have you the same issue with the Joeclinton1 version which is more up to date ?
You can install it with
git clone https://github.com/Joeclinton1/google-images-download.git
cd google-images-download && python setup.py install
'183836587' is no longer included in 'image_object'. In my case, I commented out line 391 of google_images_download.py and now I can run it.
def format_object(self, object):
data = object[1]
main = data[3]
info = data[9]
if info is None:
info = data[11]
formatted_object = {}
try:
formatted_object['image_height'] = main[2]
formatted_object['image_width'] = main[1]
formatted_object['image_link'] = main[0]
formatted_object['image_format'] = main[0][-1 * (len(main[0]) - main[0].rfind(".") - 1):]
formatted_object['image_description'] = info['2003'][3]
# formatted_object['image_host'] = info['183836587'][0]
formatted_object['image_source'] = info['2003'][2]
formatted_object['image_thumbnail_url'] = data[2][0]
except Exception as e:
print(e)
return None
return formatted_object
Thanks @is0356xi
Now it works!
I implemented a fix in the most recent commit by changing the location of image_host. Should work now :)
I cannot get it to work:
Item no.: 1 --> Item name = Polar bears
Evaluating...
Starting Download...
'NoneType' object is not subscriptable
Traceback (most recent call last):
File "/cygdrive/d/dev/git/pythonaf/testGDI.py", line 6, in
testGDI.py is:
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
Hi. Using 2.8.0, It was working properly yesterday, buy today I receive this error. Can you review it?
Traceback (most recent call last): File "/usr/local/bin/googleimagesdownload", line 11, in
load_entry_point('google-images-download==2.8.0', 'console_scripts', 'googleimagesdownload')()
File "/usr/local/lib/python3.7/dist-packages/google_images_download-2.8.0-py3.7.egg/google_images_download/google_images_download.py", line 1134, in main
File "/usr/local/lib/python3.7/dist-packages/google_images_download-2.8.0-py3.7.egg/google_images_download/google_images_download.py", line 952, in download
File "/usr/local/lib/python3.7/dist-packages/google_images_download-2.8.0-py3.7.egg/google_images_download/google_images_download.py", line 1087, in download_executor
File "/usr/local/lib/python3.7/dist-packages/google_images_download-2.8.0-py3.7.egg/google_images_download/google_images_download.py", line 888, in _get_all_items
TypeError: 'NoneType' object is not subscriptable