yne / gotube

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

Need help creating scripts #58

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I'm trying to make a Megaporn script.  Please help correct any errors.    

var MegaPorn = new Object();
MegaPorn.rev           = 4;
MegaPorn.SearchDesc    =
MegaPorn.Name          = "MegaPorn";
MegaPorn.Search        = function (keyword, page){
 var result = new Object();
 result.bypage    = 15;
 result.start     = (page-1)*result.bypage+1;
 c=GetContents('http://www.megaporn.com/video/?c=videos&s='+escape(keyword)+"/"+page);
 result.total     = c.match('d; font-size:12px;">.*?([0-9]+)<')[1];
 result.VideoInfo = new Array();
 while(p=c.indexOf('<TD width="150"',p)+1){
  video = new Object();
  video.attr          = 3;
  video.id            = ext('?v=','"');
  //video.ThumbnailURL  = ext('src="');
  video.Title         = ext('none;">');
  video.Description   = ext('">')+'\n';
  video.ViewCount     = ext('v5">')*1;
  video.CommentCount  = ext('v5">')*1;
  video.Description  += ext('v5">');
  video.Tags          = ext('" >').replace(/&/g,"");
  video.URL = 'GetContents("http://www.megaporn.com/video/'+video.id+'").match(/<flv_url>(.*?)</)[1]';
  result.VideoInfo.push(video);
 }
 result.end       = result.start-1+result.VideoInfo.length;
 return result;
}
SiteList.push(MegaPorn);

Original issue reported on code.google.com by xcrusade...@gmail.com on 11 Jun 2011 at 7:14

GoogleCodeExporter commented 9 years ago
i don't see anything wrong.
what is the problem ?

Original comment by biscotte...@gmail.com on 11 Jun 2011 at 7:24

GoogleCodeExporter commented 9 years ago
nothing wrong? :S when i search something up, no results show.

Original comment by xcrusade...@gmail.com on 11 Jun 2011 at 7:33

GoogleCodeExporter commented 9 years ago
the script is syntactically right, otherwise you'll get a JavaScript error at 
boot.

the url is wrong, when i search "test" and i go to the 2nd page i got : 
http://www.megaporn.com/video/?c=videos&s=good&p=2
so the url line should be :
c=GetContents('http://www.megaporn.com/video/?c=videos&s='+escape(keyword)+'&p='
+page);

and i don't find any '<TD width="150"' in the result page or whatever word you 
use to extract information ... i don't understand how you do that O_o

Original comment by biscotte...@gmail.com on 11 Jun 2011 at 7:45

GoogleCodeExporter commented 9 years ago
for the TD width i followed the format of Ultimate PSPtube's old megaporn 
script.  So should i just delete the entire td width line?

Original comment by xcrusade...@gmail.com on 11 Jun 2011 at 7:50

GoogleCodeExporter commented 9 years ago
each video block start with :
<div class="forms_div2" onclick="

each video id start with :
watchvideo('

each thumbnailURL start with :
<img src="

each title start with :
px;">

you should be able to make a search script with that ...

Original comment by biscotte...@gmail.com on 11 Jun 2011 at 8:01

GoogleCodeExporter commented 9 years ago
thanks and for the pornhub script, the results are all shown, but the durations 
aren't displayed. thanks!

Original comment by xcrusade...@gmail.com on 11 Jun 2011 at 8:05

GoogleCodeExporter commented 9 years ago
updated (but i keept the same rev number), download and give me feedback

Original comment by biscotte...@gmail.com on 11 Jun 2011 at 8:18

GoogleCodeExporter commented 9 years ago
hey when i click a video, ALL of the videos get selected from pornhub.  By all 
of the videos getting selected i mean that there are the moving dotted lines 
around each result.    

Original comment by xcrusade...@gmail.com on 11 Jun 2011 at 8:24

GoogleCodeExporter commented 9 years ago
okay i found the problem , this time it should be okay :)

Original comment by biscotte...@gmail.com on 11 Jun 2011 at 8:37

GoogleCodeExporter commented 9 years ago
hey its still not working.  all the videeos are still being selected whenever i 
click on a video.  :(

Original comment by xcrusade...@gmail.com on 11 Jun 2011 at 9:08

GoogleCodeExporter commented 9 years ago
i even downloaded on another psp, and it doesnt work too.  

Original comment by xcrusade...@gmail.com on 11 Jun 2011 at 9:12

GoogleCodeExporter commented 9 years ago
last chance ...
get the last one
if it still doesn't work, add this line under the video.id line :
video.Description  = video.id;

if it still doesn't work , then, you'll be forced to find a gf.

Original comment by biscotte...@gmail.com on 11 Jun 2011 at 9:17

GoogleCodeExporter commented 9 years ago
it works now! thanks! :)

Original comment by xcrusade...@gmail.com on 11 Jun 2011 at 10:04