我可以获取标题和视频 ID,但无法获取缩略图。我不断收到一条错误消息,显示“ . operator 后缺少名称”
function doGet(e) {
var app = UiApp.createApplication();
var vPanel = app.createVerticalPanel();
var myLabel = app.createLabel('My Favorite channel');
vPanel.add(myLabel);
var results = YouTube.Search.list('id,snippet', {
channelId: 'UCDiFRMQWpcp8_KD4vwIVicw',
order:'date',
maxResults: 3
});
for (var i = 0; i < results.items.length; i++) {
var item = results.items[i];
var hPanel = app.createHorizontalPanel();
hPanel.add(app.createLabel('Video ID: '+item.id.videoId+' Video Title: '+item.snippet.title));
hPanel.add(app.createImage(item.snippet.thumbnails.default.url));
vPanel.add(hPanel);
}
app.add(vPanel);
return app
}