What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [?] Playing with the Google Data (YouTube) API...

[?] Playing with the Google Data (YouTube) API...
Author: Message:
roflmao456
Skinning Contest Winner
****

Avatar

Posts: 955
Reputation: 24
30 / Male / Flag
Joined: Nov 2006
Status: Away
O.P. [?] Playing with the Google Data (YouTube) API...
Could anyone help me with this? I seem to be getting "Expected ';'" errors..
jscript code:
function YouTube_Search(Keyword,sIndex,Length,option){
    var result={keyword:Keyword,VideoInfo:[],start:sIndex,end:0,total:-1};
    result.start=(((result.start-1)/10)*20)+1;
    >>>var api=eval(GetContents("http://gdata.youtube.com/feeds/api/videos?q="+Keyword+"&alt=json"));<<<
    result.total=parseInt(api.openSearch$totalResults.$t);
    while(1){
        for(i in api.entry)result.VideoInfo.push({URL:"http://www.youtube.com/watch?v="+api.entry[i].id.$t.substr(api.entry[i].id.$t.lastIndexOf("/")+1),ThumbnailURL:api.entry[i].media$thumbnail[0].url,Title:api.entry[i].media$title.$t,Description:api.entry[i].media$description.$t,ViewCount:parseInt(api.entry[i].yt$statistics.viewCount),LengthSeconds:parseInt(api.entry[i].yt$duration.seconds),SaveFilename:ToFilename(api.entry[i].media$title.$t),attr:7
});
        if(result.start+(result.VideoInfo.length-1)==result.total)break;
        }
    result.VideoInfo.length?result.end=result.start+(result.VideoInfo.length-1):result.total=0;
    if(result.VideoInfo.length!=20&&result.start!=1)result.total=result.end;
    return result;
}
underlined: Expected ";" error

GetContents is a XMLHTTP GET request and returns the responseText.

Basically i'm just searching youtube =P

oh and sorry for ruining the layout.

This post was edited on 12-06-2008 at 03:17 AM by roflmao456.
[quote]
Ultimatess6
: What a noob mod
12-06-2008 03:16 AM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[?] Playing with the Google Data (YouTube) API... - by roflmao456 on 12-06-2008 at 03:16 AM
RE: [?] Playing with the Google Data (YouTube) API... - by NanaFreak on 12-06-2008 at 03:41 AM
RE: [?] Playing with the Google Data (YouTube) API... - by roflmao456 on 12-06-2008 at 04:37 AM
RE: [?] Playing with the Google Data (YouTube) API... - by Matti on 12-06-2008 at 09:49 AM
RE: [?] Playing with the Google Data (YouTube) API... - by roflmao456 on 12-06-2008 at 08:45 PM
RE: [?] Playing with the Google Data (YouTube) API... - by felipEx on 12-07-2008 at 05:04 PM
RE: [?] Playing with the Google Data (YouTube) API... - by roflmao456 on 12-08-2008 at 01:23 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On