当我使用 Google Feed API 的find
搜索时,很多时候它不会返回 Feed 的 URL。
例如,find
对查询“CNN”的搜索指向此 URL:
https://ajax.googleapis.com/ajax/services/feed/find?v=1.0&q=cnn
并返回这些结果(修剪):
{
"responseData": {
"query": "cnn",
"entries": [
{
"url": "",
"title": "<b>CNN</b>.com: Breaking News, US, World, Weather, Entertainment <b>...</b>",
"contentSnippet": "Find the latest breaking news and information on the top stories, weather, <br>\nbusiness, entertainment, politics, and more. For in-depth coverage, <b>CNN</b> <br>\nprovides ...",
"link": "http://www.cnn.com/"
},
{
"url": "",
"title": "World News - International Headlines, Stories and Video - <b>CNN</b>.com",
"contentSnippet": "<b>CNN</b> brings you International News stories, video and headlines from Europe, <br>\nAsia, Africa, the Middle East, and the Americas.",
"link": "http://www.cnn.com/world"
},
{
"url": "",
"title": "U.S. News - Headlines, Stories and Video - <b>CNN</b>.com",
"contentSnippet": "<b>CNN</b>.com brings you US News, Videos and Stories from around the country.",
"link": "http://www.cnn.com/us"
},
{
"url": "",
"title": "<b>CNN</b> (@<b>CNN</b>) | Twitter",
"contentSnippet": "The latest Tweets from <b>CNN</b> (@<b>CNN</b>). It's our job to #GoThere and tell the most <br>\ndifficult stories. Come with us!",
"link": "https://twitter.com/cnn"
},
{
"url": "http://gdata.youtube.com/feeds/base/users/CNN/uploads?alt=rss&v=2&orderby=published&client=ytapi-youtube-profile",
"title": "<b>CNN</b> - YouTube",
"contentSnippet": "<b>CNN</b> operates as a division of Turner Broadcasting System, which is a subsidiary <br>\nof Time Warner. <b>CNN</b> identifies itself as -- and is widely known to be - the m...",
"link": "http://www.youtube.com/user/CNN"
}
]
},
"responseDetails": null,
"responseStatus": 200
}
前 4 个结果没有附加 URL。第 5 个可以,但不相关,所以我最初的想法是删除带有空 URL 的项目是行不通的。
按照他们开发人员指南上的基本查询示例,他们的示例显示了url
填写的结果字段。复制并粘贴他们提供的 URL 会显示类似的结果,但没有url
填写该字段。
除非我弄错了,否则这似乎一定是谷歌结果的问题。