从Google自定义搜索API获取日期 [英] Get Date From Google Custom Search API

查看:65
本文介绍了从Google自定义搜索API获取日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何获取类似Google搜索的日期数据.有可能得到吗? 我从未在Google自定义搜索API中找到它.我发布的第二张图片只是片段,上面有日期和一些描述.谷歌搜索新闻中的第一张图片,谷歌自定义搜索中的第二张图片

How i can get date data like that google search. Is it possible to get it? I never found it in google custom search API. The second picture i post is only snippet which got date and some description about it. The first picture from google search news and the second is google custom search

推荐答案

以下API请求仅在其HTML源代码中提及时才返回元数据,例如发布时间.

The following API request returns metadata, like published time, only if it is mentioned in its HTML source.

GET https://www.googleapis.com/customsearch/v1?key=APIkey&cx=CustomSearchEngineID&q=rambo


并参考元数据"部分


And refer to the "metatags" section

还有 Voila!

希望有所帮助:)

这篇关于从Google自定义搜索API获取日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆