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 Error Handling for Limit equal or less than 0 when executed using from another Python file #16

Open
CaioRhoden opened this issue Jun 15, 2022 · 0 comments

Comments

@CaioRhoden
Copy link

Heyy, I've used this lib for a personal proejct and now I'm using it for a college course on Software Testing, applying some tests I identified the following problem in error handling

Issue description

When the limit argument (optional) is set to zero or below the lib download the 100 default image without any warning or exception
because of the invalid parameter passed

Steps to reproduce the issue

1. Clone repository
**2. **cd google-images-download && sudo python setup.py install
3. In this respository create a python script
4. Import from google_images_download import google_images_download
5. Add the following commands

response = google_images_download.googleimagesdownload() 
arguments = {'keywords': 'dog', 'limit': 0}
response.download(arguments)

6. Run script

What's the expected result?

  • Some error message to explicit that is not possible to download 0 images

What's the actual result?

  • It downloads all default 100 images

Additional details / screenshot

image

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

1 participant