# import google_images_download module from google_images_download import google_images_download # create object response = google_images_download.googleimagesdownload () search_queries = [ ’The smartphone also features an in display fingerprint sensor.’ , ’The pop up selfie camera is placed aligning with the rear cameras.’ , In terms of storage, the Vivo V15 Pro can offer up to 6 GB of RAM and 128 GB of internal storage. & # 39; & # 39; & # 39; , ’The smartphone could be fueled by a 3 700mAh battery.’ , ] def downloadimages (query): # keywords is a search query # format is the image file format # limit - number of images uploaded # print urs - print image file url # size is the size of the image that # manually specified ("large, medium, icon") # aspect ratio denotes the ratio of height to width # images to download. (& quot; tall, square, wide, panoramic & quot;) arguments = { "keywords" : query , "format" : "jpg" , "limit" : 4 , "print_urls" : True , "size" : "medium" , " aspect_ratio: panoramic " } try : response.download (arguments) # Processing NotFound Error except FileNotFoundError: arguments = { " keywords " : query, "format" : "jpg" , " limit " : 4 , "print_urls" : True , " size " : " medium " } # Provide arguments for the search query try : # Upload photos based on # given arguments response.download (arguments) except : pass Driver code for query in search_queries: downloadimages (query) print () |