如何获取YouTube播放列表的GData JSON响应 [英] How to get Youtube GData Playlist JSON response
问题描述
我在使用这个YouTube播放列表分析到我的应用程序GDATA:的https:/ /www.youtube.com/playlist?list=PLWz5rJ2EKKc9ofd2f-_-xmUi07wIGZa1c
所以我觉得,我应该需要使用下面链接以获得JSON响应:<一href=\"http://gdata.youtube.com/feeds/api/playlists/PLWz5rJ2EKKc9ofd2f-_-xmUi07wIGZa1c?v=2&alt=jsonc\" rel=\"nofollow\">http://gdata.youtube.com/feeds/api/playlists/PLWz5rJ2EKKc9ofd2f-_-xmUi07wIGZa1c?v=2&alt=jsonc
但是,每当我在浏览器中打开它,每次获得:
{apiVersion:2.1,错误:{code:410,消息:不再可用,错误:[{域:的GData,code:NoLongerAvailableException,internalReason:不再提供}]}}
我曾尝试用最新的版本(即 - 3):
<$p$p><$c$c>http://gdata.youtube.com/feeds/api/playlists/PLWz5rJ2EKKc9ofd2f-_-xmUi07wIGZa1c?v=3&alt=jsonc和获取: {错误:{code:403,消息:第3版,不支持,错误:[{域: 的GData,code:versionNotSupported,internalReason:第3版,不支持}]}}
那么怎么可能,我得到GDATA JSON响应?以解析晚些时候在我的Android应用
你一起工作的API是没有更多可用尝试新的YouTube API
https://developers.google.com/youtube/v3/
I have to parse this youtube playlist into my app using gdata: https://www.youtube.com/playlist?list=PLWz5rJ2EKKc9ofd2f-_-xmUi07wIGZa1c
So I think, I should need to use below link to get JSON response: http://gdata.youtube.com/feeds/api/playlists/PLWz5rJ2EKKc9ofd2f-_-xmUi07wIGZa1c?v=2&alt=jsonc
But whenever i am opening it on browser, every time getting:
{"apiVersion":"2.1","error":{"code":410,"message":"No longer available","errors":[{"domain":"GData","code":"NoLongerAvailableException","internalReason":"No longer available"}]}}
I have tried with latest version (i.e - 3):
http://gdata.youtube.com/feeds/api/playlists/PLWz5rJ2EKKc9ofd2f-_-xmUi07wIGZa1c?v=3&alt=jsonc
and getting: {"error":{"code":403,"message":"Version 3 is not supported.","errors":[{"domain":"GData","code":"versionNotSupported","internalReason":"Version 3 is not supported."}]}}
So how may i get gdata json response ? to parse later in my android app
the api you work with is no more available try the new Youtube API
https://developers.google.com/youtube/v3/
这篇关于如何获取YouTube播放列表的GData JSON响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!