SKincinerate / gotube

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

Youtube script #39

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem (site>keyword>video)?
1.search any video
2.click
3.wont load

What is the expected output? What do you see instead?
Black screen and the wifi led thing goes on and off a few times.
Timer stays at 0.00.00 So can someone give me a youtube script that actually 
work..

What version of the product are you using? On what operating system?
psp 2001

Please provide any additional information below.
-

Original issue reported on code.google.com by knarf.ja...@gmail.com on 25 Mar 2011 at 9:17

GoogleCodeExporter commented 8 years ago
erh ... maybe use the lastest from the updater ?! from iserv repository

Original comment by biscotte...@gmail.com on 25 Mar 2011 at 9:21

GoogleCodeExporter commented 8 years ago
Cant you just give a plain script here. =\

Original comment by knarf.ja...@gmail.com on 25 Mar 2011 at 9:28

GoogleCodeExporter commented 8 years ago
var YouTube = new Object();
YouTube.rev = 1;
YouTube.SearchDesc    = 
YouTube.Name      = "YouTube";
YouTube.Search  = function (keyword, page){
    var result = new Object();
    result.bypage    = 20;// modifiable
    result.start     = (page-1)*result.bypage+1;//&begin=250000
    c=GetContents('http://gdata.youtube.com/feeds/api/videos?q='+escape(keyword)+'&start-index='+result.start+'&max-results='+result.bypage+'&v=1');
    result.total     = ext("<openSearch:totalResults>");
    result.VideoInfo = new Array();
    while(p=c.indexOf("<entry>",p)+1){
        v = {attr:3};//neither IDA|npp find this string ...0=RD 1= 2=SRD 3=S
        v.id              = ext("<id>http://gdata.youtube.com/feeds/api/videos/","</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";//".flv" is hidden in the OSK
        v.URL             = 'YouTube.play("'+v.id+'")';
        result.VideoInfo.push(v);
    }
    result.end       = result.start-1+result.VideoInfo.length;
    return result;
}
YouTube.play    = function (id){
    c=GetContents("http://www.youtube.com/watch?v="+id);p=0;
    var tbl = unescape(ext('fmt_url_map=',';')).split(/,/);//list the available format in a array
    PSPTube.log(tbl+"\n");//debugging!
    var url = unescape(tbl[tbl.length-1]);//take the lastest entry in the table (lowest quality)
    PSPTube.log(url+"\n");//more debugging!
    return url.substring(url.indexOf("|")+1).replace(/\\/g,"");//format the url
}
SiteList.push(YouTube);

Original comment by biscotte...@gmail.com on 25 Mar 2011 at 9:34

GoogleCodeExporter commented 8 years ago
i just save this as youtube.js?

Original comment by knarf.ja...@gmail.com on 25 Mar 2011 at 9:44

GoogleCodeExporter commented 8 years ago
yes

Original comment by biscotte...@gmail.com on 25 Mar 2011 at 9:50

GoogleCodeExporter commented 8 years ago
Ok i added it to gotube but still after i click on a video i see the led 
blinking for a few times and then i see the memory stick led flashing and then 
nothing happends..

Original comment by knarf.ja...@gmail.com on 25 Mar 2011 at 10:08

GoogleCodeExporter commented 8 years ago
this the script is not mine :s

Original comment by biscotte...@gmail.com on 25 Mar 2011 at 10:14

GoogleCodeExporter commented 8 years ago
Script stopped working for some reason some days ago.
Attempting to fix now.

Original comment by ser...@safetymail.info on 26 Mar 2011 at 6:33

GoogleCodeExporter commented 8 years ago
Tried to fix won't work..

This is my script:

var YouTube = new Object();
YouTube.rev = 1;
YouTube.SearchDesc    = 
YouTube.Name      = "YouTube";
YouTube.Search  = function (keyword, page){
    var result = new Object();
    result.bypage    = 20;// modifiable
    result.start     = (page-1)*result.bypage+1;//&begin=250000
    c=GetContents('http://gdata.youtube.com/feeds/api/videos?q='+escape(keyword)+'&start-index='+result.start+'&max-results='+result.bypage+'&v=1');
    result.total     = ext("<openSearch:totalResults>");
    result.VideoInfo = new Array();
    while(p=c.indexOf("<entry>",p)+1){
        v = {attr:3};//neither IDA|npp find this string ...0=RD 1= 2=SRD 3=S
        v.id              = ext("<id>http://gdata.youtube.com/feeds/api/videos/","</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";//".flv" is hidden in the OSK
        v.URL             = 'YouTube.play("'+v.id+'")';
        result.VideoInfo.push(v);
    }
    result.end       = result.start-1+result.VideoInfo.length;
    return result;
}
YouTube.play    = function (id){
    c=GetContents("http://www.youtube.com/watch?v="+id);p=0;
    var tbl = unescape(ext('fmt_url_map=',';')).split(/,/);//list the available format in a array
    var url = unescape(tbl[tbl.length-1]);//take the lastest entry in the table (lowest quality)
    PSPTube.log(url);
    return url.ext("|", "\u");

}
SiteList.push(YouTube);

This is my log output

5|http://v20.lscache1.c.youtube.com/videoplayback?sparams=id,expire,ip,ipbits,it
ag,algorithm,burst,factor&fexp=908907&algorithm=throttle-factor&itag=5&ipbits=8&
burst=40&sver=3&signature=8ADDC3AC3350652049969C42036B55E5FFD8FE2E.28171D09E0C0C
237C7762BCB6BAE7611F154D04F&expire=1301191200&key=yt1&ip=85.0.0.0&factor=1.25&id
=69e99780ffb6c728\u0026ampext("|","\u") reachs the limite (from) p=5024

This is valid url:
http://v20.lscache1.c.youtube.com/videoplayback?sparams=id,expire,ip,ipbits,itag
,algorithm,burst,factor&fexp=908907&algorithm=throttle-factor&itag=5&ipbits=8&bu
rst=40&sver=3&signature=8ADDC3AC3350652049969C42036B55E5FFD8FE2E.28171D09E0C0C23
7C7762BCB6BAE7611F154D04F&expire=1301191200&key=yt1&ip=85.0.0.0&factor=1.25&id=6
9e99780ffb6c728

So it should filter it out with this

return url.ext("|", "\u");

Gives this error

ext("|","\u") reachs the limite (from) p=5024

I don't understand why it's giving this error AGAIN had problems with this @ 
more script but should be working -.-

Original comment by ser...@safetymail.info on 26 Mar 2011 at 7:44

GoogleCodeExporter commented 8 years ago
hum, maybe try "\\u" insteate of "\u"  (or simplier "\\")

Original comment by biscotte...@gmail.com on 26 Mar 2011 at 8:44

GoogleCodeExporter commented 8 years ago
Both gave again the same error
I give up.

Original comment by ser...@safetymail.info on 26 Mar 2011 at 9:32

GoogleCodeExporter commented 8 years ago
its great to see gotube going forward thank you all for your hard work

Original comment by peterpsp...@hotmail.com on 4 Apr 2011 at 2:09