yne / gotube

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

Would this script work? #71

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If this work then I might become a developer for GoTube.

var YouJizz = new Object();
var result = new Object();
YouJizz.rev        = 1;
YouJizz.SearchDesc = "YouJizz";
YouJizz.Name       = "YouJizz";
YouJizz.Search     = function (keyword, page){
result.bypage    = 15;
result.start     = (page-1)*result.bypage+1;
c=GetContents('http://www.youjizz.com/search/'+escape(keyword)+'-'+page+'.html);
result.VideoInfo = new Array();
result.total     = -1;
while(p=c.indexOf("<item>",p)+1){
video = new Object();
video.attr          = 3;
video.Title         = ext("<title>");
video.URL           = 
'unescape(GetContents("http://www.youjizz.com/video/'+video.id+'").match(\'"vide
o", "(.*?)"\')[1])';
result.VideoInfo.push(video);
}
result.end       = result.start-1+result.VideoInfo.length;
return result;
}
SiteList.push(YouJizz);

Original issue reported on code.google.com by Dezina...@gmail.com on 4 Sep 2011 at 3:31

GoogleCodeExporter commented 9 years ago
no it will not.

Original comment by biscotte...@gmail.com on 4 Sep 2011 at 3:41

GoogleCodeExporter commented 9 years ago
What's wrong with it?

Original comment by Dezina...@gmail.com on 4 Sep 2011 at 3:43

GoogleCodeExporter commented 9 years ago
while(p=c.indexOf("<item>",p)+1){
video = new Object();
video.attr          = 3;
video.Title         = ext("<title>");
video.URL           = 
'unescape(GetContents("http://www.youjizz.com/video/'+video.id+'").match(\'"vide
o", "(.*?)"\')[1])';

Original comment by biscotte...@gmail.com on 4 Sep 2011 at 3:48

GoogleCodeExporter commented 9 years ago
i tried to fix many sites but i failed
here is another version for youjizz

var YouJizz = new Object();
YouJizz.rev        = 1;
YouJizz.SearchDesc = "YouJizz slack";
YouJizz.Name       = "YouJizz";
YouJizz.Search     = function (keyword, page)
{
var result = new Object();
result.bypage    = 6;
result.start     = (page-1)*result.bypage+1;
c=GetContents('http://m.youjizz.com/search/'+escape(keyword)+'/page'+page'.html'
);
result.total     = -1;
result.VideoInfo = new Array();
while(p=c.indexOf('"<div class="content">',p)+1)
{
video = new Object();
video.attr          = 3;
video.Title         = ext('alt="','"');
video.ThumbnailURL  = ext('src="','"');
video.SaveFilename  = video.Title+'.mp4';
video.URL           = 'unescape(GetContents("ext('class="preview" 
href="','"')").match(\'"video", "(.*?)"\')[1])';
result.VideoInfo.push(video);
}
result.end       = result.start-1+result.VideoInfo.length;
return result;
}
SiteList.push(YouJizz);

its looks fine but gotube dont accept it

Original comment by LIRANTHE...@gmail.com on 4 Sep 2011 at 4:33

GoogleCodeExporter commented 9 years ago
from reading only :
1 - you forgot a '+' in the getContent line (on the right side of 'page')
2 - video.URL sound very messy

you should retrieve the "video.id" separately (like Title Thumbnail etc.)
to be able to externalize the URL function :
YouJizz.watch=function (id){alert(id);return the_url;}
and use video.URL='YouJizz.watch("'+video.id+'")'; instate

Original comment by biscotte...@gmail.com on 4 Sep 2011 at 4:42

GoogleCodeExporter commented 9 years ago
i have basic knowlenge in javascript but im planning to learn

with this gotube accept it
but it doesnt show any results

var YouJizz = new Object();
YouJizz.rev        = 1;
YouJizz.SearchDesc = "YouJizz slack";
YouJizz.Name       = "YouJizz";
YouJizz.Search     = function (keyword, page)
{
var result = new Object();
result.bypage    = 6;
result.start     = (page-1)*result.bypage+1;
c=GetContents('http://m.youjizz.com/search/"+escape(keyword)+"/page"+page+".html
');
result.total     = -1;
result.VideoInfo = new Array();
while(p=c.indexOf('<div id="menu">',p)+1)
{
video = new Object();
video.attr          = 3;
video.Title         = ext('alt="','" name="');
video.ThumbnailURL  = ext('target="_self"><img src="','"');
video.id         = ext('/','.mp4"');
link.id          = ext('http://','.youjizz.com');
video.num        = 
ext('http://'+link.id+'.youjizz.com/videos/',''+video.id+'.mp4');
video.SaveFilename  = video.Title+'.mp4';
video.URL           = 
'unescape(GetContents("http://'+link.id+'.youjizz.com/videos/'+video.num+'/'+vid
eo.id+'.mp4").match(\'"video", "(.*?)"\')[1])';
result.VideoInfo.push(video);
}
result.end       = result.start-1+result.VideoInfo.length;
return result;
}
SiteList.push(YouJizz);

Original comment by LIRANTHE...@gmail.com on 4 Sep 2011 at 5:46

GoogleCodeExporter commented 9 years ago
Can someone please get the script working and tell me what was wrong in mine. 
Please try to explain it the best you can. I want to make more scripts.

Original comment by Dezina...@gmail.com on 6 Sep 2011 at 9:00

GoogleCodeExporter commented 9 years ago
Progress!

var YouJizz = new Object();
YouJizz.rev        = 1;
YouJizz.SearchDesc = "YouJizz";
YouJizz.Name       = "YouJizz";
YouJizz.Search     = function (keyword, page)
{
var result = new Object();
result.bypage    = 20;
result.start     = (page-1)*result.bypage+1;
c=GetContents('http://www.youjizz.com/search/'+escape(keyword)+'-'+page+'.html')
;
result.total     = -1;
result.VideoInfo = new Array();
video = new Object();
while(p=c.indexOf('<div id="main">',p)+1)
{
video.attr          = 3;
//video.Title         = ext('span id="title1">','</span>');
video.ThumbnailURL  = ext('<img src="','"');
video.id         = ext('<a class="frame" href="','');
video.URL           = 'YouJizz.play("'+video.id+'")';
result.VideoInfo.push(video);
}
result.end       = result.start-1+result.VideoInfo.length;
return result;
}
YouJizz.play = function(url){
        c=GetContents(url);p=0;
        return ext("'file', '");
}
SiteList.push(YouJizz);

Original comment by Dezina...@gmail.com on 8 Sep 2011 at 1:24

GoogleCodeExporter commented 9 years ago
>>If this work then I might become a developer for GoTube.
>>no it will not.
i just realized that my reply might be misinterpreted:
yes, if the script work, you'll be added to the repository list.
sorry about my "rude" reply :)

Original comment by biscotte...@gmail.com on 8 Sep 2011 at 4:39

GoogleCodeExporter commented 9 years ago
:) I need some help thought.I understand most of it. I don't understand why it 
is not getting other videos and when I add the title it overloads.

Original comment by Dezina...@gmail.com on 8 Sep 2011 at 8:42

GoogleCodeExporter commented 9 years ago
the while line must contain a string that is present before each result, <div 
id="main"> is only present 1 time but opposite to <ul class="vid-rotater"> .
all the info retreiving are not in correct order :
1st we have the <a class="frame" href='/videos/sometext-videoId.html'
2nd we have the thumbnail
3rd we have the title

and the play function is not okay, in cant find the string 'file' in the video 
page, but "file", " is okay

i think you have all necessary clues to make it work now

Original comment by biscotte...@gmail.com on 8 Sep 2011 at 10:12

GoogleCodeExporter commented 9 years ago
var YouJizz = new Object();
YouJizz.rev        = 1;
YouJizz.SearchDesc = "YouJizz";
YouJizz.Name       = "YouJizz";
YouJizz.Search     = function (keyword, page)
{
var result = new Object();
result.bypage    = 20;
result.start     = (page-1)*result.bypage+1;
c=GetContents('http://www.youjizz.com/search/'+escape(keyword)+'-'+page+'.html')
;
result.total     = -1;
result.VideoInfo = new Array();
while(p=c.indexOf('<div id="main">',p)+1)
{
video = new Object();
video.attr          = 3;
video.ThumbnailURL  = ext('<img src="','"');
video.Title         = ext('span id="title1">','</span>');
video.id            = ext('<a class="frame" href="','');
video.URL           = 'YouJizz.play("'+video.id+'")';
result.VideoInfo.push(video);
}
result.end       = result.start-1+result.VideoInfo.length;
return result;
}
YouJizz.play = function(url){
        c=GetContents(url);p=0;
        return ext("file, ");
}
SiteList.push(YouJizz);

I have no idea what to do now. Can you finish it so I can see what you did. 
Then I can try to make a new script.

Original comment by Dezina...@gmail.com on 8 Sep 2011 at 11:57

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
read the previous post of biscotte

he/she have explained what was wrong in your porn script... and you did like 
you don't understand... or you didn't read his/her post completely. 
You only make change around "file" that more fucked up your script... the first 
time was more okay...

ext('') can be ext("") so
ext("file, ") can be ext('file, ');

Think about it!

Also ext('<img src="','"') can be ext('<img src="')... ext() function will make 
the link between these "

Original comment by cloud125...@gmail.com on 10 Sep 2011 at 2:56