-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
feat: Update searchapi format, default to Google, allow search engine selection #7453
Conversation
Pull Request Test Coverage Report for Build 8535435967Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The approach looks correct.
I left some comments.
if "engine" not in self.search_params: | ||
self.search_params["engine"] = "google" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer setting this in __init__
. This would also ensure that this default is properly serialized.
See the [SearchApi website](https://www.searchapi.io/) for more details. The default search engine is Google, | ||
however, users can change it by setting the `engine` parameter in the `search_params`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add this information to the __init__
docstring.
Working me for me now. Thanks |
Thanks for the feedback @anakin87 , confirmed all works as well with your suggestions. Please have another look |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Why:
The update in the web search API component focuses on updating to a new format and also enhancing flexibility. Specifically, it addresses the need for users to specify their preferred search engine when conducting web searches through the API.
What:
search_params
argument, with Google being the default.engine
parameter is not present insearch_params
and setting it to "google" by default.payload
variable.How can it be used:
search_params
like so:How did you test it:
Notes for the reviewer: