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

missing argument 'keywords' #6

Open
buszonos opened this issue May 6, 2020 · 6 comments
Open

missing argument 'keywords' #6

buszonos opened this issue May 6, 2020 · 6 comments

Comments

@buszonos
Copy link

buszonos commented May 6, 2020

Hi,
My problem is: every time I try to run this module with 'search' argument and without 'keywords' argument, i get error message "Uh oh! Keywords is a required argument[....]". When i use 'keywords' argument only, module will use google images as a source, and it obviously won't download any images. When I use both, it will still use google images url. I will provide you part of my code if it helps you.

import bing_scraper
response = bing_scraper.googleimagesdownload()
arguments = {"search": 'honeybees on flowers',
"limit": 10,
"download":True,
"chromedriver":r"C:\Users\User\Desktop\python\chromedriver.exe"
}

response.download(arguments)

@gaushh
Copy link

gaushh commented May 7, 2020

cd C:\Users\username\google-images-download
python bing_scraper.py --search 'honeybees or flowers' --limit 10 --download --chromedriver C:\Software\chromedriver

Run this from command line after cloning the repo. Should work.

@buszonos
Copy link
Author

buszonos commented May 7, 2020

Uhh, i forgot to mention i want to use this module from other python file, not from terminal

@gaushh
Copy link

gaushh commented May 7, 2020

Well i too am trying to figure out the same. Let me know if you find a solution. :p

@mohitsingh538
Copy link

@buszonos Try this. Download this file, unzip and replace it with your original bing_scraper.py file. I have replaced all Google URLs with that of Bing and now it's taking argument --keywords without using --search
bing_scraper.py.zip

@glenn-jocher
Copy link
Member

I understand you want to use the module from within another Python file, not from the terminal. You can achieve this by importing the module and making a function call with the required arguments. If you encounter any issues, feel free to ask for help. Good luck!

@Neltherion
Copy link

@buszonos Try this. Download this file, unzip and replace it with your original bing_scraper.py file. I have replaced all Google URLs with that of Bing and now it's taking argument --keywords without using --search bing_scraper.py.zip

This should be merged with the main branch.

pa-0 pushed a commit to pa-0/google-images-download that referenced this issue Jul 9, 2024
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

5 participants