Python 删除谷歌搜索api中的重复?

Python 删除谷歌搜索api中的重复?,python,google-search-api,Python,Google Search Api,我正在通过谷歌搜索api在我的应用程序中执行谷歌搜索。它给了我重复的结果。如何避免它。我指的是您可以查看以下位置使用的过滤选项: 它使用两种类型的过滤器: 重复代码段筛选器 重复目录筛选器 因此,在调用时,标记Filter=True results = server.doGoogleSearch(key, 'mark', 0, 10, False, "", ...) API提供以下参数: key - Your Google API key q - The search word st

我正在通过谷歌搜索api在我的应用程序中执行谷歌搜索。它给了我重复的结果。如何避免它。我指的是

您可以查看以下位置使用的过滤选项:

它使用两种类型的过滤器:

  • 重复代码段筛选器
  • 重复目录筛选器
因此,在调用时,标记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"

Google API接受Filter=True/False选项,我假设公共Google也启用了重复筛选器。@Byron Whitlock:Ajax搜索API文档、Google Appliance API都为搜索API提供了筛选器选项