docker image google-images-download
This repo is used to build a docker image for forked version of python package google-images-download.
Build docker image
docker build -t googleimagesdownload .
or you can just use the pre-build docker image:
docker pull registry-intl.ap-southeast-1.aliyuncs.com/kk17-public/googleimagesdownload
docker tag registry-intl.ap-southeast-1.aliyuncs.com/kk17-public/googleimagesdownload googleimagesdownload
Usage
Please check the Examples from the Google Images Download documentation first.
For all the commands in the examples you can just add docker run -it --rm -v $(pwd):/workspace
before the command to run it.
- Passing all arguments from command line
docker run -it --rm -v $(pwd):/workspace googleimagesdownload -k "car" -sk 'red,blue,white' -l 10
- Passing arguments from a config file
docker run -it --rm -v $(pwd):/workspace googleimagesdownload -cf example.json
NOTE:
-
If you pass all the passing arguments from a config file, you can only use
-cf
or--config_file
in command line. All the input argement should be defined in config file. For all the avialable input arguments please refer to Input Arguments — Google Images Download documentation. -
If download limit is over 100, you need to specify the chromedriver path from arguments. The the chromedriver path in the image is
/chromedriver/chromedriver
. Take themerlion.json
as an example:
{
"Records": [
{
"keywords": "merlion",
"limit": 250,
"size": "large",
"print_urls": true,
"format": "jpg",
"chromedriver": "/chromedriver/chromedriver"
}
]
}