0

I want to store the data received from http://www.youtube-mp3.org/a/itemInfo/?video_id=Vd85aPZ-QAE&ac=www&t=grp into a variable and access info.h.. i tried this

$.ajax({
          async: false,
          type: "GET",
          url: "http://www.youtube-mp3.org/a/itemInfo/?video_id=Vd85aPZ-QAE&ac=www&t=grp",
          dataType: "json",
          success : function(info) {
                        xml = info.h;
                alert(xml); // WORKS
                    }
        });

but no success..

infoRehashCallback=function(){4==h.readyState&&("$$$ERROR$$$"==h.responseText?pushItemError():500==h.status?(error_count+=1,4<error_count&&pushItemMaintenance()):(eval(h.responseText),checkInfo()))};infoRehash=function(){var a=new Date;h=createRequestObject();a="http://www.youtube-mp3.org/a/itemInfo/?video_id="+video_id+"&ac=www&t=grp&r="+a.getTime();h.onreadystatechange=infoRehashCallback;h.open("GET",a,!0);hs(h);h.send(null)};
startInfoRehash=function(a){video_id=a;infoRehash();interval=window.setInterval("infoRehash()",1E3*interval_diff)};

i got this code from the website's javascript

kk3nny
  • 23
  • 6

2 Answers2

0

make a function like this:

$.ajax({
          async: false,
          type: "GET",
          url: "http://www.youtube-mp3.org/a/itemInfo/?video_id=Vd85aPZ-QAE&ac=www&t=grp",
          dataType: "json",
          success : function(info) {
                        ShowAlert(info.h);

                    }
        });

function ShowAlert(a)
{
   alert(a);
// do whatever want to with the result
}
Ehsan Sajjad
  • 61,834
  • 16
  • 105
  • 160
0

I got the following response which is not valid json:

info = {"status" : "serving", "h" : "-"};

Should be:

{"status" : "serving", "h" : "-"}
Wilmer
  • 2,511
  • 1
  • 14
  • 8