distube-invidious 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cipherDecoder.d.ts +1 -1
- package/dist/cipherDecoder.d.ts.map +1 -1
- package/dist/cipherDecoder.js +178 -63
- package/dist/cipherDecoder.js.map +1 -1
- package/package.json +1 -1
package/dist/cipherDecoder.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export declare function decodeN(n: string): Promise<string>;
|
|
5
5
|
/**
|
|
6
|
-
* Fix a YouTube URL by decoding its n= parameter if present.
|
|
6
|
+
* Fix a YouTube URL by decoding its n= parameter if present and ensuring ratebypass.
|
|
7
7
|
*/
|
|
8
8
|
export declare function fixUrl(url: string): Promise<string>;
|
|
9
9
|
//# sourceMappingURL=cipherDecoder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cipherDecoder.d.ts","sourceRoot":"","sources":["../src/cipherDecoder.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cipherDecoder.d.ts","sourceRoot":"","sources":["../src/cipherDecoder.ts"],"names":[],"mappings":"AAiOA;;GAEG;AACH,wBAAsB,OAAO,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAGxD;AAED;;GAEG;AACH,wBAAsB,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAkBzD"}
|
package/dist/cipherDecoder.js
CHANGED
|
@@ -1,91 +1,201 @@
|
|
|
1
1
|
// cipherDecoder.ts
|
|
2
|
-
// Strict YouTube cipher decoder (
|
|
2
|
+
// Strict YouTube cipher decoder (dynamic, yt-dlp-style-ish)
|
|
3
3
|
// Fetches player JS, extracts the n-transform function, and applies it.
|
|
4
4
|
import fetch from "node-fetch";
|
|
5
5
|
let cachedTransform = null;
|
|
6
6
|
let cachedPlayerUrl = null;
|
|
7
|
+
let cachedPlayerCode = null;
|
|
7
8
|
/**
|
|
8
|
-
* Fetch
|
|
9
|
+
* Fetch a YouTube watch page and extract the player JS URL.
|
|
9
10
|
*/
|
|
10
11
|
async function getPlayerUrl() {
|
|
11
12
|
if (cachedPlayerUrl)
|
|
12
13
|
return cachedPlayerUrl;
|
|
13
|
-
const res = await fetch("https://www.youtube.com/watch?v=dQw4w9WgXcQ");
|
|
14
|
+
const res = await fetch("https://www.youtube.com/watch?v=dQw4w9WgXcQ");
|
|
15
|
+
if (!res.ok) {
|
|
16
|
+
throw new Error(`Failed to fetch watch page: ${res.status} ${res.statusText}`);
|
|
17
|
+
}
|
|
14
18
|
const html = await res.text();
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
// Try multiple patterns, YouTube changes this often.
|
|
20
|
+
const patterns = [
|
|
21
|
+
/"jsUrl":"([^"]+)"/, // modern
|
|
22
|
+
/"PLAYER_JS_URL":"([^"]+)"/,
|
|
23
|
+
/"js":"([^"]+base\.js)"/,
|
|
24
|
+
/"assets":\{"js":"([^"]+)"\}/,
|
|
25
|
+
];
|
|
26
|
+
for (const re of patterns) {
|
|
27
|
+
const m = html.match(re);
|
|
28
|
+
if (m && m[1]) {
|
|
29
|
+
const url = m[1].startsWith("http")
|
|
30
|
+
? m[1]
|
|
31
|
+
: "https://www.youtube.com" + m[1];
|
|
32
|
+
cachedPlayerUrl = url;
|
|
33
|
+
return url;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
throw new Error("Could not find player JS URL in watch page");
|
|
21
37
|
}
|
|
22
38
|
/**
|
|
23
|
-
* Fetch
|
|
39
|
+
* Fetch the player JS code.
|
|
24
40
|
*/
|
|
25
|
-
async function
|
|
26
|
-
if (
|
|
27
|
-
return
|
|
41
|
+
async function getPlayerCode() {
|
|
42
|
+
if (cachedPlayerCode)
|
|
43
|
+
return cachedPlayerCode;
|
|
28
44
|
const jsUrl = await getPlayerUrl();
|
|
29
45
|
const res = await fetch(jsUrl);
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
46
|
+
if (!res.ok) {
|
|
47
|
+
throw new Error(`Failed to fetch player JS: ${res.status} ${res.statusText}`);
|
|
48
|
+
}
|
|
49
|
+
const code = await res.text();
|
|
50
|
+
cachedPlayerCode = code;
|
|
51
|
+
return code;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Extract the name of the n-transform function from player JS.
|
|
55
|
+
*/
|
|
56
|
+
function extractNFunctionName(jsCode) {
|
|
57
|
+
const candidates = [
|
|
58
|
+
// Older pattern
|
|
59
|
+
/\.get\("n"\)\)&&\(b=([a-zA-Z0-9$]+)\([a-z]\)/,
|
|
60
|
+
// Newer patterns
|
|
61
|
+
/(?:\bncode|\bncode_)\s*=\s*([a-zA-Z0-9$]+)\([a-zA-Z0-9$]+\)/,
|
|
62
|
+
/["']n["']\s*,\s*([a-zA-Z0-9$]+)\(/,
|
|
63
|
+
/(?:\w+)=\w\.get\("n"\)\)&&\(\w=([a-zA-Z0-9$]+)\(\w\)\)/,
|
|
64
|
+
];
|
|
65
|
+
for (const re of candidates) {
|
|
66
|
+
const m = jsCode.match(re);
|
|
67
|
+
if (m && m[1])
|
|
68
|
+
return m[1];
|
|
69
|
+
}
|
|
70
|
+
throw new Error("Could not locate n-transform function name");
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Extract the body of a named function from player JS.
|
|
74
|
+
*/
|
|
75
|
+
function extractFunctionBody(jsCode, fnName) {
|
|
76
|
+
// Try function declaration: fnName=function(a){...}
|
|
77
|
+
let re = new RegExp(`${fnName}=function\\(\\w\\){([^}]+)}`, "s");
|
|
78
|
+
let m = jsCode.match(re);
|
|
79
|
+
if (m && m[1])
|
|
80
|
+
return m[1];
|
|
81
|
+
// Try function declaration with more complex body
|
|
82
|
+
re = new RegExp(`${fnName}=function\\(\\w\\){([^}]+?)};`, "s");
|
|
83
|
+
m = jsCode.match(re);
|
|
84
|
+
if (m && m[1])
|
|
85
|
+
return m[1];
|
|
86
|
+
// Try arrow function: fnName=(a)=>{...}
|
|
87
|
+
re = new RegExp(`${fnName}=\\(\\w\\)=>{([^}]+)}`, "s");
|
|
88
|
+
m = jsCode.match(re);
|
|
89
|
+
if (m && m[1])
|
|
90
|
+
return m[1];
|
|
91
|
+
throw new Error("Could not extract n-transform function body");
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Extract helper object name used inside the n-transform function.
|
|
95
|
+
*/
|
|
96
|
+
function extractHelperName(fnBody) {
|
|
97
|
+
const m = fnBody.match(/([A-Za-z0-9$]{2})\.[A-Za-z0-9$]{2}\(\w, ?\d+\)/) ||
|
|
98
|
+
fnBody.match(/([A-Za-z0-9$]{2})\.[A-Za-z0-9$]{2}\(\w, ?[A-Za-z0-9$]+\)/);
|
|
99
|
+
if (!m || !m[1]) {
|
|
44
100
|
throw new Error("Could not find helper object name");
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
101
|
+
}
|
|
102
|
+
return m[1];
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Extract helper object definition from player JS.
|
|
106
|
+
*/
|
|
107
|
+
function extractHelperObject(jsCode, helperName) {
|
|
108
|
+
const patterns = [
|
|
109
|
+
new RegExp(`var ${helperName}={(.*?)};`, "s"),
|
|
110
|
+
new RegExp(`let ${helperName}={(.*?)};`, "s"),
|
|
111
|
+
new RegExp(`const ${helperName}={(.*?)};`, "s"),
|
|
112
|
+
];
|
|
113
|
+
for (const re of patterns) {
|
|
114
|
+
const m = jsCode.match(re);
|
|
115
|
+
if (m && m[1])
|
|
116
|
+
return m[1];
|
|
117
|
+
}
|
|
118
|
+
throw new Error("Could not extract helper object");
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Build operations map from helper object body.
|
|
122
|
+
*/
|
|
123
|
+
function buildOperations(helperBody) {
|
|
52
124
|
const operations = {};
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
125
|
+
// Split object entries: name:function(a,b){...}
|
|
126
|
+
const entries = helperBody.split("},");
|
|
127
|
+
for (const entry of entries) {
|
|
128
|
+
const [rawName, rawBody] = entry.split(":function");
|
|
129
|
+
if (!rawName || !rawBody)
|
|
130
|
+
continue;
|
|
131
|
+
const name = rawName.trim();
|
|
132
|
+
const body = rawBody;
|
|
58
133
|
if (body.includes("reverse")) {
|
|
59
|
-
operations[
|
|
134
|
+
operations[name] = (a) => a.reverse();
|
|
60
135
|
}
|
|
61
136
|
else if (body.includes("splice")) {
|
|
62
|
-
operations[
|
|
137
|
+
operations[name] = (a, b) => {
|
|
138
|
+
a.splice(0, b);
|
|
139
|
+
};
|
|
63
140
|
}
|
|
64
141
|
else if (body.includes("var c=a[0];a[0]=a[b%a.length];a[b]=c")) {
|
|
65
|
-
operations[
|
|
142
|
+
operations[name] = (a, b) => {
|
|
143
|
+
const idx = b % a.length;
|
|
66
144
|
const c = a[0];
|
|
67
|
-
a[0] = a[
|
|
68
|
-
a[
|
|
145
|
+
a[0] = a[idx];
|
|
146
|
+
a[idx] = c;
|
|
69
147
|
};
|
|
70
148
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
149
|
+
else if (body.includes("a.push(a.splice(0,b)[0])")) {
|
|
150
|
+
operations[name] = (a, b) => {
|
|
151
|
+
while (b-- > 0) {
|
|
152
|
+
a.push(a.splice(0, 1)[0]);
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
// You can extend this with more patterns if YouTube adds new ops.
|
|
157
|
+
}
|
|
158
|
+
return operations;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Build the transform function from the function body and operations map.
|
|
162
|
+
*/
|
|
163
|
+
function buildTransform(fnBody, operations) {
|
|
164
|
+
// Find all calls like: helper.op(a, 3)
|
|
165
|
+
const calls = fnBody.match(/([A-Za-z0-9$]{2})\.([A-Za-z0-9$]{2})\(\w, ?(\d+)\)/g) || [];
|
|
166
|
+
const steps = [];
|
|
167
|
+
for (const call of calls) {
|
|
168
|
+
const m = call.match(/([A-Za-z0-9$]{2})\.([A-Za-z0-9$]{2})\(\w, ?(\d+)\)/);
|
|
169
|
+
if (!m)
|
|
170
|
+
continue;
|
|
171
|
+
const method = m[2];
|
|
172
|
+
const arg = parseInt(m[3], 10);
|
|
173
|
+
steps.push({ method, arg });
|
|
174
|
+
}
|
|
175
|
+
return (n) => {
|
|
176
|
+
const arr = n.split("");
|
|
177
|
+
for (const step of steps) {
|
|
178
|
+
const op = operations[step.method];
|
|
179
|
+
if (op) {
|
|
180
|
+
op(arr, step.arg);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
87
183
|
return arr.join("");
|
|
88
184
|
};
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Get (or build) the n-transform function.
|
|
188
|
+
*/
|
|
189
|
+
async function getTransform() {
|
|
190
|
+
if (cachedTransform)
|
|
191
|
+
return cachedTransform;
|
|
192
|
+
const jsCode = await getPlayerCode();
|
|
193
|
+
const fnName = extractNFunctionName(jsCode);
|
|
194
|
+
const fnBody = extractFunctionBody(jsCode, fnName);
|
|
195
|
+
const helperName = extractHelperName(fnBody);
|
|
196
|
+
const helperBody = extractHelperObject(jsCode, helperName);
|
|
197
|
+
const operations = buildOperations(helperBody);
|
|
198
|
+
const transform = buildTransform(fnBody, operations);
|
|
89
199
|
cachedTransform = transform;
|
|
90
200
|
return transform;
|
|
91
201
|
}
|
|
@@ -97,14 +207,19 @@ export async function decodeN(n) {
|
|
|
97
207
|
return transform(n);
|
|
98
208
|
}
|
|
99
209
|
/**
|
|
100
|
-
* Fix a YouTube URL by decoding its n= parameter if present.
|
|
210
|
+
* Fix a YouTube URL by decoding its n= parameter if present and ensuring ratebypass.
|
|
101
211
|
*/
|
|
102
212
|
export async function fixUrl(url) {
|
|
103
213
|
const u = new URL(url);
|
|
104
214
|
const n = u.searchParams.get("n");
|
|
105
215
|
if (n) {
|
|
106
|
-
|
|
107
|
-
|
|
216
|
+
try {
|
|
217
|
+
const decoded = await decodeN(n);
|
|
218
|
+
u.searchParams.set("n", decoded);
|
|
219
|
+
}
|
|
220
|
+
catch (e) {
|
|
221
|
+
console.warn("[cipherDecoder] Failed to decode n= cipher:", e.message);
|
|
222
|
+
}
|
|
108
223
|
}
|
|
109
224
|
if (!u.searchParams.has("ratebypass")) {
|
|
110
225
|
u.searchParams.set("ratebypass", "yes");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cipherDecoder.js","sourceRoot":"","sources":["../src/cipherDecoder.ts"],"names":[],"mappings":"AAAA,mBAAmB;AACnB,
|
|
1
|
+
{"version":3,"file":"cipherDecoder.js","sourceRoot":"","sources":["../src/cipherDecoder.ts"],"names":[],"mappings":"AAAA,mBAAmB;AACnB,4DAA4D;AAC5D,wEAAwE;AAExE,OAAO,KAAK,MAAM,YAAY,CAAC;AAE/B,IAAI,eAAe,GAAmC,IAAI,CAAC;AAC3D,IAAI,eAAe,GAAkB,IAAI,CAAC;AAC1C,IAAI,gBAAgB,GAAkB,IAAI,CAAC;AAE3C;;GAEG;AACH,KAAK,UAAU,YAAY;IACzB,IAAI,eAAe;QAAE,OAAO,eAAe,CAAC;IAE5C,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,6CAA6C,CAAC,CAAC;IACvE,IAAI,CAAC,GAAG,CAAC,EAAE,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