Skip to content
This repository has been archived by the owner on May 25, 2022. It is now read-only.

Write a program to download multiple images #27

Closed
chavarera opened this issue Jun 26, 2020 · 1 comment
Closed

Write a program to download multiple images #27

chavarera opened this issue Jun 26, 2020 · 1 comment

Comments

@chavarera
Copy link
Member

Problem Statement
write a program that accept category from user and download n no of images to local system

@N-NeelPatel
Copy link

Here is a code that I found online and made some changes to it, have a look at it.

`
from google_images_download import google_images_download

recieve = google_images_download.googleimagesdownload()

queries = [
'''
Enter queries for relevent images
'''
]

def download_image(queries):

parameters = {
    "keywords" : queries,
    "format" : "jpg",
    "limit" : 10,
    "print_urls" : True,
    "size" : "medium",
    "aspect_ratio" : "panoramic"
}

# process of donwloading starts here

try:
    recieve.download(parameters)

# Handling file not found error

except FileNotFoundError:
    print("File Not Found based on required parameters")

for q in queries:
    downloadimages(q)
    print()

`

Python-Mini-Projects automation moved this from To do to Completed Jul 1, 2020
@chavarera chavarera removed this from Completed in Python-Mini-Projects Sep 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants