google-images-download icon indicating copy to clipboard operation
google-images-download copied to clipboard

missing argument 'keywords'

Open buszonos opened this issue 5 years ago • 6 comments
trafficstars

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)

buszonos avatar May 06 '20 19:05 buszonos

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.

gaushh avatar May 07 '20 11:05 gaushh

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

buszonos avatar May 07 '20 11:05 buszonos

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

gaushh avatar May 07 '20 13:05 gaushh

@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

mohitsingh538 avatar Aug 06 '20 11:08 mohitsingh538

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!

glenn-jocher avatar Nov 09 '23 18:11 glenn-jocher

@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.

Neltherion avatar Jan 30 '24 11:01 Neltherion