Closed GoogleCodeExporter closed 9 years ago
i don't think you are allowed to use a name that start with number (var
24video=...)
try _24video or something.
the getContent part seem to be ok
after that ... no ^^ :
while(p=c.indexOf("<div class="clip">",p)+1){
video.id = ext('movieId="');
video.ThumbnailURL = ext('src="');
video.Title = ext('title="');
..and so one...
video.URL = '24video.play('+video.id+')';
}
...and just before the puch :
24video.play = function (id){
alert(id);
}
Original comment by biscotte...@gmail.com
on 23 Sep 2011 at 3:19
do i need to use ratingavg, count, viewcount,...?what if just don't write them?
em... i get something like this:
var _24video = new Object();
_24video.rev = 2;
_24video.SearchDesc =
_24video.Name = "_24video";//doit etre du meme nom que l'objet !
_24video.Search = function (keyword, page){
var result = new Object();
result.bypage = 24;
result.start = (page-1)*result.bypage+1;
c=GetContents('http://www.24video.net/video/filter?page='+page+'&searchText='+es
cape(keyword))
while(p=c.indexOf("<div class="clip">",p)+1){
video = new Object();
video.id = ext('movieId="');
video.ThumbnailURL = ext('src="');
video.Title = ext('title="');
video.CommentCount = ext('commentCount2">');
video.Description = ext('content="');
video.URL = '24video.play('+video.id+')';
video.attr = 3;
result.VideoInfo.push(video);
}
result.end = result.start-1+result.VideoInfo.length;
return result;
}
24video.play = function (id){
alert(id);
}
SiteList.push(_24video);
It don't want to work))) seems i did something wrong...
Original comment by ilkul...@gmail.com
on 23 Sep 2011 at 6:15
var Video = new Object();
Video.rev = 2;
Video.SearchDesc =
Video.Name = "Video";//doit etre du meme nom que l'objet !
Video.Search = function (keyword, page){
var result = new Object();
result.bypage = 24;
result.start = (page-1)*result.bypage+1;
c=GetContents('http://www.24video.net/video/filter?page='+page+'&searchText='+es
cape(keyword))
while(p=c.indexOf("<div class="clip">",p)+1){
video = new Object();
video.id = ext('movieId="');
video.ThumbnailURL = ext('src="');
video.Title = ext('title="');
video.CommentCount = ext('commentCount2">');
video.Description = ext('content="');
video.URL = '24video.play('+video.id+')';
video.attr = 3;
video.play = function (id){
alert(id);
}
result.VideoInfo.push(video);
}
result.end = result.start-1+result.VideoInfo.length;
return result;
}
SiteList.push(Video);
Original comment by ilkul...@gmail.com
on 23 Sep 2011 at 6:23
it dont want 2 work too...
Original comment by ilkul...@gmail.com
on 23 Sep 2011 at 6:24
sorry, i made a mistake :
while(p=c.indexOf("<div class="clip">",p)+1){
became
while(p=c.indexOf('<div class="clip">',p)+1){
rename 24video.play to _24 .... (and update this name to the .URL attribut)
Original comment by biscotte...@gmail.com
on 23 Sep 2011 at 8:01
hmmm... sorry, but it still not work... i newbie in javascripting... i think i
mistake somewhere...)))
This is that i've got:
_24video.rev = 2;
_24video.SearchDesc =
_24video.Name = "_24video";//doit etre du meme nom que l'objet !
_24video.Search = function (keyword, page){
var result = new Object();
result.bypage = 24;
result.start = (page-1)*result.bypage+1;
c=GetContents('http://www.24video.net/video/filter?page='+page+'&searchText='+es
cape(keyword))
while(p=c.indexOf('<div class="clip">',p)+1){
video = new Object();
video.id = ext('movieId="');
video.ThumbnailURL = ext('src="');
video.Title = ext('title="');
video.CommentCount = ext('commentCount2">');
video.Description = ext('content="');
video.URL = '_24video.play('+video.id+')';
video.attr = 3;
result.VideoInfo.push(video);
}
result.end = result.start-1+result.VideoInfo.length;
return result;
}
_24video.play = function (id){
alert(id);
}
SiteList.push(_24video);
Original comment by ilkul...@gmail.com
on 24 Sep 2011 at 1:33
i didn't spotted any mistake ...
it give you an error (black screen) ? or it just don't show the list ?
if it's an error try to rename '_24video' to 'test'
Original comment by biscotte...@gmail.com
on 24 Sep 2011 at 1:41
javascript load error ms0:psp/game/gotube/site/Test.js
Test.rev = 2;
Test.SearchDesc =
Test.Name = "Test";//doit etre du meme nom que l'objet !
Test.Search = function (keyword, page){
var result = new Object();
result.bypage = 24;
result.start = (page-1)*result.bypage+1;
c=GetContents('http://www.24video.net/video/filter?page='+page+'&searchText='+es
cape(keyword))
while(p=c.indexOf('<div class="clip">',p)+1){
video = new Object();
video.id = ext('movieId="');
video.ThumbnailURL = ext('src="');
video.Title = ext('title="');
video.CommentCount = ext('commentCount2">');
video.Description = ext('content="');
video.URL = 'Test.play('+video.id+')';
video.attr = 3;
result.VideoInfo.push(video);
}
result.end = result.start-1+result.VideoInfo.length;
return result;
}
Test.play = function (id){
alert(id);
}
SiteList.push(Test);
Original comment by ilkul...@gmail.com
on 24 Sep 2011 at 2:22
first line ?
var Test = new Object();
Original comment by biscotte...@gmail.com
on 24 Sep 2011 at 2:29
HA-HA-Ha)))))
indeed you right... How could i forget about this =))))Thanx, dude)))
alright!
And so I ran it and it worked ... but when I try to look for something a few
times, it does not show me any results. = (((But on the PC in the opera, I went
to the site 24video ... and there he showed me the result I was trying to
gotube ... Is that right?
Original comment by ilkul...@gmail.com
on 24 Sep 2011 at 2:56
video.CommentCount = ext('commentCount2">');
video.Description = ext('content="');
the website does not provide this type of information (commentCount2"> dont
existe) so don't be surprised ...
good luck for the rest ;)
Original comment by biscotte...@gmail.com
on 24 Sep 2011 at 3:08
Hmmm... i dont understand something...
1)i have to go to site.
2)search anything...
3)it show me a lot of videos
4)now i have to open source code(in opera - ctrl+u RIGHT?)
5)i must find a number that show me the number of comments
6)then using an ext(''); i should find a word before the number and paste
between the''
7)if site don't contains this i just skip the commentscount
Is that right?
and one more thing i don't understand:
Video.url
Should i use this 'Test.play('+video.id+')'; everythere or i have to learn, how
to write this long code:
'unescape(GetContents("http://www.dailymotion.com/video/'+info.id+'").match(\'"v
ideo", "(.*?)%40\')[1])';
How does people write this... it is absolute nonsense. I don't understand
this... it randomly symbols at the end? Pls, can you teach, or explain this,
PLEASE =)))))
Original comment by ilkul...@gmail.com
on 24 Sep 2011 at 3:28
4)i'm using firefox
5)just take a look at the page ! did you see any comments counter ? no. so
don't try to retreiv it. (thit is life, you'll not die for this)
6)yes, if the word contain a " use ' as word separator, and " if word contain a
'
7) in that case , remove the viewcont=... line.
in fact the URL parametter will be executed when you clic on the video
i'll not explain you the URL you pasted here because it using RegExp and RegExp
are not easy to explain/understand
in your case it will call Test.play and give a number as id
use this number to retrive the video page
(ex:http://www.24video.net/video/view/1100549)
and find the flv's url in that page
(no more explanation from me :D)
Original comment by biscotte...@gmail.com
on 24 Sep 2011 at 3:42
I tired... it don't want to search=(((
var Test = new Object();
Test.rev = 2;
Test.SearchDesc =
Test.Name = "Test";//doit etre du meme nom que l'objet !
Test.Search = function (keyword, page){
var result = new Object();
result.bypage = 24;
result.start = (page-1)*result.bypage+1;
c=GetContents('http://www.24video.net/video/filter?page='+page+'&searchText='+es
cape(keyword))
while(p=c.indexOf('<div class="clip">',p)+1){
video = new Object();
video.id = ext('movieId="');
video.ThumbnailURL = ext('src="');
video.Title = ext('title="');
video.Description = 'qwertyuiop'
video.URL = 'Test.play('+video.id+')';
video.attr = 3;
result.VideoInfo.push(video);
}
result.end = result.start-1+result.VideoInfo.length;
return result;
}
Test.play = function (id){
alert(id);
}
SiteList.push(Test);
Original comment by ilkul...@gmail.com
on 24 Sep 2011 at 5:46
i FOUND ONE TUTORIAL ON HOME PAGE...
"video.URL = 'unescape(GetContents("ht tp://www.dailymotion.com/video/'+video.id+'").match(\'"v ideo", "(.*?)"\')[1])';
this part is not easy to understand , ill try to explain in another tutorial"
I'm interesting, where is "another" tutorial... plz, if it exist, can you show
me)))
Original comment by ilkul...@gmail.com
on 25 Sep 2011 at 3:41
[deleted comment]
another question from me xD
Is that real to make vkontakte.ru script?
all vids are situated on one page, so "+page+"no need...
i tried to create the script, but stopped, because this... also i think, vk.ru
is so popular site... why would anybody don't do it... why everyone do only
PORNO scripts XD
Original comment by ilkul...@gmail.com
on 25 Sep 2011 at 4:29
Original issue reported on code.google.com by
ilkul...@gmail.com
on 23 Sep 2011 at 12:44