如果您想从 YT 播放列表中检索播放列表数据,请使用
var feedUrl = "http://gdata.youtube.com/feeds/api/playlists/"+nPlaylistID+"?max-results=8";
if (result.error || !result.url)
{
$('#divid').hide();
return;
}
var feed = new google.feeds.Feed(result.url);
feed.setNumEntries(50);
feed.load(function (result) {
for (var i = 0; i < result.feed.entries.length; i++) {
var entry = result.feed.entries[i];
var vidhash = /=(.*)&(.*)$/.exec (entry.link)[1];
container.append('<div><a href="http://www.youtube.com/embed/'+vidhash+'" class="html5lightbox" title="'+entry.title+'"><img src="http://img.youtube.com/vi/'+vidhash+'/0.jpg" /><br />'+entry.title+'</a></div>\n');