From 552262836382814b87d65b86b012bfbbaa14e8e5 Mon Sep 17 00:00:00 2001 From: calzoneman Date: Tue, 31 Mar 2015 15:57:57 -0500 Subject: [PATCH] Fix Google+ --- lib/get-info.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/get-info.js b/lib/get-info.js index bd017b8f..bdf592d4 100644 --- a/lib/get-info.js +++ b/lib/get-info.js @@ -665,13 +665,17 @@ var Getters = { var title = $("media\\:title").text(); var videos = {}; $('media\\:content[medium="video"]').each(function(index, element){ - var url = $(this).attr("url") - var type = url.match(/itag=(\d\d)/) - if(type && type[1]){ - type = type[1] + var url = $(this).attr("url"); + var match = url.match(/itag=(\d+)/) + if (!match) { + match = url.match(/googleusercontent.*=m(\d+)$/); + } + + if (match && match[1]) { + var type = match[1]; videos[type] = { format: type, - link: url + link: url }; } });