Google search api 在googleapi中过滤显式图像
嗨,我想在运行应用程序时过滤显式图像(在本地和服务器中)。 如何限制包含成人图像的图像使用谷歌自定义搜索引擎限制图像我该怎么做请任何人帮助我 我使用下面的代码,但它不工作Google search api 在googleapi中过滤显式图像,google-search-api,google-image-search,Google Search Api,Google Image Search,嗨,我想在运行应用程序时过滤显式图像(在本地和服务器中)。 如何限制包含成人图像的图像使用谷歌自定义搜索引擎限制图像我该怎么做请任何人帮助我 我使用下面的代码,但它不工作 <script type="text/javascript"> google.load('search', '1'); function initialize() { var searchControl = new google.search.Sea
<script type="text/javascript">
google.load('search', '1');
function initialize() {
var searchControl = new google.search.SearchControl();
searchControl.addSearcher(new google.search.ImageSearch());
searchControl.draw(document.getElementById("searchcontrol"));
searchControl.execute("sunset");
}
google.setOnLoadCallback(initialize);
</script>
load('search','1');
函数初始化(){
var searchControl=new google.search.searchControl();
searchControl.addSearcher(新的google.search.ImageSearch());
searchControl.draw(document.getElementById(“searchControl”);
searchControl.execute(“日落”);
}
setOnLoadCallback(初始化);
您可以使用以下代码
var searcher=new google.search.ImageSearch()searcher.setRestriction(
google.search.search.RESTRICT\u SAFESEARCH,
google.search.search.SAFESEARCH(严格要求) imageSearch.setSearchCompleteCallback…
imageSearch.execute 另请注意:
这跟阿彭金有什么关系?这是客户端javascript代码,正在使用与AppEngine无关的google搜索服务。一旦在服务器上发布,我想在我的应用程序中实现安全的搜索过滤。