-
Notifications
You must be signed in to change notification settings - Fork 9
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
Gem forces the use of q
parameter for engines that is not used
#10
Comments
Happened again Request: {
:engine=>"yahoo",
:p=>"serpapi",
:api_key=>"<censored>"
}
/home/<censored>/.gem/ruby/3.0.0/gems/google_search_results-2.2.0/lib/search/serp_api_search.rb:178:in `check_params': missing required keys in params: (SerpApiException)
- q
from /home/<censored>/.gem/ruby/3.0.0/gems/google_search_results-2.2.0/lib/search/google_search.rb:36:in `initialize'
from se_everywhere.rb:41:in `new'
from se_everywhere.rb:41:in `block in <main>'
from se_everywhere.rb:32:in `each'
from se_everywhere.rb:32:in `<main>' |
Actually, class YahooSearch < SerpApiSearch
def initialize(params = {})
super(params, YAHOO_ENGINE)
check_params([:p, :engine])
end
...
end By replacing the We should fix code generation from API Playground to change class depending of the engine used. |
This is resolved by https://github.com/serpapi/serpapi-ruby |
+1 Seeing this issue when using the google_search_results ruby gem. Is there a pending fix for this? |
We have several engines that work without a
q
parameter.For example, Yande uses
text
:And you can't submit your search to the API.
Hash with all engines that don't use
q
parameter:We can explicitly check on this but I think it will easier to just drop the requirement of a
q
parameter for all engines.The text was updated successfully, but these errors were encountered: