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

fix search_img_ddg #646

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

fix search_img_ddg #646

wants to merge 1 commit into from

Conversation

arman-hk
Copy link

Fixes and Improvements to the search_images_ddg Function in utils.py

Changes include:

  • Token Parsing: now exits early and returns an empty collection if the search token cannot be parsed, preventing further execution with invalid parameters.
  • Loop Condition: adjusted the loop to explicitly check max_n as a stopping condition, safer against infinite loops.
  • Minor Error Handling: generic exception handler to catch and log errors during execution, allowing the function to return any results collected prior to the error.

core functionality of the func remains unchanged, ensuring that it continues to operate as expected.

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

Successfully merging this pull request may close these issues.

1 participant