Get Date From Google Custom Search API

◇◆丶佛笑我妖孽 提交于 2019-12-07 04:24:49

问题


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


回答1:


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

And Voila!

Hope that helps :)



来源:https://stackoverflow.com/questions/43736425/get-date-from-google-custom-search-api

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!