如何让YouTube播放列表的GData JSON响应(How to get Youtube GDa

2019-10-23 13:29发布

我一直在使用GDATA到这部YouTube播放列表分析到我的应用程序: https://www.youtube.com/playlist?list=PLWz5rJ2EKKc9ofd2f-_-xmUi07wIGZa1c

所以我觉得,我应该需要使用以下链接以获得JSON响应: http://gdata.youtube.com/feeds/api/playlists/PLWz5rJ2EKKc9ofd2f-_-xmUi07wIGZa1c?v=2&alt=jsonc

但每当我在浏览器中打开它,每次获得:

{"apiVersion":"2.1","error":{"code":410,"message":"No longer available","errors":[{"domain":"GData","code":"NoLongerAvailableException","internalReason":"No longer available"}]}}

我曾尝试用最新的版本(即 - 3):

http://gdata.youtube.com/feeds/api/playlists/PLWz5rJ2EKKc9ofd2f-_-xmUi07wIGZa1c?v=3&alt=jsonc

和获得: {"error":{"code":403,"message":"Version 3 is not supported.","errors":[{"domain":"GData","code":"versionNotSupported","internalReason":"Version 3 is not supported."}]}}

因此,如何可能我得到GDATA JSON响应? 后来解析在我的Android应用

Answer 1:

和你一起工作的API是没有更多的可用尝试新的YouTube API

https://developers.google.com/youtube/v3/



文章来源: How to get Youtube GData Playlist JSON response