Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python Google Images download does not work

I'm crawling an image through Google Image downloader. The code that originally worked started to suddenly stop working How do we solve this problem? Code and error messages are as follows

from google_images_download import google_images_download   

def ImageCrawling(keyword, dir):
    response = google_images_download.googleimagesdownload()  

    arguments = {"keywords":keyword 
        ,"limit":2 
        ,"print_urls":True 
        ,'output_directory':dir}   
    paths = response.download(arguments)   #passing the arguments to the function
    print(paths)   #printing absolute paths of the downloaded images

ImageCrawling('dog','C:\\nuguya')

like image 684
변구훈 Avatar asked Feb 09 '20 14:02

변구훈


1 Answers

It seems google recently removed the rg_metadata from the page, which is what google_images_download was using to process the images from the raw_html. As such it's broken.

like image 104
ameet chaubal Avatar answered Oct 16 '22 15:10

ameet chaubal