Fix Google+

This commit is contained in:
calzoneman 2015-03-31 15:57:57 -05:00
parent 4d72ccb8a3
commit 5522628363
1 changed files with 9 additions and 5 deletions

View File

@ -665,13 +665,17 @@ var Getters = {
var title = $("media\\:title").text(); var title = $("media\\:title").text();
var videos = {}; var videos = {};
$('media\\:content[medium="video"]').each(function(index, element){ $('media\\:content[medium="video"]').each(function(index, element){
var url = $(this).attr("url") var url = $(this).attr("url");
var type = url.match(/itag=(\d\d)/) var match = url.match(/itag=(\d+)/)
if(type && type[1]){ if (!match) {
type = type[1] match = url.match(/googleusercontent.*=m(\d+)$/);
}
if (match && match[1]) {
var type = match[1];
videos[type] = { videos[type] = {
format: type, format: type,
link: url link: url
}; };
} }
}); });