我正在通过谷歌搜索 api 在我的应用程序中执行谷歌搜索。它给了我重复的结果。如何避免。我参考http://code.google.com/apis/ajaxsearch/documentation/reference.html#_intro_fonje
问问题
941 次
1 回答
0
您可以查看使用的过滤选项:
它使用两种类型的过滤器:
- 重复片段过滤器
- 重复目录过滤器
所以调用的时候,标记Filter=True
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-14T07:09:07.920 回答