“Recherche d'images Google” Réponses codées

Recherche d'images Google

from google_images_search import GoogleImagesSearch

# you can provide API key and CX using arguments,
# or you can set environment variables: GCS_DEVELOPER_KEY, GCS_CX
gis = GoogleImagesSearch('your_dev_api_key', 'your_project_cx')

# define search params:
_search_params = {
    'q': '...',
    'num': 10,
    'safe': 'high|medium|off',
    'fileType': 'jpg|gif|png',
    'imgType': 'clipart|face|lineart|news|photo',
    'imgSize': 'huge|icon|large|medium|small|xlarge|xxlarge',
    'imgDominantColor': 'black|blue|brown|gray|green|orange|pink|purple|red|teal|white|yellow',
    'imgColorType': 'color|gray|mono|trans',
    'rights': 'cc_publicdomain|cc_attribute|cc_sharealike|cc_noncommercial|cc_nonderived'
}

# this will only search for images:
gis.search(search_params=_search_params)

# this will search and download:
gis.search(search_params=_search_params, path_to_dir='/path/')

# this will search, download and resize:
gis.search(search_params=_search_params, path_to_dir='/path/', width=500, height=500)

# search first, then download and resize afterwards:
gis.search(search_params=_search_params)
for image in gis.results():
    image.download('/path/')
    image.resize(500, 500)
Puzzled Pintail

Recherche d'images Google

Google Images Search - Python
Impossible Impala

https://www.google.com/search?ei=BIHQX_V9DJB - GTYOLH4DQ

Your search - https://www.google.com/search?ei=bihqX_v9DJb--gTYoLH4DQ Searches related to read ... - did not match any news results.

Suggestions:

Make sure that all words are spelled correctly.
Try different keywords.
Try more general keywords.
Try fewer keywords.
MINERAL MAN

Réponses similaires à “Recherche d'images Google”

Questions similaires à “Recherche d'images Google”

Plus de réponses similaires à “Recherche d'images Google” dans Python

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code