Skip to main content

Package that downloads images from google

Project description

download_images

download_images is a Python library for downloading images from google.

Installation

Use the package manager pip to install download_images.

pip install download_images

Download download_images from my github and use in your project

Usage

import download_images

download_images.main(["-q", "", "])#searches google for images from args and downloads them

Example

An example use is given on my github in the examples repository

Args

usage: download_images.main([-h] -q QUERY [QUERY ...] [-l LIMIT] [-o OUTPUTDIR]
                          [-c CHROMEDRIVER] [-epq EXACTQUERY]
                          [-oq OPTIONALQUERY] [-eq EXCEPTQUERY]
                          [-cs CUSTOMSIZE | -sz {s,m,l,i,>2MP,>4MP,>6MP,>8MP,>10MP,>12MP,>15MP,>20MP,>40MP,>70MP,>400*300,>640*480,>800*600,>1024*768}]
                          [-ar {s,t,w,p}]
                          [-co {red,orange,yellow,green,teal,blue,purple,pink,white,gray,black,brown} | -ct {full-colour,black-and-white,transparent}]
                          [-it {face,photo,clipart,lineart,animated}]
                          [-ft {jpg,gif,png,bmp,svg,webp,ico,raw}] [-s SITE]
                          [-ss {True,False}] [-ur {CC,Commercial,Other}])

Get arguments for searching for images

optional arguments:
  -h, --help            show help message and exit
  -q QUERY [QUERY ...], --query QUERY [QUERY ...]
                        Query to search for
  -l LIMIT, --limit LIMIT
                        Max images to download
  -o OUTPUTDIR, --outputDir OUTPUTDIR
                        Full directory to store images in
  -c CHROMEDRIVER, --chromedriver CHROMEDRIVER
                        Full directory to the chromedriver
  -epq EXACTQUERY, --exactQuery EXACTQUERY
                        Words that must be included (e.g. bat under)
  -oq OPTIONALQUERY, --optionalQuery OPTIONALQUERY
                        Words that are optional (e.g. apple tree)
  -eq EXCEPTQUERY, --exceptQuery EXCEPTQUERY
                        Words that must not be included (e.g. cat vote)
  -cs CUSTOMSIZE, --customSize CUSTOMSIZE
                        Find image of specific size
  -sz {s,m,l,i,>2MP,>4MP,>6MP,>8MP,>10MP,>12MP,>15MP,>20MP,>40MP,>70MP,>400*300,>640*480,>800*600,>1024*768}, --size {s,m,l,i,>2MP,>4MP,>6MP,>8MP,>10MP,>12MP,>15MP,>20MP,>40MP,>70MP,>400*300,>640*480,>800*600,>1024*768}
                        Find images of specific size (s, m, l, icon, >x MP,
                        >x*y)
  -ar {s,t,w,p}, --aspectRatio {s,t,w,p}
                        Find images of specific aspect ratio (square, tall,
                        wide, panoramic)
  -co {red,orange,yellow,green,teal,blue,purple,pink,white,gray,black,brown}, --colour {red,orange,yellow,green,teal,blue,purple,pink,white,gray,black,brown}
                        Find images containing specific colour
  -ct {full-colour,black-and-white,transparent}, --colourType {full-colour,black-and-white,transparent}
                        Find images of specific type
  -it {face,photo,clipart,lineart,animated}, --imageType {face,photo,clipart,lineart,animated}
                        Type of image
  -ft {jpg,gif,png,bmp,svg,webp,ico,raw}, --fileType {jpg,gif,png,bmp,svg,webp,ico,raw}
                        Type of file
  -s SITE, --site SITE  Specific site or domain to search (e.g. example.com,
                        .org
  -ss {True,False}, --SafeSearch {True,False}
                        Should SafeSearch be on
  -ur {CC,Commercial,Other}, --usageRights {CC,Commercial,Other}
                        Filter by usage rights

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

Disclaimer

This program lets you download images from Google. Please do not use any image in a way that violates its copyright terms.

Google Images is a search engine that merely indexes images and allows you to find them. It does NOT produce its own images and, as such, it doesn't own copyright on any of them. The original creators of the images own the copyrights.

Images published in the United States are automatically copyrighted by their owners, even if they do not explicitly carry a copyright warning. You may not reproduce copyright images without their owner's permission, except in "fair use" cases, or you could risk running into lawyer's warnings, cease-and-desist letters, and copyright suits. Please be very careful before its usage!

Use this code judiciously.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

download_images-Xarcrax-1.0.2.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

download_images_Xarcrax-1.0.2-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file download_images-Xarcrax-1.0.2.tar.gz.

File metadata

  • Download URL: download_images-Xarcrax-1.0.2.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.1 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.7.4

File hashes

Hashes for download_images-Xarcrax-1.0.2.tar.gz
Algorithm Hash digest
SHA256 7cfa7dda2c6a8283f5f661b9411ea6d757282c7101d4418bf93d51dbe3e9bd80
MD5 0d94a7ee0f53cd8bfd3eab038a4ff178
BLAKE2b-256 8f14974d70ee8db0c14b6b58df0fb6cf120b61a180a4f884e430d0b818be8bee

See more details on using hashes here.

Provenance

File details

Details for the file download_images_Xarcrax-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: download_images_Xarcrax-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.1 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.7.4

File hashes

Hashes for download_images_Xarcrax-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e626c1f9569e4cc90547694d85193a4b1989fea4ebecd01d6f58da5eb0845ea3
MD5 aa42ce933c066d4fb3ce4fcb12a2aa99
BLAKE2b-256 c4032bdff7f5ccd3aec3f759bf1acade0170057a80f78e955212380b002b829f

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page