0
我正在通过谷歌搜索API在我的应用程序中执行谷歌搜索。它给了我重复的结果。如何避免它。我指http://code.google.com/apis/ajaxsearch/documentation/reference.html#_intro_fonje删除谷歌搜索API中的重复?
我正在通过谷歌搜索API在我的应用程序中执行谷歌搜索。它给了我重复的结果。如何避免它。我指http://code.google.com/apis/ajaxsearch/documentation/reference.html#_intro_fonje删除谷歌搜索API中的重复?
你可以看一下在使用的过滤选项:
它使用两种类型的过滤器:
所以打电话时,标记过滤=真
results = server.doGoogleSearch(key, 'mark', 0, 10, False, "", ...)
该API提供了以下论据:
key - Your Google API key
q - The search word
start - The index of the result to start on
maxResults - The number of results to return.
filter - If True, Google will filter out duplicate pages
restrict - Set this to country plus a country code to get results only from a particular country
safeSearch - If True, Google will filter out porn sites
lr (“language restrict”) - Set this to a language code
ie and oe must be "utf-8"
你肯定对公众谷歌的工作? – 2010-09-14 07:10:01
Google API接受Filter = True/False选项,我假设重复过滤器也为公开Google启用。 – pyfunc 2010-09-14 07:12:52
@Byron Whitlock:Ajax搜索API文档,Google Appliance API都提供过滤器作为搜索API的选项 – pyfunc 2010-09-14 07:17:23