yne / gotube

YouTube player for the PlayStation Portable
0 stars 1 forks source link

xxxstash actualice plugin help #59

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem (site>keyword>video)?
1.script not work to download the mp4
2.
3.

What is the expected output? What do you see instead?
psp can download mp4 from site.

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

psp 1000-last cfw

Please provide any additional information below.

Hello! I m new in javascript.I try update old scripts abandoned that not work.

Now xhamster works:

var XHamster = new Object();
XHamster.rev        = 4;
XHamster.SearchDesc = 
XHamster.Name       = "XHamster";
XHamster.Search     = function (keyword, page){
var result = new Object();
result.bypage    = 28;
result.start     = (page-1)*result.bypage+1;
c=GetContents('http://xhamster.com/search.php?q='+escape(keyword)+'&page='+page)
;
result.total     = -1;
result.VideoInfo = new Array();
while(p=c.indexOf('<a href="/',p)+1){
video = new Object();
video.attr = 3;
video.href = ext('a href="');
video.ThumbnailURL = ext("img src='"); 
video.Title = ext('alt="', '"');
video.id = ext('id="');
//video.Description  = ext('<u>','</u>');
video.LengthSeconds= ext('Runtime: ','m')*60+ext('m','s')*1;
video.ViewCount    = ext('Views: ', '</div>')*1;
video.SaveFilename  = video.Title+'.flv';
video.URL             = 'XHamster.play("'+video.href+'")';
result.VideoInfo.push(video);
}
result.end       = result.start-1+result.VideoInfo.length;
return result;
}
XHamster.play = function (id){
c=GetContents("http://www.xhamster.com/"+id);p=0;
return "http://www.xhamster.com/flv2/"+ext("'file': '","'");
}
SiteList.push(XHamster);
-------------------------
I try update xxxstash crevette plugin,but I lost in the last part.To capture de 
url file.

var xxxStash = new Object();
xxxStash.rev           =  2;
xxxStash.SearchDesc    = 
xxxStash.Name          = "xxxStash";
xxxStash.Search        = function (keyword, page){
 var result = new Object();
 result.bypage    = 20;// fixed
 result.start     = (page-1)*result.bypage+1;
  c=GetContents('http://xxxstash.com/rss/videos/new/?start='+page+'&tags='+escape(keyword));
 result.total     = -1;
 result.VideoInfo = new Array();
 while(p=c.indexOf('<div class="videoThumb"',p)+1){
  video = new Object();
  video.attr          = 3;
  video.Title         = ext('/">','</a>');
  video.id            = ext('id="dAlt_','"');
  video.ThumbnailURL  = ext('src="','"');
  video.LengthSeconds = ext('<div class="duration">',':')*60+ext(':','<')*1;
  video.Description   = 'views:'+ext('"views">','<')+'uploader:'+ext('class="user"><a href="/member/','"');
  video.SaveFilename  = video.Title+".flv"

 //video.URL          = 'unescape(GetContents("http://xxxstash.com/videoCongig.JSCode.php?pg=video_'+video.id+'_no_0").match("<file>(.+?)<")[1]';
 video.url = 'xxxStash.play("'+video.id+'")';
 result.VideoInfo.push(video);
 }
 result.end       = result.start-1+result.VideoInfo.length;
 return result;
}
xxxStash.play = function(id){
c=GetContents("http://xxxstash.com/videoConfigJSCode.php?pg=video_'+id+'_no_0");
p=0;
    var url = ext('file: "','"');
    //var video = GetContents(url); 
    return url;

}
SiteList.push(xxxStash);

If understand the examples correctly,you call a function,pass the id 
parameter,mount the url with the id.And search the file url inside the page 
mount.And the function return the file url.But not works.

Original issue reported on code.google.com by jacttr...@gmail.com on 16 Jun 2011 at 12:11

GoogleCodeExporter commented 9 years ago
according to firefox when you load a video the flash player retreiv the url's id
use this id to make a file request :
http://xxxstash.com/videoConfigJSCode.php?pg=video_34573_no_0
and use the "file" attribute to retrevie the mp4 :
file: "http://74.63.73.214/video/.../7be293.mp4" 

so i dont understand why the play function dosent work ...
try to make an alert(url)
to see if the url is correctly retrived

(does i update xhamster ? maybe you prefere to get your own repository in the 
gotube list?)

Original comment by biscotte...@gmail.com on 16 Jun 2011 at 5:04

GoogleCodeExporter commented 9 years ago
o.k So now,The function return A url,but not works :(.The psp not save the file.

var xxxStash = new Object();
xxxStash.rev           =  2;
xxxStash.SearchDesc    = 
xxxStash.Name          = "xxxStash";
xxxStash.Search        = function (keyword, page){
 var result = new Object();
 result.bypage    = 20;// fixed
 result.start     = (page-1)*result.bypage+1;
  c=GetContents('http://xxxstash.com/videos/new/?start='+page+'&tags='+escape(keyword));
  d=c;
 result.total     = -1;
 result.VideoInfo = new Array();
 while(p=c.indexOf('<div class="videoThumb"',p)+1){
  q=p
  video = new Object();
  video.attr          = 3;
  video.Title         = ext('/">','</a>');
  video.id            = ext('id="dAlt_','"');
  video.ThumbnailURL  = ext('src="','"');
  video.LengthSeconds = ext('<div class="duration">',':')*60+ext(':','<')*1;
  video.Description   = 'views:'+ext('"views">','<')+'uploader:'+ext('class="user"><a href="/member/','"');
  video.SaveFilename  = video.Title+".flv"

 //video.URL          = 'unescape(GetContents("http://xxxstash.com/videoCongig.JSCode.php?pg=video_'+video.id+'_no_0").match("<file>(.+?)<")[1]';
 //alert('id:'+video.id);
 video.url = xxxStash.play(video.id);
 c=d;
 p=q
 //alert('id:'+video.id);
 //alert('url:'+video.url);
 result.VideoInfo.push(video);
 }
 result.end       = result.start-1+result.VideoInfo.length;
 return result;
}
xxxStash.play = function(id){
p=0;
c=GetContents("http://xxxstash.com/videoConfigJSCode.php?pg=video_'+id+'_no_0");
//p=0;
    var url = ext('file: "','"');
    //var video = GetContents(url); 
    return url;

}
SiteList.push(xxxStash);

Another problem I found is the psp ignore the first result of the list.It 
display directly the item nº2 and the last item of the list displayed is the 
first o page 2!.

PD:About xhamster update it in your repository :).

Original comment by jacttr...@gmail.com on 17 Jun 2011 at 10:21

GoogleCodeExporter commented 9 years ago
why do you copy the page Content (c) in a temp var (d) ? maybe it came from 
here ?
i already encountered this "correct url but no download" issue, and i was 
unable to understand what's wrong (maybe the gotube user-agent was banned)

i uploaded xhamster on crevette but i don't have my psp, if you have time, test 
if it work, thanks ;)

Original comment by biscotte...@gmail.com on 17 Jun 2011 at 10:42

GoogleCodeExporter commented 9 years ago
Ha,because in inital code,when I use the alert to see video.url the alert 
returns=  xxxStash.play(numberidsend)'.So I no view the return of 
function(alert not works inside function).I think he maybe considere 
xxx.stash.play  a string.So I removed al '" and put video.url = 
xxxStash.play(video.id);

But a new problem emerged.Now video.url returns the url :) but.. The psp only 
returs One result per page!.So the item 2 is in page 1,item 3 in page 2 item 4 
in page 3 etc.... So,I think(probably i wrong remember I new! :)) the problem 
is 1º you storage the web page code in c.And in the function,you storage  a 
new code in c.But this variable is trated as global variable.So when you use c 
in function,you reescribe it,and no more items found.

So I try change c to d in function but not works(black screen lol).So I create 
a backup of c in d,And when you exit the function,I restaure the backup to c 
overwriting the c created in function with the original.

And it works!(maybe pure lucky but works jeje!,the psp display all items in the 
page.

:).

About p,q ignore they only testing..

When I recharged the psp i test xmaster no problem.

About xxxstash I have observed the url return in psp is different url returned 
in firefox,the url firefox works,and psp not :(( in firefox).

Original comment by jacttr...@gmail.com on 18 Jun 2011 at 12:42

GoogleCodeExporter commented 9 years ago
yeah the url are statically generated so psp will not have the same token than 
PC but the style is same : "http://ip/video/token.mp4?start=0" (it work without 
start=0)
but you should "try" (i know it's not easy) enter the psp's url in firefox url 
bar.

Original comment by biscotte...@gmail.com on 18 Jun 2011 at 3:56

GoogleCodeExporter commented 9 years ago
yeah,I try the url generated by psp in firefox,not work in pc,but the url pc 
generate work,very strange.

I try downolad xhamster,I can`t see it,but when psp charge the 
repository,appear in load... at the right.

Original comment by jacttr...@gmail.com on 19 Jun 2011 at 6:51

GoogleCodeExporter commented 9 years ago
new xvideo :),please upload to repository thanks

var Xvideos = new Object();
Xvideos.rev        = 1;
Xvideos.SearchDesc = 
Xvideos.Name       = "Xvideos";
Xvideos.Search     = function (keyword, page){
    var result = new Object();
    result.bypage    = 36;
    result.start     = (page-1)*result.bypage+1;
    page=page-1;
    c=GetContents('http://www.xvideos.com/?k='+escape(keyword)+'&p='+page);
    d=c;
    result.total     = -1;
    result.VideoInfo = new Array();
    while(p=c.indexOf('<td width="183">',p)+1){
        q=p;
        video = new Object();
        video.attr = 3;
        video.href = ext('href="');
        video.ThumbnailURL = ext('<img src="','"');
        video.Title = ext('style="text-decoration:underline;">','<');
        video.Description  = ext('<strong>(',')</strong>')+ext('</strong>','</td>');
        video.SaveFilename  = video.Title+'.flv';
        video.URL             = Xvideos.play(video.href);
        c=d;
        p=q;
        result.VideoInfo.push(video);
        }
    result.end       = result.start-1+result.VideoInfo.length;
    return result;
    }
    Xvideos.play = function (id){
        p=0;
        c=GetContents(id);//p=0;
        url= unescape(ext('flv_url=','&'));
        return url
        }
SiteList.push(Xvideos);

Original comment by jacttr...@gmail.com on 20 Jun 2011 at 2:30

GoogleCodeExporter commented 9 years ago
uploaded thanks ;)
(but i don't understand why you don't want to own your own repo :p)

Original comment by biscotte...@gmail.com on 20 Jun 2011 at 2:36

GoogleCodeExporter commented 9 years ago
xvideos and xhamster donr work on my psp :\
iand it doesnt appear on "gotube updates" radio
so i downloaded it from here

Original comment by LIRANTHE...@gmail.com on 24 Jun 2011 at 10:52

GoogleCodeExporter commented 9 years ago
What is the problem?.

Xvideos Note that it takes a while to load.(paciencie).

And xhamster does not work all the videos.Is a problem with gotube no the 
script.

Original comment by jacttr...@gmail.com on 28 Jun 2011 at 10:31