Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Youtube converter.

Joined
Dec 15, 2009
Messages
1,387
Reaction score
236
I have been trying relying on existing scripts from to come out with my own personal api script, because I want it to be implemented to a game.

I did inspect the codes and stuff......but I was unable to understand why it wouldn't work at all. Chances are there were too much security measurements that I couldn't figure out a way to bypass them. I could be wrong though.

--
So i found a Github ( ) which is able to produce what I want, however it is outdated and failed to work.

This is the part where I don't understand.


r = time
s = ?

--
Well...i decided to move on...and try to scrap it from other servers/website. :thumbdown:
 
Junior Spellweaver
Joined
Oct 27, 2008
Messages
165
Reaction score
89
looking at the site JS Scrpt(Its not hard to create an API for it):
Code:
pushItem = function() {
    ytry = 0;
    yc = "unkown";
    ycsl = ye = "";
    var a = new Date;
    h = createRequestObject();
    var b = "/a/pushItem/?item=" + escape(g("youtube-url").value) + "&el=na&bf=" + getBF() + "&r=" + a.getTime(),
        b = sig_url(b);
    h.onreadystatechange = pushItemCallback;
    h.open("GET", b, !0);
    hs(h);
    h.send(null);
    "" != inp_t && null != inp_t && (a = inp_t.replace("$1", escape(g("youtube-url").value)) + "&r=" + a.getTime(), tlog.src = a)
};
getBF = function() {
    return 1 == bFrame ? "true" : "false"
};
sig_url = function(a) {
    var b = sig(a);
    return a + "&s=" + escape(b)
};

sig = function(a) {
    if ("function" == typeof _sig) {
        var b = "X";
        try {
            b = _sig(a)
        } catch (c) {}
        if ("X" != b) return b
    }
    return "-1"
};
_sig = function(H) {
    var U = "R3",
        m3 = "round",
        e3 = "B3",
        D3 = "v3",
        N3 = "I3",
        g3 = "V",
        K3 = "toLowerCase",
        n3 = "substr",
        z3 = "Z",
        d3 = "C",
        P3 = "O",
        x3 = ['a', 'c', 'e', 'i', 'h', 'm', 'l', 'o', 'n', 's', 't', '.'],
        G3 = [6, 7, 1, 0, 10, 3, 7, 8, 11, 4, 7, 9, 10, 8, 0, 5, 2],
        M = ['a', 'c', 'b', 'e', 'd', 'g', 'm', '-', 's', 'o', '.', 'p', '3', 'r', 'u', 't', 'v', 'y', 'n'],
        X = [
            [17, 9, 14, 15, 14, 2, 3, 7, 6, 11, 12, 10, 9, 13, 5],
            [11, 6, 4, 1, 9, 18, 16, 10, 0, 11, 11, 8, 11, 9, 15, 10, 1, 9, 6]
        ],
        A = {
            "a": 870,
            "b": 906,
            "c": 167,
            "d": 119,
            "e": 130,
            "f": 899,
            "g": 248,
            "h": 123,
            "i": 627,
            "j": 706,
            "k": 694,
            "l": 421,
            "m": 214,
            "n": 561,
            "o": 819,
            "p": 925,
            "q": 857,
            "r": 539,
            "s": 898,
            "t": 866,
            "u": 433,
            "v": 299,
            "w": 137,
            "x": 285,
            "y": 613,
            "z": 635,
            "_": 638,
            "&": 639,
            "-": 880,
            "/": 687,
            "=": 721
        },
        r3 = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"];
    gs = function(I, B) {
        var P = "D",
            J = "";
        for (var R = 0; b0I[P](R, I.length); R++) {
            J += B[I[R]];
        };
        return J;
    };
    ew = function(I, B) {
        var P = "K",
            J = "indexOf";
        return I[J](B, b0I[P](I.length, B.length)) !== -1;
    };
    gh = function() {
        var I = gs(G3, x3);
        return eval(I);
    };
    fn = function(I, B) {
        var P = "E",
            J = "G";
        for (var R = 0; b0I[J](R, I.length); R++) {
            if (b0I[P](I[R], B)) return R;
        }
        return -1;
    };
    var L = [1.23413, 1.51214, 1.9141741, 1.5123114, 1.51214, 1.2651],
        F = 1;
    try {
        F = L[b0I[P3](1, 2)];
        var W = gh(),
            S = gs(X[0], M),
            T = gs(X[1], M);
        if (ew(W, S) || ew(W, T)) {
            F = L[1];
        } else {
            F = L[b0I[d3](5, 3)];
        }
    } catch (I) {};
    var N = 3219;
    for (var Y = 0; b0I[z3](Y, H.length); Y++) {
        var Q = H[n3](Y, 1)[K3]();
        if (fn(r3, Q) > -1) {
            N = N + (b0I[g3](parseInt(Q), 121, F));
        } else {
            if (b0I[N3](Q, A)) {
                N = N + (b0I[D3](A[Q], F));
            }
        }
        N = b0I[e3](N, 0.1);
    }
    N = Math[m3](b0I[U](N, 1000));
    return N;
};
 
Joined
Dec 15, 2009
Messages
1,387
Reaction score
236
looking at the site JS Scrpt(Its not hard to create an API for it):
Code:
pushItem = function() {
    ytry = 0;
    yc = "unkown";
    ycsl = ye = "";
    var a = new Date;
    h = createRequestObject();
    var b = "/a/pushItem/?item=" + escape(g("youtube-url").value) + "&el=na&bf=" + getBF() + "&r=" + a.getTime(),
        b = sig_url(b);
    h.onreadystatechange = pushItemCallback;
    h.open("GET", b, !0);
    hs(h);
    h.send(null);
    "" != inp_t && null != inp_t && (a = inp_t.replace("$1", escape(g("youtube-url").value)) + "&r=" + a.getTime(), tlog.src = a)
};
getBF = function() {
    return 1 == bFrame ? "true" : "false"
};
sig_url = function(a) {
    var b = sig(a);
    return a + "&s=" + escape(b)
};

sig = function(a) {
    if ("function" == typeof _sig) {
        var b = "X";
        try {
            b = _sig(a)
        } catch (c) {}
        if ("X" != b) return b
    }
    return "-1"
};
_sig = function(H) {
    var U = "R3",
        m3 = "round",
        e3 = "B3",
        D3 = "v3",
        N3 = "I3",
        g3 = "V",
        K3 = "toLowerCase",
        n3 = "substr",
        z3 = "Z",
        d3 = "C",
        P3 = "O",
        x3 = ['a', 'c', 'e', 'i', 'h', 'm', 'l', 'o', 'n', 's', 't', '.'],
        G3 = [6, 7, 1, 0, 10, 3, 7, 8, 11, 4, 7, 9, 10, 8, 0, 5, 2],
        M = ['a', 'c', 'b', 'e', 'd', 'g', 'm', '-', 's', 'o', '.', 'p', '3', 'r', 'u', 't', 'v', 'y', 'n'],
        X = [
            [17, 9, 14, 15, 14, 2, 3, 7, 6, 11, 12, 10, 9, 13, 5],
            [11, 6, 4, 1, 9, 18, 16, 10, 0, 11, 11, 8, 11, 9, 15, 10, 1, 9, 6]
        ],
        A = {
            "a": 870,
            "b": 906,
            "c": 167,
            "d": 119,
            "e": 130,
            "f": 899,
            "g": 248,
            "h": 123,
            "i": 627,
            "j": 706,
            "k": 694,
            "l": 421,
            "m": 214,
            "n": 561,
            "o": 819,
            "p": 925,
            "q": 857,
            "r": 539,
            "s": 898,
            "t": 866,
            "u": 433,
            "v": 299,
            "w": 137,
            "x": 285,
            "y": 613,
            "z": 635,
            "_": 638,
            "&": 639,
            "-": 880,
            "/": 687,
            "=": 721
        },
        r3 = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"];
    gs = function(I, B) {
        var P = "D",
            J = "";
        for (var R = 0; b0I[P](R, I.length); R++) {
            J += B[I[R]];
        };
        return J;
    };
    ew = function(I, B) {
        var P = "K",
            J = "indexOf";
        return I[J](B, b0I[P](I.length, B.length)) !== -1;
    };
    gh = function() {
        var I = gs(G3, x3);
        return eval(I);
    };
    fn = function(I, B) {
        var P = "E",
            J = "G";
        for (var R = 0; b0I[J](R, I.length); R++) {
            if (b0I[P](I[R], B)) return R;
        }
        return -1;
    };
    var L = [1.23413, 1.51214, 1.9141741, 1.5123114, 1.51214, 1.2651],
        F = 1;
    try {
        F = L[b0I[P3](1, 2)];
        var W = gh(),
            S = gs(X[0], M),
            T = gs(X[1], M);
        if (ew(W, S) || ew(W, T)) {
            F = L[1];
        } else {
            F = L[b0I[d3](5, 3)];
        }
    } catch (I) {};
    var N = 3219;
    for (var Y = 0; b0I[z3](Y, H.length); Y++) {
        var Q = H[n3](Y, 1)[K3]();
        if (fn(r3, Q) > -1) {
            N = N + (b0I[g3](parseInt(Q), 121, F));
        } else {
            if (b0I[N3](Q, A)) {
                N = N + (b0I[D3](A[Q], F));
            }
        }
        N = b0I[e3](N, 0.1);
    }
    N = Math[m3](b0I[U](N, 1000));
    return N;
};
i did. but it just won't work.

--
so I decided scrap another script from

This is what I have:


And nope, it won't work...maybe it's the headers fault or Origin-Policy etc?

im bout to bang myself to the wall.
 
Last edited:
Junior Spellweaver
Joined
Oct 27, 2008
Messages
165
Reaction score
89
Ajax will not work, because of the Same Origin Policy, you should try to use a 3rd party way to make HTTP requests like flash, java, etc.

You could try to look at this article, but I don't know if it will help:

 
Last edited:
Back
Top