Google自定义搜索结果仅包含谷歌地图的结果

问题描述 投票:1回答:1

我最近实施了Google自定义搜索。我得到一个结果,但它的每一个链接,无论是网站或图像或缩略图,它来自地图。

示例结果 -

 {
   "kind": "customsearch#result",

   "title": "Saga Tree",

   "htmlTitle": "Saga \u003cb\u003eTree\u003c/b\u003e",

   "link": "https://***www.google.com/mymaps***/viewer?mid=1yF1gMCZhBaeEouT9GB-7bQqXmuw&hl=en",

   "formattedUrl": "***https://www.google.com/mymaps***/viewer?mid...7bQqXmuw&hl...",

   "pagemap": {

      "cse_thumbnail": [
         {
          "width": "221",
          "height": "228",

          "src": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcR2SZoZ2AF7PUVw5wGucLb5Hd4k1Bwkt3x6__ed8E_01Mlq5Fwd7nKpKI2b"
         }
    ],
    "website": [
         {
          "name": "Saga Tree",
          "description": "Saga Tree",
          "url": "***https://www.google.com/maps/d/viewer***?mid=1yF1gMCZhBaeEouT9GB-7bQqXmuw&hl=en",

          "image": "***https://www.google.com/maps***/d/thumbnail?mid=1yF1gMCZhBaeEouT9GB-7bQqXmuw&hl=en"

         }
    ],
    "metatags": [
         {
          "viewport": "initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0,width=device-width",
          "og:type": "website",
          "og:title": "Saga Tree",
          "og:description": "Saga Tree",
          "og:url": "***https://www.google.com/maps***/d/viewer?mid=1yF1gMCZhBaeEouT9GB-7bQqXmuw&hl=en",

          "og:image": "***https://www.google.com/maps***/d/thumbnail?mid=1yF1gMCZhBaeEouT9GB-7bQqXmuw&hl=en",

          "twitter:card": "summary_large_image",
          "twitter:title": "Saga Tree",
          "twitter:description": "Saga Tree",

          "twitter:image:src": "https://www.google.com/maps/d/thumbnail?mid=1yF1gMCZhBaeEouT9GB-7bQqXmuw&hl=en"

         }
    ],
    "cse_image": [
         {

          "src": "https://www.google.com/maps/d/thumbnail?mid=1yF1gMCZhBaeEouT9GB-7bQqXmuw&hl=en"

         }
    ]
   }
 }

每个结果都是如此。我想要结果,好像我在浏览器中搜索过它一样。

android google-custom-search
1个回答
2
投票

当Custom Search API仅使用默认包含的网站(www.google.com)执行搜索时,通常会发生这种情况。这是默认值。要更改它,请转到您的自定义搜索引擎下的基础知识 - >要搜索的网站,然后选择“搜索整个网络但强调包含的网站”而不是默认的“仅搜索包含的网站”。

还要确保在“基本”下启用“图像搜索”。

alt text

© www.soinside.com 2019 - 2024. All rights reserved.