Ubuntu

Trying to connect Linebot with youtube

var {google} =require('googleapis');
//1
var service = google.youtube('v3');
service.videos.list({
key: 'AIzaSyBInggOtXxPFYIRee0Xs3vb5iZ9YE9_518',
part: 'snippet',
id: '8ykMyNHAdKk', // 동영상 Id 팔레트
fields: 'items(snippet(title))'
}, function(err, response) {
if (err) {
console.log('The API returned an error: ',err);
return;
}
var video =response.data.items;
if(video.length ==0){
console.log('검색된 동영상이 없습니다.');
} else {
console.log(JSON.stringify(response.data.items[0],null,4));
}
})
//2
service.videos.list({
key: 'AIzaSyBInggOtXxPFYIRee0Xs3vb5iZ9YE9_518',
part: 'snippet',
id: '6744glqD6lk', // 동영상 Id 밤편지
fields: 'items(snippet(title))'
}, function(err, response) {
if (err) {
console.log('The API returned an error: ',err);
return;
}
var video =response.data.items;
if(video.length ==0){
console.log('검색된 동영상이 없습니다.');
} else {
console.log(JSON.stringify(response.data.items[0],null,4));
}
})
//3
service.videos.list({
key: 'AIzaSyBInggOtXxPFYIRee0Xs3vb5iZ9YE9_518',
part: 'snippet',
id: 'he2C4lx63M0', // 동영상 Id 마음
fields: 'items(snippet(title))'
}, function(err, response) {
if (err) {
console.log('The API returned an error: ',err);
return;
}
var video =response.data.items;
if(video.length ==0){
console.log('검색된 동영상이 없습니다.');
} else {
console.log(JSON.stringify(response.data.items[0],null,4));
}
})
//4
service.videos.list({
key: 'AIzaSyBInggOtXxPFYIRee0Xs3vb5iZ9YE9_518',
part: 'snippet',
id: 'xKZ3U8viuIU', // 동영상 Id 금요일에 만나요
fields: 'items(snippet(title))'
}, function(err, response) {
if (err) {
console.log('The API returned an error: ',err);
return;
}
var video =response.data.items;
if(video.length ==0){
console.log('검색된 동영상이 없습니다.');
} else {
console.log(JSON.stringify(response.data.items[0],null,4));
}
})
//5
service.videos.list({
key: 'AIzaSyBInggOtXxPFYIRee0Xs3vb5iZ9YE9_518',
part: 'snippet',
id: 'seFr4qWykgY', // 동영상 Id 너랑나
fields: 'items(snippet(title))'
}, function(err, response) {
if (err) {
console.log('The API returned an error: ',err);
return;
}
var video =response.data.items;
if(video.length ==0){
console.log('검색된 동영상이 없습니다.');
} else {
console.log(JSON.stringify(response.data.items[0],null,4));
}
})
//6
service.videos.list({
key: 'AIzaSyBInggOtXxPFYIRee0Xs3vb5iZ9YE9_518',
part: 'snippet',
id: 'r_-GQjN9Tpc', // 동영상 Id 내 손을 잡아
fields: 'items(snippet(title))'
}, function(err, response) {
if (err) {
console.log('The API returned an error: ',err);
return;
}
var video =response.data.items;
if(video.length ==0){
console.log('검색된 동영상이 없습니다.');
} else {
console.log(JSON.stringify(response.data.items[0],null,4));
}
})
//7
service.videos.list({
key: 'AIzaSyBInggOtXxPFYIRee0Xs3vb5iZ9YE9_518',
part: 'snippet',
id: 'OIHlzvEKncQ', // 동영상 Id 좋은날
fields: 'items(snippet(title))'
}, function(err, response) {
if (err) {
console.log('The API returned an error: ',err);
return;
}
var video =response.data.items;
if(video.length ==0){
console.log('검색된 동영상이 없습니다.');
} else {
console.log(JSON.stringify(response.data.items[0],null,4));
}
})
//8
service.videos.list({
key: 'AIzaSyBInggOtXxPFYIRee0Xs3vb5iZ9YE9_518',
part: 'snippet',
id: '04tYkKUPPv4', // 동영상 Id 라일락
fields: 'items(snippet(title))'
}, function(err, response) {
if (err) {
console.log('The API returned an error: ',err);
return;
}
var video =response.data.items;
if(video.length ==0){
console.log('검색된 동영상이 없습니다.');
} else {
console.log(JSON.stringify(response.data.items[0],null,4));
}
})
//9
service.videos.list({
key: 'AIzaSyBInggOtXxPFYIRee0Xs3vb5iZ9YE9_518',
part: 'snippet',
id: '0ldJaGupC1o', // 동영상 Id 사랑이 잘
fields: 'items(snippet(title))'
}, function(err, response) {
if (err) {
console.log('The API returned an error: ',err);
return;
}
var video =response.data.items;
if(video.length ==0){
console.log('검색된 동영상이 없습니다.');
} else {
console.log(JSON.stringify(response.data.items[0],null,4));
}
})
//10
service.videos.list({
key: 'AIzaSyBInggOtXxPFYIRee0Xs3vb5iZ9YE9_518',
part: 'snippet',
id: 'l0rcWimJmQ8', // 동영상 Id 봄 사랑, 벛꽃 말고
fields: 'items(snippet(title))'
}, function(err, response) {
if (err) {
console.log('The API returned an error: ',err);
return;
}
var video =response.data.items;
if(video.length ==0){
console.log('검색된 동영상이 없습니다.');
} else {
console.log(JSON.stringify(response.data.items[0],null,4));
}
})
var {google} =require('googleapis');
//1
var service = google.youtube('v3');
service.videos.list({
key: 'AIzaSyBInggOtXxPFYIRee0Xs3vb5iZ9YE9_518',
part: 'snippet',
id: 'j-seAiANLG8', // 동영상 Id
fields: 'items(snippet(title))'
}, function(err, response) {
if (err) {
console.log('The API returned an error: ',err);
return;
}
var video =response.data.items;
if(video.length ==0){
console.log('검색된 동영상이 없습니다.');
} else {
console.log(JSON.stringify(response.data.items[0],null,4));
}
})
//2
service.videos.list({
key: 'AIzaSyBInggOtXxPFYIRee0Xs3vb5iZ9YE9_518',
part: 'snippet',
id: 'F8c8f2nK82w', // 동영상 Id
fields: 'items(snippet(title))'
}, function(err, response) {
if (err) {
console.log('The API returned an error: ',err);
return;
}
var video =response.data.items;
if(video.length ==0){
console.log('검색된 동영상이 없습니다.');
} else {
console.log(JSON.stringify(response.data.items[0],null,4));
}
})
//3
service.videos.list({
key: 'AIzaSyBInggOtXxPFYIRee0Xs3vb5iZ9YE9_518',
part: 'snippet',
id: 'IfemyZEhfpY', // 동영상 Id
fields: 'items(snippet(title))'
}, function(err, response) {
if (err) {
console.log('The API returned an error: ',err);
return;
}
var video =response.data.items;
if(video.length ==0){
console.log('검색된 동영상이 없습니다.');
} else {
console.log(JSON.stringify(response.data.items[0],null,4));
}
})
//4
service.videos.list({
key: 'AIzaSyBInggOtXxPFYIRee0Xs3vb5iZ9YE9_518',
part: 'snippet',
id: '86suvlS1pGM', // 동영상 Id
fields: 'items(snippet(title))'
}, function(err, response) {
if (err) {
console.log('The API returned an error: ',err);
return;
}
var video =response.data.items;
if(video.length ==0){
console.log('검색된 동영상이 없습니다.');
} else {
console.log(JSON.stringify(response.data.items[0],null,4));
}
})
//5
service.videos.list({
key: 'AIzaSyBInggOtXxPFYIRee0Xs3vb5iZ9YE9_518',
part: 'snippet',
id: 'ztmOmJrTF5c', // 동영상 Id
fields: 'items(snippet(title))'
}, function(err, response) {
if (err) {
console.log('The API returned an error: ',err);
return;
}
var video =response.data.items;
if(video.length ==0){
console.log('검색된 동영상이 없습니다.');
} else {
console.log(JSON.stringify(response.data.items[0],null,4));
}
})
//6
service.videos.list({
key: 'AIzaSyBInggOtXxPFYIRee0Xs3vb5iZ9YE9_518',
part: 'snippet',
id: '6jAHysZVtwI', // 동영상 Id
fields: 'items(snippet(title))'
}, function(err, response) {
if (err) {
console.log('The API returned an error: ',err);
return;
}
var video =response.data.items;
if(video.length ==0){
console.log('검색된 동영상이 없습니다.');
} else {
console.log(JSON.stringify(response.data.items[0],null,4));
}
})
//7
service.videos.list({
key: 'AIzaSyBInggOtXxPFYIRee0Xs3vb5iZ9YE9_518',
part: 'snippet',
id: 'fFZ1__X-kKs', // 동영상 Id
fields: 'items(snippet(title))'
}, function(err, response) {
if (err) {
console.log('The API returned an error: ',err);
return;
}
var video =response.data.items;
if(video.length ==0){
console.log('검색된 동영상이 없습니다.');
} else {
console.log(JSON.stringify(response.data.items[0],null,4));
}
})
//8
service.videos.list({
key: 'AIzaSyBInggOtXxPFYIRee0Xs3vb5iZ9YE9_518',
part: 'snippet',
id: 'ei0k_1Uro-U', // 동영상 Id
fields: 'items(snippet(title))'
}, function(err, response) {
if (err) {
console.log('The API returned an error: ',err);
return;
}
var video =response.data.items;
if(video.length ==0){
console.log('검색된 동영상이 없습니다.');
} else {
console.log(JSON.stringify(response.data.items[0],null,4));
}
})
//9
service.videos.list({
key: 'AIzaSyBInggOtXxPFYIRee0Xs3vb5iZ9YE9_518',
part: 'snippet',
id: 'mCtVrf2x5BQ', // 동영상 Id
fields: 'items(snippet(title))'
}, function(err, response) {
if (err) {
console.log('The API returned an error: ',err);
return;
}
var video =response.data.items;
if(video.length ==0){
console.log('검색된 동영상이 없습니다.');
} else {
console.log(JSON.stringify(response.data.items[0],null,4));
}
})
//10
service.videos.list({
key: 'AIzaSyBInggOtXxPFYIRee0Xs3vb5iZ9YE9_518',
part: 'snippet',
id: 'FV003QMWhNM', // 동영상 Id
fields: 'items(snippet(title))'
}, function(err, response) {
if (err) {
console.log('The API returned an error: ',err);
return;
}
var video =response.data.items;
if(video.length ==0){
console.log('검색된 동영상이 없습니다.');
} else {
console.log(JSON.stringify(response.data.items[0],null,4));
}
})
var {google} =require('googleapis');
//1
var service = google.youtube('v3');
service.videos.list({
key: 'AIzaSyBInggOtXxPFYIRee0Xs3vb5iZ9YE9_518',
part: 'snippet',
id: 'p5iu1V30myk', // 동영상 Id
fields: 'items(snippet(title))'
}, function(err, response) {
if (err) {
console.log('The API returned an error: ',err);
return;
}
var video =response.data.items;
if(video.length ==0){
console.log('검색된 동영상이 없습니다.');
} else {
console.log(JSON.stringify(response.data.items[0],null,4));
}
})
//2
service.videos.list({
key: 'AIzaSyBInggOtXxPFYIRee0Xs3vb5iZ9YE9_518',
part: 'snippet',
id: 'i-SBnhaZSSU', // 동영상 Id
fields: 'items(snippet(title))'
}, function(err, response) {
if (err) {
console.log('The API returned an error: ',err);
return;
}
var video =response.data.items;
if(video.length ==0){
console.log('검색된 동영상이 없습니다.');
} else {
console.log(JSON.stringify(response.data.items[0],null,4));
}
})
//3
service.videos.list({
key: 'AIzaSyBInggOtXxPFYIRee0Xs3vb5iZ9YE9_518',
part: 'snippet',
id: 'Etfgb6A7hSI', // 동영상 Id
fields: 'items(snippet(title))'
}, function(err, response) {
if (err) {
console.log('The API returned an error: ',err);
return;
}
var video =response.data.items;
if(video.length ==0){
console.log('검색된 동영상이 없습니다.');
} else {
console.log(JSON.stringify(response.data.items[0],null,4));
}
})
//4
service.videos.list({
key: 'AIzaSyBInggOtXxPFYIRee0Xs3vb5iZ9YE9_518',
part: 'snippet',
id: 'IN2mml9xs_s', // 동영상 Id
fields: 'items(snippet(title))'
}, function(err, response) {
if (err) {
console.log('The API returned an error: ',err);
return;
}
var video =response.data.items;
if(video.length ==0){
console.log('검색된 동영상이 없습니다.');
} else {
console.log(JSON.stringify(response.data.items[0],null,4));
}
})
//5
service.videos.list({
key: 'AIzaSyBInggOtXxPFYIRee0Xs3vb5iZ9YE9_518',
part: 'snippet',
id: 'tp1uoFAfgHE', // 동영상 Id
fields: 'items(snippet(title))'
}, function(err, response) {
if (err) {
console.log('The API returned an error: ',err);
return;
}
var video =response.data.items;
if(video.length ==0){
console.log('검색된 동영상이 없습니다.');
} else {
console.log(JSON.stringify(response.data.items[0],null,4));
}
})
//6
service.videos.list({
key: 'AIzaSyBInggOtXxPFYIRee0Xs3vb5iZ9YE9_518',
part: 'snippet',
id: 'Qx22TnVVIfU', // 동영상 Id
fields: 'items(snippet(title))'
}, function(err, response) {
if (err) {
console.log('The API returned an error: ',err);
return;
}
var video =response.data.items;
if(video.length ==0){
console.log('검색된 동영상이 없습니다.');
} else {
console.log(JSON.stringify(response.data.items[0],null,4));
}
})
//7
service.videos.list({
key: 'AIzaSyBInggOtXxPFYIRee0Xs3vb5iZ9YE9_518',
part: 'snippet',
id: '3y1QIqR115A', // 동영상 Id
fields: 'items(snippet(title))'
}, function(err, response) {
if (err) {
console.log('The API returned an error: ',err);
return;
}
var video =response.data.items;
if(video.length ==0){
console.log('검색된 동영상이 없습니다.');
} else {
console.log(JSON.stringify(response.data.items[0],null,4));
}
})
//8
service.videos.list({
key: 'AIzaSyBInggOtXxPFYIRee0Xs3vb5iZ9YE9_518',
part: 'snippet',
id: 'VXBI1wt8XII', // 동영상 Id
fields: 'items(snippet(title))'
}, function(err, response) {
if (err) {
console.log('The API returned an error: ',err);
return;
}
var video =response.data.items;
if(video.length ==0){
console.log('검색된 동영상이 없습니다.');
} else {
console.log(JSON.stringify(response.data.items[0],null,4));
}
})
//9
service.videos.list({
key: 'AIzaSyBInggOtXxPFYIRee0Xs3vb5iZ9YE9_518',
part: 'snippet',
id: 'aWMBn2--E0Q', // 동영상 Id
fields: 'items(snippet(title))'
}, function(err, response) {
if (err) {
console.log('The API returned an error: ',err);
return;
}
var video =response.data.items;
if(video.length ==0){
console.log('검색된 동영상이 없습니다.');
} else {
console.log(JSON.stringify(response.data.items[0],null,4));
}
})
//10
service.videos.list({
key: 'AIzaSyBInggOtXxPFYIRee0Xs3vb5iZ9YE9_518',
part: 'snippet',
id: 'HyTbgBlnLCo', // 동영상 Id
fields: 'items(snippet(title))'
}, function(err, response) {
if (err) {
console.log('The API returned an error: ',err);
return;
}
var video =response.data.items;
if(video.length ==0){
console.log('검색된 동영상이 없습니다.');
} else {
console.log(JSON.stringify(response.data.items[0],null,4));
}
})
......@@ -3,7 +3,7 @@ var {google} =require('googleapis');
var service = google.youtube('v3');
service.videos.list({
key: 'AIzaSyBInggOtXxPFYIRee0Xs3vb5iZ9YE9_518',
part: 'snippet,statistics',
part: 'snippet',
id: 'p5iu1V30myk', // 동영상 Id
fields: 'items(snippet(title))'
}, function(err, response) {
......