garyfeng / google-images-download

Python Script to download hundreds of images from 'Google Images'. It is a ready-to-run code!
MIT License
1 stars 0 forks source link

Set up a configuration file for mass downloading #3

Open garyfeng opened 2 years ago

garyfeng commented 2 years ago

google-images-download had an option to use a configuration file for downloading, e.g., googleimagesdownload -cf google_images_download/sample_config.json.

The content of the configuration is something like the following:

{
    "Records": [
        {
            "keywords": "apple",
            "limit": 5,
            "color": "green",
            "print_urls": true
        },
        {
            "keywords": "universe",
            "limit": 15,
            "size": "large",
            "print_urls": true
        }
    ]
}

These records are executed sequentially, where for each search we can configure the parameters separately.

We can use this to set up a batch job -- though non-repeatable since google's image search engine is not deterministic. In addition, we should be able to specify