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

cannot search for "green apples" #20

Open
ras37srq opened this issue Jul 28, 2022 · 1 comment
Open

cannot search for "green apples" #20

ras37srq opened this issue Jul 28, 2022 · 1 comment

Comments

@ras37srq
Copy link

Code does a split on on strings and creates a separate URL and search for every word. Searching for "green apples" gives a folder with images of "green" and a separate folder of (red) "apples".

You would think it could be solved by quoting, "'green apples'", but that causes the package to create a url to search every character in that phrase -- ', g, r, e, ...

This needs to be fixed so the image search is anything that can be searched in images.google. E.g., " +'green apples' clipart ".

@Erraoudy
Copy link

Erraoudy commented Aug 9, 2022

You should add replace(" ", "+") to replace space with + sign in search Query
example :

my_downloader = simp.Downloader()
my_downloader.extensions = '.jpg'
my_downloader.search_urls(('What dog is the baddest?').replace(" ", "+"),limit=0, verbose=True)
url = my_downloader.get_urls()
//Prints image url
print(url[0])
```

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