Как получить изображение с помощью пользовательского поиска Google JSON API звонки - PullRequest
0 голосов
/ 30 декабря 2018

Я пытаюсь внедрить систему пользовательского поиска Google для веб-сайта.

Вот мой запрос на получение:

https://www.googleapis.com/customsearch/v1?key=MY_API_KEY&cx=MY_SEARCH_ENGINE_ID&q=test&sort=date:r:20181220:20181228

Я пытаюсь получитьрезультат поиска, который также включает в себя изображения.но в ответе нет изображения.Вот пример ответа:

{
    kind: "customsearch#result", 
    title: "site titel", 
    htmlTitle: "site title", 
    link: "https://site_domain_name/login/?location=link-to-article", 
    displayLink: "site_domain_name",
    cacheId: "7JmDcdzgkzYJ"
    displayLink: "site_domain_name"
    formattedUrl: "https://site_domain_name/login/?location...test"
    htmlFormattedUrl: "https://site_domain_name/login/?location...<b>test</b>"
    htmlSnippet: "تسجيل الدخول. أو. Continue with Facebook Continue with Google. نسيت رقمك <br>↵السري؟ لا تملك حسا. ﺣﻘﻮﻕ ﺍﻟﻨﺸﺮ © 2018 - 2006 Website."
    htmlTitle: "site title"
    kind: "customsearch#result"
    link: "https://site_domain_name/login/?location=link-to-article"
    pagemap: {
        metatags: Array(1)
        0:
            og:description: "testing"
            og:locale: "en_US"
            og:site_name: "Site Name"
            og:title: "Random Video Test"
            og:type: "article"
            og:url: "https://site_domain_name/videos/random-video-test/"
            twitter:card: "summary_large_image"
            twitter:description: "testing"
            twitter:title: "Random Video Test"
            viewport: "width=device-width, initial-scale=1"
       __proto__: Object
       length: 1
    }
    snippet: "تسجيل الدخول. أو. Continue with Facebook Continue with Google. نسيت رقمك ↵السري؟ لا تملك حساب؟ سج. ﺣﻘﻮﻕ ﺍﻟﻨﺸﺮ © 2018 - 2006."
    title: "site_title"
    __proto__: Object
}

Может ли какой-либо орган рассказать мне, как получить изображения, связанные с результатами поиска?

...