diff --git a/modules/youtube/youtube.js b/modules/youtube/youtube.js index f0cf892..868b1d4 100644 --- a/modules/youtube/youtube.js +++ b/modules/youtube/youtube.js @@ -21,7 +21,8 @@ var youtube = function(dbot) { }), 'json': true }, function(error, response, body) { - if(_.isObject(body) && _.has(body, 'feed') && _.has(body.feed, 'entry')) { + if(_.isObject(body) && _.has(body, 'feed') && _.has(body.feed, + 'entry') && _.has(body.feed.entry[0], 'yt$statistics')) { var v = body.feed.entry[0]; event.reply(dbot.t('yt_video', { 'title': v.title['$t'],