class BaiduSearch

Baidu Search Result for Ruby powered by SerpApi

Search API Usage

“`ruby parameter = {

q: "query",
api_key: "Serp API Key"

}

search = BaiduSearch.new(parameter)

html_results = search.get_html hash_results = search.get_hash json_results = search.get_json

“` doc: serpapi.com/baidu-search-api

Public Class Methods

new(params = {}) click to toggle source
Calls superclass method SerpApiSearch::new
# File lib/search/baidu_search.rb, line 24
def initialize(params = {})
  super(params, BING_ENGINE)
  check_params([:q, :engine])
end

Public Instance Methods

get_location() click to toggle source
# File lib/search/baidu_search.rb, line 29
def get_location
  raise 'location is not supported by Baidu'
end