diff --git a/modules/youtube/youtube.js b/modules/youtube/youtube.js index 4943c5b..5fc7577 100644 --- a/modules/youtube/youtube.js +++ b/modules/youtube/youtube.js @@ -28,7 +28,7 @@ var youtube = function(dbot) { this.internalAPI = { 'formatLink': function(v) { - var time = v.contentDetails.duration.match(/^PT(\d+)M(\d+)S$/); + var time = v.contentDetails.duration.match(/^PT(\d+)?M?(\d+)S$/); if(time[2]) { var seconds =((time[2]%60 < 10) ? "0"+time[2]%60 : time[2]%60), minutes = time[1];