homicidalmaggot / gotube

Automatically exported from code.google.com/p/gotube
0 stars 0 forks source link

!Experimental! : try this script i made, tell me if it works or not! #136

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
umm so i can't test on my psp right now and i made a script for youtube, i 
didn't tested it yet. So if you wanna try if it works, please do.

var YouTube = new Object();
YouTube.rev = 3;
YouTube.SearchDesc = "YouTube by NT";
YouTube.Name = "YouTube";
YouTube.Search = function(keyword, page) {
  var result = new Object();
  result.bypage = 20;
  result.start = (page - 1) * result.bypage + 1;
  var sortBy = "relevance";
  var catSpecified = false;

  if (keyword.charAt(0) == '$')
  {
    var keywordBu = keyword;
    var kpos = keyword.indexOf(" ");
    var category = keyword.substring(1, kpos);
    keyword = keyword.substring(kpos + 1);
    catSpecified = true;
  }

  if (keyword.charAt(0) == '@')
  {
    sortBy = "published";
  }

  if (catSpecified == false)
  {
    c = GetContents('https://www.googleapis.com/youtube/v3/search?key=AIzaSyDgb6JkSV3RKhacsU1CquHIaVg_Lzj21fs&q=' + escape(keyword) + '&start-index=' + result.start + '&max-results=' + result.bypage + '&orderby=' + sortBy + '&racy=include&v=3');
  }
  else
  {
    c = GetContents('https://www.googleapis.com/youtube/v3/search?key=AIzaSyDgb6JkSV3RKhacsU1CquHIaVg_Lzj21fs&q=' + escape(keyword) + '&start-index=' + result.start + '&max-results=' + result.bypage + '&orderby=' + sortBy + '&racy=include&category=' + category + '&v=3');
  }

  result.total = ext("<openSearch:totalResults>");
  result.VideoInfo = new Array();
  v = {attr: 2};
  v.id = 0;
  v.Title = "YouTube Search Help";
  v.Description = "@query = search by upload date\n$category query = search in a category";
  v.URL = '';
  p = 0;
  result.VideoInfo.push(v);
  while (p = c.indexOf("<entry", p) + 1) {
    v = {attr: 2};//neither IDA|npp find this string ...0=RD 1= 2=SRD 3=S
    v.id = ext("<id>https://www.googleapis.com/youtube/v3/videos?key=AIzaSyDgb6JkSV3RKhacsU1CquHIaVg_Lzj21fs&part=snippet,contentDetails,statistics,status&id=", "</id>");
    v.Title = ext("<title type='text'>");
    v.Description = ext("content type='text'>") + '\nUploader:' + ext("<name>");
    v.CommentCount = ext("countHint='") * 1;
    v.Tags = ext("keywords>").replace(/,/g, "");
    v.LengthSeconds = ext("ds='") * 1;
    v.RatingAvg = ext("average='") * 1;
    v.RatingCount = ext("numRaters='") * 1;
    v.MylistCount = ext("favoriteCount='") * 1;
    v.ViewCount = ext("viewCount='") * 1;
    v.ThumbnailURL = 'http://i.ytimg.com/vi/' + v.id + '/default.jpg';
    v.SaveFilename = v.id + ".flv";
    v.URL = 'YouTube.play("' + v.id + '")';
    result.VideoInfo.push(v);
  }
  result.end = result.start - 1 + result.VideoInfo.length;
  return result;
}

YouTube.play = function(id) {
  var pos;
  c = GetContents("https://www.googleapis.com/youtube/v3/videos?key=AIzaSyDgb6JkSV3RKhacsU1CquHIaVg_Lzj21fs&id=" + id);
  //PSPTube.log("\n" + c + "\n");
  pos = c.indexOf("url_encoded_fmt_stream_map");
  if (pos == -1) {
    alert("Can not be played");
    return "";
  }
  c = ext('url_encoded_fmt_stream_map', "&");
  p = 0;
  c = unescape(c);
  var url = c.match(/url=(.+?itag%3D5.*?)[&,]/);
  //PSPTube.log("\n" + url + "\n");
  url = url[1];
  //PSPTube.log("\n" + url + "\n");
  pos = url.lastIndexOf("http");
  url = url.substr(pos);
  url = unescape(url);
  //PSPTube.log("\n" + url + "\n");
  return url;
}
SiteList.push(YouTube);

Ps. im still learning the api 3

keep yourself updated on Nt's page if they made a new script:
http://nozomi.2ch.net/test/read.cgi/gameurawaza/

Original issue reported on code.google.com by jcrv1...@gmail.com on 22 May 2015 at 1:16

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Tested it on my 6.60 PRO-C. I tried it with Gotube 1.2, and also with the High 
Memory Mod; but in both versions, after searching for any video and pressing 
start, my PSP crashed :(

Original comment by jlj...@gmail.com on 22 May 2015 at 11:35

GoogleCodeExporter commented 8 years ago
Same for me on 6.60 PRO NIGHTLY -- crashes upon search.

Original comment by tayub...@gmail.com on 24 May 2015 at 2:59

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
please test 2 scripts

var YouTube = new Object();
YouTube.rev = 4;
YouTube.SearchDesc = "YouTube by NT and JCRV";
YouTube.Name = "YouTube";
YouTube.Search = function(keyword, page) {
  var result = new Object();
  result.bypage = 20;
  result.start = (page - 1) * result.bypage + 1;
  var sortBy = "relevance";
  var catSpecified = false;

  if (keyword.charAt(0) == '$')
  {
    var keywordBu = keyword;
    var kpos = keyword.indexOf(" ");
    var category = keyword.substring(1, kpos);
    keyword = keyword.substring(kpos + 1);
    catSpecified = true;
  }

  if (keyword.charAt(0) == '@')
  {
    sortBy = "published";
  }

  if (catSpecified == false)
  {
    c = GetContents('https://www.googleapis.com/youtube/v3/search?q=' + escape(keyword) + '&pageToken=' + result.start + '&maxResults=' + result.bypage + '&order=' + sortBy + '&racy=include&part=snippet&v=3');
  }
  else
  {
    c = GetContents('https://www.googleapis.com/youtube/v3/search?q=' + escape(keyword) + '&pageToken=' + result.start + '&maxResults=' + result.bypage + '&order=' + sortBy + '&racy=include&videoCategoryId=' + category + '&v=3');
  }

  result.total = ext("<openSearch:totalResults>");
  result.VideoInfo = new Array();
  v = {attr: 2};
  v.id = 0;
  v.Title = "YouTube Search Help";
  v.Description = "@query = search by upload date\n$category query = search in a category";
  v.URL = '';
  p = 0;
  result.VideoInfo.push(v);
  while (p = c.indexOf("<entry", p) + 1) {
    v = {attr: 2};//neither IDA|npp find this string ...0=RD 1= 2=SRD 3=S
    v.id = ext("https://www.googleapis.com/youtube/v3/videos?id=", "&key=AIzaSyD6Bdt4uJP0ewhNtgagGbSszfrYqcx6ydU&part=snippet,contentDetails,statistics,status");
    v.Title = ext("<title type='text'>");
    v.Description = ext("content type='text'>") + '\nUploader:' + ext("<name>");
    v.CommentCount = ext("countHint='") * 1;
    v.Tags = ext("keywords>").replace(/,/g, "");
    v.LengthSeconds = ext("ds='") * 1;
    v.RatingAvg = ext("average='") * 1;
    v.RatingCount = ext("numRaters='") * 1;
    v.MylistCount = ext("favoriteCount='") * 1;
    v.ViewCount = ext("viewCount='") * 1;
    v.ThumbnailURL = 'http://i.ytimg.com/vi/' + v.id + '/default.jpg';
    v.SaveFilename = v.id + ".flv";
    v.URL = 'YouTube.play("' + v.id + '")';
    result.VideoInfo.push(v);
  }
  result.end = result.start - 1 + result.VideoInfo.length;
  return result;
}

YouTube.play = function(id) {
  var pos;
  c = GetContents("http://www.youtube.com/embed/" + id);
  //PSPTube.log("\n" + c + "\n");
  pos = c.indexOf("url_encoded_fmt_stream_map");
  if (pos == -1) {
    alert("Can not be played");
    return "";
  }
  c = ext('url_encoded_fmt_stream_map', "&");
  p = 0;
  c = unescape(c);
  var url = c.match(/url=(.+?itag%3D5.*?)[&,]/);
  //PSPTube.log("\n" + url + "\n");
  url = url[1];
  //PSPTube.log("\n" + url + "\n");
  pos = url.lastIndexOf("http");
  url = url.substr(pos);
  url = unescape(url);
  //PSPTube.log("\n" + url + "\n");
  return url;
}
SiteList.push(YouTube);

2nd

var YouTube = new Object();
YouTube.rev = 4;
YouTube.SearchDesc = "YouTube by NT and JCRV";
YouTube.Name = "YouTube";
YouTube.Search = function(keyword, page) {
  var result = new Object();
  result.bypage = 20;
  result.start = (page - 1) * result.bypage + 1;
  var sortBy = "relevance";
  var catSpecified = false;

  if (keyword.charAt(0) == '$')
  {
    var keywordBu = keyword;
    var kpos = keyword.indexOf(" ");
    var category = keyword.substring(1, kpos);
    keyword = keyword.substring(kpos + 1);
    catSpecified = true;
  }

  if (keyword.charAt(0) == '@')
  {
    sortBy = "published";
  }

  if (catSpecified == false)
  {
    c = GetContents('https://www.googleapis.com/youtube/v3/search?q=' + escape(keyword) + '&pageToken=' + result.start + '&maxResults=' + result.bypage + '&order=' + sortBy + '&racy=include&v=3');
  }
  else
  {
    c = GetContents('https://www.googleapis.com/youtube/v3/search?q=' + escape(keyword) + '&pageToken=' + result.start + '&maxResults=' + result.bypage + '&order=' + sortBy + '&racy=include&videoCategoryId=' + category + '&v=3');
  }

  result.total = ext("<openSearch:totalResults>");
  result.VideoInfo = new Array();
  v = {attr: 2};
  v.id = 0;
  v.Title = "YouTube Search Help";
  v.Description = "@query = search by upload date\n$category query = search in a category";
  v.URL = '';
  p = 0;
  result.VideoInfo.push(v);
  while (p = c.indexOf("<entry", p) + 1) {
    v = {attr: 2};//neither IDA|npp find this string ...0=RD 1= 2=SRD 3=S
    v.id = ext("https://www.googleapis.com/youtube/v3/videos?id=", "&key=AIzaSyD6Bdt4uJP0ewhNtgagGbSszfrYqcx6ydU&part=snippet,contentDetails,statistics,status");
    v.Title = ext("<title type='text'>");
    v.Description = ext("content type='text'>") + '\nUploader:' + ext("<name>");
    v.CommentCount = ext("countHint='") * 1;
    v.Tags = ext("keywords>").replace(/,/g, "");
    v.LengthSeconds = ext("ds='") * 1;
    v.RatingAvg = ext("average='") * 1;
    v.RatingCount = ext("numRaters='") * 1;
    v.MylistCount = ext("favoriteCount='") * 1;
    v.ViewCount = ext("viewCount='") * 1;
    v.ThumbnailURL = 'http://i.ytimg.com/vi/' + v.id + '/default.jpg';
    v.SaveFilename = v.id + ".flv";
    v.URL = 'YouTube.play("' + v.id + '")';
    result.VideoInfo.push(v);
  }
  result.end = result.start - 1 + result.VideoInfo.length;
  return result;
}

YouTube.play = function(id) {
  var pos;
  c = GetContents("http://www.youtube.com/embed/" + id);
  //PSPTube.log("\n" + c + "\n");
  pos = c.indexOf("url_encoded_fmt_stream_map");
  if (pos == -1) {
    alert("Can not be played");
    return "";
  }
  c = ext('url_encoded_fmt_stream_map', "&");
  p = 0;
  c = unescape(c);
  var url = c.match(/url=(.+?itag%3D5.*?)[&,]/);
  //PSPTube.log("\n" + url + "\n");
  url = url[1];
  //PSPTube.log("\n" + url + "\n");
  pos = url.lastIndexOf("http");
  url = url.substr(pos);
  url = unescape(url);
  //PSPTube.log("\n" + url + "\n");
  return url;
}
SiteList.push(YouTube);

Original comment by jcrv1...@gmail.com on 24 May 2015 at 10:13

GoogleCodeExporter commented 8 years ago
Both crash while searching.

Original comment by tayub...@gmail.com on 24 May 2015 at 4:56

GoogleCodeExporter commented 8 years ago
Same here

Original comment by jlj...@gmail.com on 24 May 2015 at 9:34

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
var YouTube = new Object();
YouTube.rev = 4;
YouTube.SearchDesc = "YouTube by NT and JCRV";
YouTube.Name = "YouTube";
YouTube.Search = function(keyword, page) {
  var result = new Object();
  result.bypage = 20;
  result.start = (page - 1) * result.bypage + 1;
  var sortBy = "relevance";
  var catSpecified = false;

  if (keyword.charAt(0) == '$')
  {
    var keywordBu = keyword;
    var kpos = keyword.indexOf(" ");
    var category = keyword.substring(1, kpos);
    keyword = keyword.substring(kpos + 1);
    catSpecified = true;
  }

  if (keyword.charAt(0) == '@')
  {
    sortBy = "published";
  }

  if (catSpecified == false)
  {
    c = GetContents('https://www.googleapis.com/youtube/v3/search?q=' + escape(keyword) + '&maxResults=' + result.bypage + '&order=' + sortBy + '&part=snippet&key=AIzaSyD6Bdt4uJP0ewhNtgagGbSszfrYqcx6ydU');
  }
  else
  {
    c = GetContents('https://www.googleapis.com/youtube/v3/search?q=' + escape(keyword) + '&maxResults=' + result.bypage + '&order=' + sortBy + '&part=snippet&key=AIzaSyD6Bdt4uJP0ewhNtgagGbSszfrYqcx6ydU');
  }

  result.total = ext("<openSearch:totalResults>");
  result.VideoInfo = new Array();
  v = {attr: 2};
  v.id = 0;
  v.Title = "YouTube Search Help";
  v.Description = "@query = search by upload date\n$category query = search in a category";
  v.URL = '';
  p = 0;
  result.VideoInfo.push(v);
  while (p = c.indexOf("<entry", p) + 1) {
    v = {attr: 2};//neither IDA|npp find this string ...0=RD 1= 2=SRD 3=S
    v.id = ext("https://www.googleapis.com/youtube/v3/videos?id=", "&key=AIzaSyD6Bdt4uJP0ewhNtgagGbSszfrYqcx6ydU&part=snippet,contentDetails,statistics,status&forMine=true&type=video");
    v.Title = ext("<title type='text'>"); //below still need's adjustment's
    v.Description = ext("content type='text'>") + '\nUploader:' + ext("<name>");
    v.CommentCount = ext("statistics.commentCount='") * 1;
    v.Tags = ext("keywords>").replace(/,/g, "");
    v.LengthSeconds = ext("contentDetails.duration='") * 1;
    v.RatingAvg = ext("contentDetails.contentRating='") * 1;
    v.RatingCount = ext("statistics.likeCount='") * 1;
    v.MylistCount = ext("statistics.favoriteCount='") * 1;
    v.ViewCount = ext("statistics.viewCount='") * 1;
    v.ThumbnailURL = 'http://i.ytimg.com/vi/' + v.id + '/default.jpg';
    v.SaveFilename = v.id + ".flv";
    v.URL = 'YouTube.play("' + v.id + '")';
    result.VideoInfo.push(v);
  }
  result.end = result.start - 1 + result.VideoInfo.length;
  return result;
}

YouTube.play = function(id) {
  var pos;
  c = GetContents("http://www.youtube.com/get_video_info?html5=1&video_id=" + id);
  //PSPTube.log("\n" + c + "\n");
  pos = c.indexOf("url_encoded_fmt_stream_map");
  if (pos == -1) {
    alert("Can not be played");
    return "";
  }
  c = ext('url_encoded_fmt_stream_map', "&");
  p = 0;
  c = unescape(c);
  var url = c.match(/url=(.+?itag%3D5.*?)[&,]/);
  //PSPTube.log("\n" + url + "\n");
  url = url[1];
  //PSPTube.log("\n" + url + "\n");
  pos = url.lastIndexOf("http");
  url = url.substr(pos);
  url = unescape(url);
  //PSPTube.log("\n" + url + "\n");
  return url;
}
SiteList.push(YouTube);

Original comment by jcrv1...@gmail.com on 25 May 2015 at 5:26

GoogleCodeExporter commented 8 years ago
It freezes after search.

Original comment by androw...@gmail.com on 27 May 2015 at 12:04

GoogleCodeExporter commented 8 years ago
yea but im not giving up up. it's just really difficult.
still need to fix below:
v.Title = ext("<title type='text'>"); //below still need's adjustment's
    v.Description = ext("content type='text'>") + '\nUploader:' + ext("<name>");
    v.CommentCount = ext("statistics.commentCount='") * 1;
    v.Tags = ext("keywords>").replace(/,/g, "");
    v.LengthSeconds = ext("contentDetails.duration='") * 1;
    v.RatingAvg = ext("contentDetails.contentRating='") * 1;
    v.RatingCount = ext("statistics.likeCount='") * 1;
    v.MylistCount = ext("statistics.favoriteCount='") * 1;
    v.ViewCount = ext("statistics.viewCount='") * 1;
    v.ThumbnailURL = 'http://i.ytimg.com/vi/' + v.id + '/default.jpg';
    v.SaveFilename = v.id + ".flv";
    v.URL = 'YouTube.play("' + v.id + '")';
    result.VideoInfo.push(v);

Original comment by jcrv1...@gmail.com on 27 May 2015 at 2:20

GoogleCodeExporter commented 8 years ago
var YouTube = new Object();
YouTube.rev = 4;
YouTube.SearchDesc = "YouTube by NT and JCRV";
YouTube.Name = "YouTube";
YouTube.Search = function(keyword, page) {
  var result = new Object();
  result.bypage = 20;
  result.start = (page - 1) * result.bypage + 1;
  var sortBy = "relevance";
  var catSpecified = false;

  if (keyword.charAt(0) == '$')
  {
    var keywordBu = keyword;
    var kpos = keyword.indexOf(" ");
    var category = keyword.substring(1, kpos);
    keyword = keyword.substring(kpos + 1);
    catSpecified = true;
  }

  if (keyword.charAt(0) == '@')
  {
    sortBy = "published";
  }

  if (catSpecified == false)
  {
    c = GetContents('https://www.googleapis.com/youtube/v3/search?q=' + escape(keyword) + '&maxResults=' + result.bypage + '&order=' + sortBy + '&part=snippet&key=AIzaSyD6Bdt4uJP0ewhNtgagGbSszfrYqcx6ydU');
  }
  else
  {
    c = GetContents('https://www.googleapis.com/youtube/v3/search?q=' + escape(keyword) + '&maxResults=' + result.bypage + '&order=' + sortBy + '&part=snippet&key=AIzaSyD6Bdt4uJP0ewhNtgagGbSszfrYqcx6ydU');
  }

  result.total = ext("<openSearch:totalResults>");
  result.VideoInfo = new Array();
  v = {attr: 2};
  v.id = 0;
  v.Title = "YouTube Search Help";
  v.Description = "@query = search by upload date\n$category query = search in a category";
  v.URL = '';
  p = 0;
  result.VideoInfo.push(v);
  while (p = c.indexOf("<entry", p) + 1) {
    v = {attr: 2};//neither IDA|npp find this string ...0=RD 1= 2=SRD 3=S
    v.id = ext("https://www.googleapis.com/youtube/v3/videos?id=", "&key=AIzaSyD6Bdt4uJP0ewhNtgagGbSszfrYqcx6ydU&part=snippet,contentDetails,statistics,status&forMine=true&type=video");
    v.Title = ext(""title": "'"") * 1;
    v.Description = ext(""description": "'"">")+'\nUploader:'+ext("<name>")") * 1;
    v.CommentCount = ext(""commentCount": "'"") * 1;
    v.Tags = ext(""tags[']"").replace(/,/g, "");
    v.LengthSeconds = ext(""duration": "'"");
    v.RatingAvg = ext(""dislikeCount": "'"") * 1;
    v.RatingCount = ext("likeCount": "'"") * 1;
    v.MylistCount = ext(""favoriteCount": "'"") * 1;
    v.ViewCount = ext(""viewCount": "'"") * 1;
    v.ThumbnailURL = ""url": "'http://i.ytimg.com/vi/' + v.id + '/default.jpg'"";
    v.SaveFilename = v.id + ".flv";
    v.URL = 'YouTube.play("' + v.id + '")';
    result.VideoInfo.push(v);
  }
  result.end = result.start - 1 + result.VideoInfo.length;
  return result;
}

YouTube.play = function(id) {
  var pos;
  c = GetContents("http://www.youtube.com/get_video_info?html5=1&video_id=" + id);
  //PSPTube.log("\n" + c + "\n");
  pos = c.indexOf("url_encoded_fmt_stream_map");
  if (pos == -1) {
    alert("Can not be played");
    return "";
  }
  c = ext('url_encoded_fmt_stream_map', "&");
  p = 0;
  c = unescape(c);
  var url = c.match(/url=(.+?itag%3D5.*?)[&,]/);
  //PSPTube.log("\n" + url + "\n");
  url = url[1];
  //PSPTube.log("\n" + url + "\n");
  pos = url.lastIndexOf("http");
  url = url.substr(pos);
  url = unescape(url);
  //PSPTube.log("\n" + url + "\n");
  return url;
}
SiteList.push(YouTube);

Original comment by jcrv1...@gmail.com on 28 May 2015 at 4:28

GoogleCodeExporter commented 8 years ago
js load error

Original comment by genta.yu...@gmail.com on 30 May 2015 at 3:25

GoogleCodeExporter commented 8 years ago
youtube dropped support for XML instead we use JSON. sorry for no new script 
posts yet.

Original comment by jcrv1...@gmail.com on 2 Jun 2015 at 6:11

GoogleCodeExporter commented 8 years ago
.js file for testings please?

Original comment by mega...@gmail.com on 5 Jun 2015 at 11:34

GoogleCodeExporter commented 8 years ago
var YouTube = new Object();
YouTube.rev = 4;
YouTube.SearchDesc = "YouTube by NT and JCRV";
YouTube.Name = "YouTube";
YouTube.Search = function(keyword, page) {
  var result = new Object();
  result.bypage = 20;
  result.start = (page - 1) * result.bypage + 1;
  var sortBy = "relevance";
  var catSpecified = false;

  if (keyword.charAt(0) == '$')
  {
    var keywordBu = keyword;
    var kpos = keyword.indexOf(" ");
    var category = keyword.substring(1, kpos);
    keyword = keyword.substring(kpos + 1);
    catSpecified = true;
  }

  if (keyword.charAt(0) == '@')
  {
    sortBy = "published";
  }

  if (catSpecified == false)
  {
    c = GetContents('https://www.googleapis.com/youtube/v3/search?q=' + escape

(keyword)'/' + page + '&maxResults=' + result.bypage + '&order=' + sortBy + 
'&part=snippet&key=AIzaSyD6Bdt4uJP0ewhNtgagGbSszfrYqcx6ydU');
  }
  else
  {
    c = GetContents('https://www.googleapis.com/youtube/v3/search?q=' + escape

(keyword)'/' + page + '&maxResults=' + result.bypage + '&order=' + sortBy + 
'&part=snippet&key=AIzaSyD6Bdt4uJP0ewhNtgagGbSszfrYqcx6ydU');
  }

  result.total = ext("<openSearch:totalResults>");
  result.VideoInfo = new Array();
  v = {attr: 2};
  v.id = 0;
  v.Title = "YouTube Search Help";
  v.Description = "@query = search by upload date\n$category query = search in a 

category";
  v.URL = '';
  p = 0;
  result.VideoInfo.push(v);
  while (p = c.indexOf("{ "snippet": {", p) + 1) {
    v = {attr: 2};//neither IDA|npp find this string ...0=RD 1= 2=SRD 3=S
    v.id = ext(""id" :", "");
    v.Title = ext(""title": '");
    v.Description = ext(""description": ' }") + '\nUploader:');
    v.LengthSeconds = ext(" "contentDetails": { "duration": '");
    v.CommentCount = ext("} "statistics": { "commentCount": '") * 1;
    v.MylistCount = ext(""favoriteCount": '") * 1;
    v.ViewCount = ext(""viewCount": '") * 1;
    v.ThumbnailURL = 'http://i.ytimg.com/vi/' + v.id + '/default.jpg';
    v.SaveFilename = v.id + ".flv";
    v.URL = 'YouTube.play("' + v.id + '")';
    result.VideoInfo.push(v);
  }
  result.end = result.start - 1 + result.VideoInfo.length;
  return result;
}

YouTube.play = function(id) {
  var pos;
  c = GetContents("http://www.youtube.com/get_video_info?html5=1&video_id=" + id);
  //PSPTube.log("\n" + c + "\n");
  pos = c.indexOf("url_encoded_fmt_stream_map");
  if (pos == -1) {
    alert("Can not be played");
    return "";
  }
  c = ext('url_encoded_fmt_stream_map', "&");
  p = 0;
  c = unescape(c);
  var url = c.match(/url=(.+?itag%3D5.*?)[&,]/);
  //PSPTube.log("\n" + url + "\n");
  url = url[1];
  //PSPTube.log("\n" + url + "\n");
  pos = url.lastIndexOf("http");
  url = url.substr(pos);
  url = unescape(url);
  //PSPTube.log("\n" + url + "\n");
  return url;
}
SiteList.push(YouTube);

Original comment by jcrv1...@gmail.com on 7 Jun 2015 at 7:48

GoogleCodeExporter commented 8 years ago
i cant try it out letting you guys do it thnks in advance

Original comment by jcrv1...@gmail.com on 7 Jun 2015 at 7:49

GoogleCodeExporter commented 8 years ago
It was executed. js load error has occurred.

Original comment by genta.yu...@gmail.com on 12 Jun 2015 at 3:09