SKincinerate / gotube

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

My script won't work #33

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I tryed to make a script but it doesn't show any result.
My code:

var RedTube = new Object();
RedTube.rev        = 1;
RedTube.SearchDesc =
RedTube.Name       = "RedTube";
RedTube.Search     = function (keyword, page){
var result = new Object();
result.bypage    = 20;
result.start     = (page-1)*result.bypage+1;
c=GetContents('http://www.redtube.com/mostrelevant?search='+escape(keyword)+'&'+
page);
result.total     = -1;
result.VideoInfo = new Array();
while(p=c.indexOf('<div class="video',p)+1){
video = new Object();
video.attr = 1;
video.Title = ext('title="');
video.id = ext('id="');
video.ThumbnailURL = ext('src="');
video.LengthSeconds= ext('<span class="d">',':')*60+ext(':','<')*1;
video.ViewCount    = ext('<div style="float:left;">', '</div>')*1;
video.Description  = ext('title="');
video.URL = 
'unescape(GetContents("http://www.redtube.com/'+video.id+'").match(\'"video", 
"(.*?)"\')[1])';
result.VideoInfo.push(video);
}
result.end       = result.start-1+result.VideoInfo.length;
return result;
}
SiteList.push(RedTube);

Can anybody see if i did something wrong?

Original issue reported on code.google.com by ser...@safetymail.info on 12 Mar 2011 at 12:41

GoogleCodeExporter commented 8 years ago
even the GetContents url seem wrong ...
i dont think the page will be
http://www.redtube.com/mostrelevant?search=test&1

Original comment by biscotte...@gmail.com on 12 Mar 2011 at 1:06

GoogleCodeExporter commented 8 years ago
Indeed your right!!

Now I've got results working great but when i select a movie it won't play.

This is what I've got.

var RedTube = new Object();
RedTube.rev        = 1;
RedTube.SearchDesc =
RedTube.Name       = "RedTube";
RedTube.Search     = function (keyword, page){
var result = new Object();
result.bypage    = 20;
result.start     = (page-1)*result.bypage+1;
c=GetContents('http://www.redtube.com/mostrelevant?search='+escape(keyword)+'&pa
ge='+page);
result.total     = -1;
result.VideoInfo = new Array();
while(p=c.indexOf('<div class="video',p)+1){
video = new Object();
video.attr = 1;
video.Title = ext('title="');
video.id = ext('id="');
video.ThumbnailURL = ext('src="');
video.LengthSeconds= ext('<span class="d">',':')*60+ext(':','<')*1;
video.ViewCount    = ext('<div style="float:left;">', '</div>')*1;
video.Description  = ext('title="');
video.URL = 
'unescape(GetContents("http://www.redtube.com/'+video.id+'").match(\'"video", 
"(.*?)"\')[1])';
result.VideoInfo.push(video);
}
result.end       = result.start-1+result.VideoInfo.length;
return result;
}
SiteList.push(RedTube);

I think it's a wrong VideoUrl?
But I've no idea how i can get the link to the flv.

Original comment by ser...@safetymail.info on 12 Mar 2011 at 1:16

GoogleCodeExporter commented 8 years ago
first you should use :
video.URL = 'RedTube.play("'+video.id+'")';

and create a fonction :
RedTube.play     = function (keyword, page){
//code to retreive url to flv and return it
}

it will be easier to understand

and use adblock or a network profile to find the flv's url 

Original comment by biscotte...@gmail.com on 12 Mar 2011 at 1:35

GoogleCodeExporter commented 8 years ago
This is all I can find as extension .flv
id=32917&width=584&height=468&vname=5e4912e7e7abde99dc05085c399225a9&hash_flv=/3
c775293914e456c7becea86e3214af6/4d7b8e12&secured=true&hash_mp4=/dffe49b72b63d0c4
a8d2b30644cdeac2/4d7b8e12&secured=true&hashlink=http%3A%2F%2Fcdn.ec.redtube.com%
2F_videos_t4vn23s9jc5498tgj49icfj4678%2F0000032%2FX9BDGX0P8.flv%3F47aac1f74dca44
b0626f9b5acf21d75cd5dee7e8937c9cd51b261a40b065dba3a15afec6f0976e643c03e6fbd10caa
f6af50f14a1bf8c6be3f42%0A&embed=%3Cobject+height%3D%22344%22+width%3D%22434%22%3
E%3Cparam+name%3D%22allowfullscreen%22+value%3D%22false%22%3E%3Cparam+name%3D%22
movie%22+value%3D%22http%3A%2F%2Fembed.redtube.com%2Fplayer%2F%22%3E%3Cparam+nam
e%3D%22FlashVars%22+value%3D%22id%3D32917%26style%3Dredtube%26autostart%3Dfalse%
22%3E%3Cembed+src%3D%22http%3A%2F%2Fembed.redtube.com%2Fplayer%2F%3Fid%3D32917%2
6style%3Dredtube%22+allowfullscreen%3D%22false%22+flashvars%3D%22autostart%3Dfal
se%22+pluginspage%3D%22http%3A%2F%2Fwww.adobe.com%2Fshockwave%2Fdownload%2Fdownl
oad.cgi%3FP1_Prod_Version%3DShockwaveFlash%22+type%3D%22application%2Fx-shockwav
e-flash%22+height%3D%22344%22+width%3D%22434%22+%2F%3E%3C%2Fobject%3E%3Cbr+%2F%3
E%3Ca+href%3D%22http%3A%2F%2Fwww.redtube.com%2F32917%22%3EKatlin+the+horny+babe%
3C%2Fa%3E+brought+to+you+by+%3Ca+href%3D%22http%3A%2F

I have no idea what to do with this.

Original comment by ser...@safetymail.info on 12 Mar 2011 at 2:16

GoogleCodeExporter commented 8 years ago
Btw I use adblock firefox

Original comment by ser...@safetymail.info on 12 Mar 2011 at 2:17

GoogleCodeExporter commented 8 years ago
at least did you tried to :
download the video with some random firefox plugin
move it into PSP's MS
play it with gotube

im prety sure that most of them are unplayable

Original comment by biscotte...@gmail.com on 12 Mar 2011 at 2:29

GoogleCodeExporter commented 8 years ago
Ok I'll stop RedTube though now i started Xhamster.
Results are fine but I have a problem.
When I search for videos it doesn't need a id to play the vid so i get a href 
link.
In the href link where the video plays on the computer there is part of link to 
the flv.
I must add "http://88.208.13.11/flv2/" to that part to have the direct link to 
the flv.
Now I tryed this and give me Javascript load error.

var XHamster = new Object();
XHamster.rev        = 1;
XHamster.SearchDesc =
XHamster.Name       = "XHamster";
XHamster.Search     = function (keyword, page){
var result = new Object();
result.bypage    = 24;
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('<div class="moduleFeaturedDetails',p)+1){
video = new Object();
video.attr = 1;
video.Title = ext('<u>', '</u>');
video.id = ext('id="');
video.href = ext("a href='");
video.ThumbnailURL = ext("img src='");
video.LengthSeconds= ext('Runtime: ','m')*60+ext('m','s')*1;
video.ViewCount    = ext('Views: ', '</div>')*1;
video.Description  = ext('<u>', '</u>');
video.URL = "http://88.208.13.11/flv2/" + 
'GetContents("http://www.xhamster.com/'+video.href+'").match(/"'file': 
'"(.*,)</)[1]';
result.VideoInfo.push(video);
}
result.end       = result.start-1+result.VideoInfo.length;
return result;
}
SiteList.push(XHamster);

Original comment by ser...@safetymail.info on 12 Mar 2011 at 3:55

GoogleCodeExporter commented 8 years ago
Now I've got no errors but vid won't show..

var XHamster = new Object();
XHamster.rev        = 1;
XHamster.SearchDesc =
XHamster.Name       = "XHamster";
XHamster.Search     = function (keyword, page){
var result = new Object();
result.bypage    = 24;
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('<div class="moduleFeaturedDetails',p)+1){
video = new Object();
video.attr = 1;
video.Title = ext('<u>', '</u>');
video.id = ext('id="');
video.href = ext("a href='");
video.ThumbnailURL = ext("img src='");
video.LengthSeconds= ext('Runtime: ','m')*60+ext('m','s')*1;
video.ViewCount    = ext('Views: ', '</div>')*1;
video.Description  = ext('<u>', '</u>');
video.URL             = 'XHamster.play("'+video.href+'")';
//video.URL = "http://88.208.13.11/flv2/" + 
'GetContents("http://www.xhamster.com/'+video.href+'").match(/"'file': 
'"(.*,)</)[1]';
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;
var b = unescape("http://88.208.13.11/flv2/"+ext("'file': '", "',"));
return b;
}
SiteList.push(XHamster);

Original comment by ser...@safetymail.info on 12 Mar 2011 at 4:12

GoogleCodeExporter commented 8 years ago
I've got it working :D
Brackets were wrong.

Please if you want add this script to the updater.

var XHamster = new Object();
XHamster.rev        = 1;
XHamster.SearchDesc =
XHamster.Name       = "XHamster";
XHamster.Search     = function (keyword, page){
var result = new Object();
result.bypage    = 24;
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('<div class="moduleFeaturedDetails',p)+1){
video = new Object();
video.attr = 1;
video.Title = ext('<u>', '</u>');
video.id = ext('id="');
video.href = ext('a href="');
video.ThumbnailURL = ext("img src='");
video.LengthSeconds= ext('Runtime: ','m')*60+ext('m','s')*1;
video.ViewCount    = ext('Views: ', '</div>')*1;
video.Description  = ext('<u>', '</u>');
video.URL             = 'XHamster.play("'+video.href+'")';
//video.URL = "http://88.208.13.11/flv2/" + 
'GetContents("http://www.xhamster.com/'+video.href+'").match(/"'file': 
'"(.*,)</)[1]';
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;
var b = unescape("http://88.208.13.11/flv2/"+ext("'file': '", "',"));
return b;
}
SiteList.push(XHamster);

Original comment by ser...@safetymail.info on 12 Mar 2011 at 4:18

GoogleCodeExporter commented 8 years ago
i've a proposition :

I upload YOUR script on MY repository (but ppl will think i've made it...)
-or-
create your own repository, upload this script, and all future one without my 
help (just the first time, i'll need to add your repository to the gotube's 
updater).

both are not a problem for me :)

Original comment by biscotte...@gmail.com on 12 Mar 2011 at 4:31

GoogleCodeExporter commented 8 years ago
Your friendly:)

So I'll have to upload all my on a hosting site?

If so here's the link to it
http://iserver.x10.mx/gotube/

Original comment by ser...@safetymail.info on 12 Mar 2011 at 4:53

GoogleCodeExporter commented 8 years ago
added and work

Original comment by biscotte...@gmail.com on 12 Mar 2011 at 5:18

GoogleCodeExporter commented 8 years ago
Thx man 
Pretty cool to see my name in the updater :D

Original comment by ser...@safetymail.info on 12 Mar 2011 at 5:27