“wyszukiwanie obrazów Google” Kod odpowiedzi

Wyszukiwanie obrazów 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

wyszukiwanie obrazów 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

Odpowiedzi podobne do “wyszukiwanie obrazów Google”

Pytania podobne do “wyszukiwanie obrazów Google”

Więcej pokrewnych odpowiedzi na “wyszukiwanie obrazów Google” w Python

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu