0

Google 検索 API を使用してアプリケーションで Google 検索を実行しています。重複した結果が得られます。それを回避する方法。http://code.google.com/apis/ajaxsearch/documentation/reference.html#_intro_fonjeを参照してください

4

1 に答える 1

0

で使用されているフィルタリング オプションを確認できます。

次の 2 種類のフィルターを使用します。

  • 重複スニペット フィルタ
  • 重複ディレクトリ フィルタ

したがって、呼び出すときに 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 に答える