yne / gotube

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

Trying again XD #60

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
so i managed to get my script to work in gotube but it doesnt show results ><

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;
   page=page-1;
   c=GetContents("http://veevr.com/search/?q='+escape(keyword)+'&page='+page&category=&sort=&when=&duration=&features=");
   result.total     = -1;
   result.VideoInfo = new Array();
   while(p=c.indexOf("<item>",p)+1)
   {
        video = new Object();
        video.id = ext('http://veevr.com/videos/','"');
        video.Title         = ext('og:title');
        result.VideoInfo.push(video);
    }
    result.end       = result.start-1+result.VideoInfo.length;
    return result;
     }
     SiteList.push(veevr);

any help?

Original issue reported on code.google.com by LIRANTHE...@gmail.com on 23 Jun 2011 at 5:50

GoogleCodeExporter commented 9 years ago
you exchange " and ' in your getContents line
and the while line is wrong too, the result page dosent separate each result 
with <item> but with <div style="float:left; margin-bottom:15px;">
same for og:title, there is'nt such word on the result page ...
but , well the video.id is okay ^^

Original comment by biscotte...@gmail.com on 23 Jun 2011 at 10:43

GoogleCodeExporter commented 9 years ago
okay...
i fix it and now it still doesnt show result...XD
here is my results page 
http://veevr.com/search/?q=ANIME&page=2&category=&sort=&when=&duration=&features
=

what i need to take for there to make it work?

and here is my fixed version:
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;
   page=page-1;
   c=GetContents("http://veevr.com/search/?q='+escape(keyword)'+'&page='+page&category=&sort=&when=&duration=&features=");
   result.total     = -1;
   result.VideoInfo = new Array();
   while(p=c.indexOf('<div style="float:left; margin-bottom:15px;">',p)+1)
   {
        video = new Object();
        video.id = ext('http://veevr.com/videos/','"');
        video.Title         = ext('</title>');
        result.VideoInfo.push(video);
    }
    result.end       = result.start-1+result.VideoInfo.length;
    return result;
     }
     SiteList.push(veevr);

maybe i will try other site?

Original comment by LIRANTHE...@gmail.com on 23 Jun 2011 at 5:16

GoogleCodeExporter commented 9 years ago
you didn't fixed them :
c=GetContents("http://veevr.com/search/?q='+escape(keyword)+'&page='+page&catego
ry=&sort=&when=&duration=&features=");
should be
c=GetContents('http://veevr.com/search/?q='+escape(keyword)+'&page='+page);

video.Title will not work, you must use the beginning mark, not the end one

Original comment by biscotte...@gmail.com on 23 Jun 2011 at 7:12

GoogleCodeExporter commented 9 years ago
FUCK YEAH
i got it to work but the after i chose video
it not loading anything

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;
   page=page-1;
   c=GetContents('http://veevr.com/search/?q='+escape(keyword)+'&page='+page);   result.total     = -1;
   result.VideoInfo = new Array();
   while(p=c.indexOf('<div style="float:left; margin-bottom:15px;">',p)+1)
   {
        video = new Object();
        video.id = ext('http://veevr.com/videos/','"');
        video.Title         = ext('alt="','"');
        video.ThumbnailURL  = ext('src="','"');
        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);

Original comment by LIRANTHE...@gmail.com on 24 Jun 2011 at 9:57

GoogleCodeExporter commented 9 years ago
so what did you prefer ?
> i add your script to the biscotte repo
> you create a repo, add your script in it, and i add your repo to the updater

Original comment by biscotte...@gmail.com on 24 Jun 2011 at 10:59

GoogleCodeExporter commented 9 years ago
how do i create a repo?
and my script is not complete yet xD
after i chose a video
it stuck on 00:00

Original comment by LIRANTHE...@gmail.com on 24 Jun 2011 at 1:00

GoogleCodeExporter commented 9 years ago
so finally it doesn't load "anything" ...
i recommend you to use this style of URL getting :
video.URL = 'veevr.play('+video.id+')';

and add just before the SiteList.push(veevr); a function like this :
function veevr.play(id){
  alert("i have to find the flv url of : "+id);
  return the_final_url;
}

it will be easier to manage like this ;)

Original comment by biscotte...@gmail.com on 24 Jun 2011 at 1:23

GoogleCodeExporter commented 9 years ago
now fotube giving me error reading
   while(p=c.indexOf('<div style="float:left; margin-bottom:15px;">',p)+1)
   {
        video = new Object();
        video.id = ext('http://veevr.com/videos/','"');
        video.Title         = ext('alt="','"');
        video.ThumbnailURL  = ext('src="','"');
        video.URL = 'veevr.play('+video.id+')';
        result.VideoInfo.push(video);
   }
    result.end       = result.start-1+result.VideoInfo.length;
    return result;

 }
function veevr.play(id)
 {
   alert("i have to find the flv url of : "+id);
   return the_final_url;
  }
  SiteList.push(veevr);

and veevr crashed for me so i cant continue for now
i will try another site for now

Original comment by LIRANTHE...@gmail.com on 24 Jun 2011 at 3:06