const decode_n_param = function (a) {
var b = a.split(a.slice(0, 0)), c = [function (d, e, f) { var h = e.length; d.forEach(function (l, m, n) { this.push(n[m] = e[(e.indexOf(l) - e.indexOf(this[m]) + m + h--) % e.length]) }, f.split("")) },
-834997183, null, -118302065, 1223785020, 2584753, b, 1401041337, -495189479, -549702777, -250262161, -1362836893, function () { for (var d = 64, e = []; ++d - e.length - 32;) { switch (d) { case 91: d = 44; continue; case 123: d = 65; break; case 65: d -= 18; continue; case 58: d = 96; continue; case 46: d = 95 }e.push(String.fromCharCode(d)) } return e },
958001347, b, function (d, e) { for (d = (d % e.length + e.length) % e.length; d--;)e.unshift(e.pop()) },
1320480150, -487048763, function (d, e) { if (d.length != 0) { e = (e % d.length + d.length) % d.length; var f = d[0]; d[0] = d[e]; d[e] = f } },
1090263061, -26308672, -375628886, function () { for (var d = 64, e = []; ++d - e.length - 32;)switch (d) { case 58: d = 96; continue; case 91: d = 44; break; case 65: d = 47; continue; case 46: d = 153; case 123: d -= 58; default: e.push(String.fromCharCode(d)) }return e },
function (d) { d.reverse() },
1499028827, function (d, e, f, h, l, m, n, p) { return e(f, h, l, m, n, p) },
function (d, e) { e = (e % d.length + d.length) % d.length; d.splice(-e).reverse().forEach(function (f) { d.unshift(f) }) },
function (d) { throw d; },
-279129675, 259641869, 1193702901, 246712606, -621760478, -870274222, -1931030874, 1134784019, -88108124, 1320480150, 1417195826, b, 933648030, function (d, e, f, h, l) { return e(f, h, l) },
1146661065, function () { for (var d = 64, e = []; ++d - e.length - 32;) { switch (d) { case 58: d -= 14; case 91: case 92: case 93: continue; case 123: d = 47; case 94: case 95: case 96: continue; case 46: d = 95 }e.push(String.fromCharCode(d)) } return e },
839644601, function (d) { for (var e = d.length; e;)d.push(d.splice(--e, 1)[0]) },
1822117694, 869316818, function (d, e, f, h, l, m) { return e(h, l, m) },
null, 1260940770, "while", 553502632, 1887990821, -1073253435, 816963577, "/]{)", 1564222509, 958001347, 1847546259, -1326450178, function (d, e) { e = (e % d.length + d.length) % d.length; d.splice(e, 1) },
1949147888, 1347545449, 194606947, -201156626, 1161249973, -2033886817, function (d, e) { d.length != 0 && (e = (e % d.length + d.length) % d.length, d.splice(0, 1, d.splice(e, 1, d[0])[0])) },
-1334141174, -744278558, 926379076, -1729460775, null, 1652129554, function () { for (var d = 64, e = []; ++d - e.length - 32;)switch (d) { case 46: d = 95; default: e.push(String.fromCharCode(d)); case 94: case 95: case 96: break; case 123: d -= 76; case 92: case 93: continue; case 58: d = 44; case 91: }return e },
-1899944421, -1157313027, -1421127382, -1694754167, -1962030922, -1763419375, 1673394297, -1624364843, -1409766115, -2026824196, 1823838741]; c[2] = c; c[49] = c; c[73] = c; try {
try {
c[71] != -4 && (c[20] <= -10 || (((0, c[0])(c[new Date("1970-01-01T09:30:06.000+09:30") / 1E3], (0, c[75])(), c[51]), ((0, c[61])(c[2], c[64]), c[41])((0, c[-49 + Math.pow(7, 3) % 93])(c[35], c[6]), c[45], c[15385 - Math.pow(8, 1) - 15338]), c[0])(c[14], (0, c[75])(), c[51]), NaN)) && (((0, c[68])(c[49], c[55]), c[26])(c[2], c[40]), ((0, c[74])(c[62], c[5]), c[66])(c[10], c[24]), c[74])(c[new Date("1970-01-01T03:15:10.000+03:15") /
1E3], c[45]), (c[57] !== 5 || ((0, c[70])((0, c[3])(c[35], c[16]), c[3], c[new Date("1969-12-31T20:15:43.000-03:45") / 1E3], c[38]), new Date("1970-01-01T10:45:00.000+10:45") / 1E3)) && (0, c[70])((0, c[55])(c[81], c[49]), c[47], c[78], c[79])
} catch (d) { (0, c[70])((0, c[24])(c[43], (0, c[17])(), c[80]), c[3], c[78], c[82]) } try { c[29] > -2 && (c[60] !== 10 || ((0, c[52])(c[31]), (0, c[3])(c[81], c[61]), (0, c[44])(c[75], c[15]), 0)) && (0, c[77])((0, c[74])(c[31]), c[42], (0, c[39])(c[71], c[29]), c[84], c[5]), (0, c[30])(c[43]), (0, c[62])(c[51], (0, c[35])(), c[6]) } catch (d) {
c[50] ===
-36 + Math.pow(6, 2) % 198 ? (0, c[83])(c[43], c[59]) : (0, c[83])(c[5], c[73]), c[79] != -2 && (c[3] >= 120 - Math.pow(new Date("1970-01-01T07:45:03.000+07:45") / 1E3, 4) + -41 || (((((0, c[76])(c[55], c[56]), c[76])(c[51], c[38]), c[16])(((0, c[76])(c[51], c[58]), c[62])(c[51], (0, c[45])(), c[6]), c[42], c[85], c[43]), c[31])(c[6 * Math.pow(8, 4) + -24568], c[41]), 0)) && (((0, c[62])(c[30], c[56]), (0, c[75])((0, c[62])(c[22], c[58]), c[41], (0, c[10])(c[71], c[69]), c[71], (0, c[48])(), c[72]), c[18])(c[22], c[15]), c[62])(c[22], c[45]), c[59] !== -7 && (c[56] < 9 && ((0, c[10])(c[74],
c[60]), []) || (0, c[68])(c[77], c[18])), c[8] <= 3 && (0, c[24])(c[40], c[0]), c[59] != -1 && (c[33] > 9 && ((0, c[1])(((0, c[1])((0, c[1])((0, c[47])(c[77], (0, c[86])(), c[78]), c[84], c[40]), c[24], c[40], c[31]), (0, c[61])(c[28], c[48]), c[68])(c[28], c[42]), c[19], c[80]), 1) || ((((0, c[27])(c[82], c[36]), (0, c[24])(c[77], c[25]), c[84])(c[Math.pow(8, 1) + 42 - -27]), c[1])((0, c[new Date("1970-01-01T10:30:27.000+10:30") / 1E3])(c[-305 + 1 * Math.pow(7, 3)], c[36]), c[61], c[40], c[32]), c[24])(c[80], c[52])), c[44] !== 9 ? ((((0, c[61])(c[new Date("1970-01-01T11:31:20.000+11:30") /
1E3], c[37]), c[81])((0, c[84])(c[77]), c[24], (0, c[16])(c[44060 - new Date("1970-01-01T07:45:43.000+07:45") / 1E3 * Math.pow(4, 5)], c[6]), c[40], c[39]), c[16])(c[70], c[53]), (0, c[81])((0, c[1])((0, c[27])(c[11], c[-66 + Math.pow(8, 4) % 395]), c[Math.pow(8, 4) - 67 + -4003], c[0]), c[11], ((0, c[55])(c[2], c[33]), c[new Date("1969-12-31T15:30:55.000-08:30") / 1E3])(c[2], c[76]) % (0, c[55])(c[9], c[14]), c[51], c[71]), c[18])(c[23], c[79]) - (0, c[11])(c[51], c[67]) : ((0, c[60])(c[86]) / ((((((0, c[11])(c[39], c[44]), c[11])(c[51], c[29]), c[60])(c[39]),
c[78])((0, c[55])(c[86], c[30 - Math.pow(2, 3) % 489]), c[82], c[95 - Math.pow(3, 2) % 342]), ((0, c[18])(c[51], c[new Date("1970-01-01T11:46:15.000+11:45") / 1E3]), (0, c[82])(c[86]), c[0 + Math.pow(1, 5) - -81])(c[40 * Math.pow(2, 5) - 1257]), c[11])(c[9], c[19]) * (0, c[32])(c[117 - Math.pow(1, 2) * 66], (0, c[59])(), c[1])), (0, c[32])(c[2], (0, c[25])(), c[1]), c[32])(c[2], (0, c[80])(), c[1])
} finally {
(c[21] > -10 || ((0, c[32])(c[2], (0, c[80])(), c[1]), ((0, c[60])(c[51]), c[18])(c[2], c[30]), c[11])(c[51], c[45]) && new Date("1970-01-01T09:15:00.000+09:15") /
1E3) && (0, c[62])(((0, c[52])(c[70], c[23]), c[65])(c[53], c[18]), c[80], (0, c[65])(c[1], c[22]), c[69], c[5], c[18])
}
} catch (d) { return "enhanced_except_5psBmeT-_w8_" + a } return b.join("")
};
const signature = "s=tJfQdSswRgIhAKajS-_utMZ5CrHoPvwppGmmFuPiWfxA1AVxvO8R1O5-AiEAnpv7vO20YKelCMSUQSw_37wyxqpaxksmAI3b%3D9QLdTkLL&sp=sig&url=https://rr2---sn-i3b7knse.googlevideo.com/videoplayback%3Fexpire%3D1723449037%26ei%3DbWq5Zt-EBpucvcAPi-2MuQs%26ip%3D2407%253Acdc0%253Aa86a%253A6d45%253Ae9c9%253A6c69%253A59e4%253A499f%26id%3Do-ADBQz12dDsajV9VOqMEnTLqiqoxc-gCb0FbBCgvf_ACu%26itag%3D251%26source%3Dyoutube%26requiressl%3Dyes%26xpc%3DEgVo2aDSNQ%253D%253D%26mh%3DxE%26mm%3D31%252C26%26mn%3Dsn-i3b7knse%252Csn-ntqe6nee%26ms%3Dau%252Conr%26mv%3Dm%26mvi%3D2%26pl%3D36%26gcr%3Dhk%26initcwndbps%3D2878750%26siu%3D1%26bui%3DAQmm2exXsmCfVOxBBm41mq3y9WxsZDEA-dBuiUq3D7uT_UTe_gniISV9_9fpIDYLniG4XIOZfA%26spc%3DMv1m9jaGQjWZ0lrZhYuj1mlZKqqgRDGHad90plVQGh1tcIsKwNQtXj5OLVlr2vw%26vprv%3D1%26svpuc%3D1%26mime%3Daudio%252Fwebm%26ns%3DZsH6Puk8s3HruUb13BV_X_oQ%26rqh%3D1%26gir%3Dyes%26clen%3D3953585%26dur%3D235.521%26lmt%3D1714757256983752%26mt%3D1723427103%26fvip%3D3%26keepalive%3Dyes%26c%3DWEB_REMIX%26sefc%3D1%26txp%3D5532434%26n%3D6gOByx_bqVQHdkt1h%26sparams%3Dexpire%252Cei%252Cip%252Cid%252Citag%252Csource%252Crequiressl%252Cxpc%252Cgcr%252Csiu%252Cbui%252Cspc%252Cvprv%252Csvpuc%252Cmime%252Cns%252Crqh%252Cgir%252Cclen%252Cdur%252Clmt%26lsparams%3Dmh%252Cmm%252Cmn%252Cms%252Cmv%252Cmvi%252Cpl%252Cinitcwndbps%26lsig%3DAGtxev0wRgIhAJPVHwGIiI19MIc12UlEK4h9SKY20G4823h0-8J1AOBLAiEAxi6V7E_1ooxFZLqnW3KOULzJvPDa1s4rkmX-UCt0e5s%253D"
function apply_decode_n_param(url) {
let tmp = url.slice(0, url.indexOf('?') + 1);
url = url.slice(url.indexOf('?') + 1, url.length);
let query = url.split("&");
for (let i = 0; i < query.length; i++) {
let param = query[i].split("=");
let key = param[0];
let value = param[1];
if (key === 'n') {
value = decode_n_param(value);
query[i] = key + "=" + value;
break;
} else continue;
};
return (tmp + query.join("&"));
}
function decode_cipher(s, mfdecode, ofname, ofdecode) {
console.log(mfdecode)
mfdecode = mfdecode.replaceAll(ofname, 'ofdecode');
eval("mfdecode=" + mfdecode);
let signature = mfdecode(s);
return signature;
};
signatureCipher = signature.split("&");
let query = {};
for (let x = 0; x < signatureCipher.length; x++) {
signatureCipher[x] = signatureCipher[x].split("=");
let key = signatureCipher[x][0];
let value = decodeURIComponent(signatureCipher[x][1]);
query[key] = value;
};
const fdecode = 'ƒ(a){a=a.split("");OK.Oy(a,33);OK.ZE(a,1);OK.fn(a,10);OK.fn(a,7);OK.Oy(a,37);OK.fn(a,43);return a.join("")};'
const ofdecode = {
ZE: function(a,b){a.splice(0, b)},
Oy: function(a){a.reverse()},
fn: function(a,b){var c=a[0];a[0]=a[b%a.length];a[b%a.length]=c}
}
let s = decode_cipher(query['s'], fdecode, "OK", ofdecode);
let url = query['url'] + "&" + query["sp"] + "=" + s;
url = apply_decode_n_param(formats[i]["url"]);
console.log(url)