2

我创建了一个函数,获取谷歌建议并以相同的格式返回。我的opensearch.xml文件如下:

<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:suggestions="http://www.opensearch.org/specifications/opensearch/extensions/suggestions/1.1">
    <ShortName>example</ShortName>
    <Description>example</Description>
    <InputEncoding>UTF-8</InputEncoding>
    <Url type="application/x-suggestions+json" template="https://<url>/meta_search/get_suggestions/?query={searchTerms}" method="get" />
</OpenSearchDescription>

当我使用我的网站作为搜索引擎在地址栏中键入“iphone”时,得到以下信息: 在此处输入图像描述

但是,当我使用 google 作为搜索引擎在地址栏中键入“iphone”时,会得到以下建议: 在此处输入图像描述

如何使用我的网站作为搜索引擎获得相同的建议?

4

0 回答 0