2013-07-28 124 views

回答

3

您可以搜索此链接: http://code.google.com/apis/youtube/2.0/developers_guide_protocol_api_query_parameters.html#authorsp

而且像你写的,你可以使用查询:首先是http://gdata.youtube.com/feeds/api/videos?author="+username+"&v=2&alt=json

对于spesicif播放列表,研究这个链接,是关于让播放列表。 https://developers.google.com/youtube/2.0/developers_guide_protocol_playlists

你可以在XML格式播放列表:https://gdata.youtube.com/feeds/api/users/thenewboston/playlists?v=2

,如果你想在JSON追加& ALT = JSON查询。这个链接会给你播放列表。

,并使用网址像这样获得的播放列表的项目:https://gdata.youtube.com/feeds/api/playlists/8BCDD04DE8F771B2?v=2

为了得到播放列表项在JSON数据,你必须得到这个节点:

"content": { 

     "type": "application/atom+xml;type=feed", 
     "src": "https://gdata.youtube.com/feeds/api/playlists/PL6gx4Cwl9DGCS7sMM-19z9_ud7F2SINJq?v=2 
}, 

这个节点是从thenewboston的播放列表数据。 你可以找到更多关于Youtube API和播放列表的信息,请点击此链接:https://developers.google.com/youtube/2.0/developers_guide_protocol_playlists和检索单个播放列表标题。

+0

@:mertaydin:如果我可以使用查询,我已经写了什么放在“用户名”字段,以获得我想要的播放列表? – Tolen

+1

您必须编写用户名字段Youtube用户名。例如,获取新波士顿帐户的视频(链接是http://www.youtube.com/user/thenewboston),您必须使用如下查询:http://gdata.youtube.com/feeds/api/videos?author=thenewboston&v = 2&alt = json – mertaydin

+0

好的。但是如果沃波斯顿有很多视频而我只想要一个与他相关的特定播放列表呢? – Tolen