yne / gotube

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

trying to create script #56

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
here is my script for veevr site

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

go!tube giving me "load error"
i cant find what i did wrong ><
any help?

Original issue reported on code.google.com by LIRANTHE...@gmail.com on 2 Jun 2011 at 4:11

GoogleCodeExporter commented 8 years ago
c=GetContents('http://veevr.com/search/?q="+escape(keyword)+"&page=+page);
is wrong
it should be :
c=GetContents("http://veevr.com/search/?q="+escape(keyword)+"&page=+page);
use a text editor with syntax coloring like notepad++

Original comment by biscotte...@gmail.com on 2 Jun 2011 at 5:44

GoogleCodeExporter commented 8 years ago
OKAY
go!tube takes it but when i serach something
nothing appears 
whats wrong now?
and how do i add pic and title for every vid?

BTW
YOU HAVE DONE AWESOME WORK HERE
AND IM FOLLOWING YOUR OPENTUBE PROJECT :)

Original comment by LIRANTHE...@gmail.com on 2 Jun 2011 at 9:49

Attachments:

GoogleCodeExporter commented 8 years ago
you used dailymotion example without changing the string <item>,title etc...
copy and past the tutorial will not give you a working script for ~insert name 
here~
you must change it with adapted string :
the getContent part is okay :
c=GetContents("http://veevr.com/search/?q="+escape(keyword)+"&page="+page);
after reading the source we can see :
width:500px;">
before each video block
so we got :
while(p=c.indexOf('width:500px;">',p)+1)

now ,time to analise the video block :
first we got a video id : href="http://veevr.com/videos/...."
so we extract with :
video.Title         = ext('http://veevr.com/videos/','"');
after that we have the tile between <pre></pre>
so we extract with :
video.Title         = ext("<pre>");
we will do the video.URL only at the end.

Original comment by biscotte...@gmail.com on 2 Jun 2011 at 10:05

GoogleCodeExporter commented 8 years ago
can you fix this and post it
im learning faster from seeing my mistakes XD

   while(p=c.indexOf('width:500px;">',p)+1)
   {
     video = new Object();
     video.Title         = ext('http://veevr.com/videos/','"');
     video.Title         = ext("<pre>");
     video.URL           = 'unescape(GetContents("http://veevr.com/videos/'+video.id+'").match(\'"video", "(.*?)"\')[1])';
     result.VideoInfo.push(video);
     }
     result.end       = result.start-1+result.VideoInfo.length;
     return result;
     }
     SiteList.push(veevr);

10X a lot man
if i will able to poll it of
i will start to make many more XP

Original comment by LIRANTHE...@gmail.com on 2 Jun 2011 at 10:31

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
    while(p=c.indexOf('width:500px;">',p)+1){
        video = new Object();
        video.id = ext('http://veevr.com/videos/','"');
        video.Title         = ext("<pre>");
        result.VideoInfo.push(video);
    }
    result.end       = result.start-1+result.VideoInfo.length;
    return result;
}
SiteList.push(veevr);

Original comment by biscotte...@gmail.com on 2 Jun 2011 at 11:09

GoogleCodeExporter commented 8 years ago
it still dont work :rage:
never mind 
i think yhe site is too heavy

i will try another site
thx for your help

Original comment by LIRANTHE...@gmail.com on 3 Jun 2011 at 9:27