Giter VIP home page Giter VIP logo

Comments (12)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 11, 2024
erh ... maybe use the lastest from the updater ?! from iserv repository

Original comment by [email protected] on 25 Mar 2011 at 9:21

from gotube.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 11, 2024
Cant you just give a plain script here. =\

Original comment by [email protected] on 25 Mar 2011 at 9:28

from gotube.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 11, 2024
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 [email protected] on 25 Mar 2011 at 9:34

from gotube.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 11, 2024
i just save this as youtube.js?

Original comment by [email protected] on 25 Mar 2011 at 9:44

from gotube.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 11, 2024
yes

Original comment by [email protected] on 25 Mar 2011 at 9:50

from gotube.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 11, 2024
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 [email protected] on 25 Mar 2011 at 10:08

from gotube.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 11, 2024
this the script is not mine :s

Original comment by [email protected] on 25 Mar 2011 at 10:14

from gotube.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 11, 2024
Script stopped working for some reason some days ago.
Attempting to fix now.

Original comment by [email protected] on 26 Mar 2011 at 6:33

from gotube.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 11, 2024
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 [email protected] on 26 Mar 2011 at 7:44

from gotube.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 11, 2024
hum, maybe try "\\u" insteate of "\u"  (or simplier "\\")

Original comment by [email protected] on 26 Mar 2011 at 8:44

from gotube.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 11, 2024
Both gave again the same error
I give up.

Original comment by [email protected] on 26 Mar 2011 at 9:32

from gotube.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 11, 2024
its great to see gotube going forward thank you all for your hard work

Original comment by [email protected] on 4 Apr 2011 at 2:09

from gotube.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.