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 when the offset is above the limit passed when running from another Python file #19

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 offset argument (optional) is above the limit parameter the lib download images without any warning or exception

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': 5, 'offset': 9}
response.download(arguments)

6. Run script

What's the expected result?

  • Some error message to explicit that is not possible to have an offset above the limit

What's the actual result?

  • It downloads 0 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