Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

custom_image_name parameter doesn't work #140

Closed
ahmadalghadban opened this issue Apr 27, 2022 · 1 comment
Closed

custom_image_name parameter doesn't work #140

ahmadalghadban opened this issue Apr 27, 2022 · 1 comment

Comments

@ahmadalghadban
Copy link

The following code, and the downloaded images are named arbitrary

from google_images_search import GoogleImagesSearch
import os

key = os.environ.get('GCS_DEVELOPER_KEY') 
print(key)

cx  = os.environ.get('GCS_CX')
gis = GoogleImagesSearch(key, cx)

_search_params = {
    'q'       : 'orange',
    'num'     : 11,
    'safe'    : 'high',
    'fileType': 'jpg|png',
    'imgType' : 'photo',
}


gis.search(search_params=_search_params, custom_image_name='org')

gis.next_page()
for image in gis.results():
    print(image)
    image.download('H:\orange') # download location
@arrrlo
Copy link
Owner

arrrlo commented May 11, 2022

Hi,

Have you tried to use it like this?

gis.search(search_params=_search_params, path_to_dir='...', 
           custom_image_name='my_image')

@arrrlo arrrlo closed this as completed May 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants