根据v3 API spec,在搜索中返回的视频应包含缩略图。
直到30分钟前,情况就是这样。
但是,现在,API正在返回JSON中没有“缩略图”属性的视频。
例如:
https://www.googleapis.com/youtube/v3/videos?part=snippet&key=(key)&id=Kq9z1gNjl0o
以前会回来:
{ "kind": "youtube#videoListResponse", "etag": "\"idnvT0N6oxG_2o6LCWUdZsqtqtk/flm_N0PUouBHj2piDWTowbpXlNM\"", "items": [ { "id": "Kq9z1gNjl0o", "kind": "youtube#video", "etag": "\"idnvT0N6oxG_2o6LCWUdZsqtqtk/9f5tPPIkXNmECTi095h9jBWV0s0\"", "snippet": { "publishedAt": "2010-06-27T00:07:30.000Z", "channelId": "UC3lizSW-J9kc8JR455mzv-w", "thumbnails": [ "small": { "url": "http://ytimg.com/someimage.jpg" } ] "title": "Kristen Bell - On Craig Ferguson - 4/19/08 - Wow", "description": "Interview", "channelTitle": "stewiefan33", "categoryId": "22" } } ] }
现在返回:
{ "kind": "youtube#videoListResponse", "etag": "\"idnvT0N6oxG_2o6LCWUdZsqtqtk/flm_N0PUouBHj2piDWTowbpXlNM\"", "items": [ { "id": "Kq9z1gNjl0o", "kind": "youtube#video", "etag": "\"idnvT0N6oxG_2o6LCWUdZsqtqtk/9f5tPPIkXNmECTi095h9jBWV0s0\"", "snippet": { "publishedAt": "2010-06-27T00:07:30.000Z", "channelId": "UC3lizSW-J9kc8JR455mzv-w", "title": "Kristen Bell - On Craig Ferguson - 4/19/08 - Wow", "description": "Interview", "channelTitle": "stewiefan33", "categoryId": "22" } } ] }
“缩略图”字段已消失,但仍在文档中。这是API中的错误吗?