@vyla-entertainment/sdk 1.18.0 → 1.20.0
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/README.md +5 -5
- package/package.json +1 -1
- package/src/config.js +138 -137
- package/src/sources/cno.js +95 -0
- package/src/sources/flaxmovies.js +91 -103
- package/src/sources/frost.js +30 -0
- package/src/sources/hdhub.js +36 -0
- package/src/sources/kickassanime.js +125 -0
- package/src/sources/lmscript.js +53 -25
- package/src/sources/movy.js +161 -233
- package/src/sources/net79.js +56 -0
- package/src/sources/rivo.js +54 -0
- package/src/sources/thugtv.js +56 -55
- package/src/sources/vidora.js +62 -0
- package/src/sources/watchout.js +46 -0
- package/src/sources/yapgrid.js +63 -0
- package/src/utils/helpers.js +17 -0
- package/src/sources/anihq.js +0 -124
- package/src/sources/anineko.js +0 -190
- package/src/sources/movienight.js +0 -117
- package/src/sources/vidgod.js +0 -147
- package/src/sources/vidnest.js +0 -79
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
# vyla/sdk
|
|
2
|
-
|
|
1
|
+
# vyla-entertainment/sdk
|
|
2
|
+
The Vyla SDK (@vyla-entertainment/sdk) is a server-side JavaScript/TypeScript package that provides direct access to Vyla's stream resolvers, health probes, download resolvers, and subtitle providers.
|
|
3
3
|
|
|
4
4
|
## Installing
|
|
5
5
|
To start, install VylaSDK through npm or pnpm:
|
|
@@ -13,13 +13,13 @@ pnpm install @vyla-entertainment/sdk
|
|
|
13
13
|
|
|
14
14
|
View our full documentation at https://docs.vyla.cc/sdk
|
|
15
15
|
|
|
16
|
-
# [DMCA](https://
|
|
16
|
+
# [DMCA](https://vyla.cc/misc/project/DMCA)
|
|
17
17
|
|
|
18
18
|
If your source is listed here, I sincerely apologize. I understand that its inclusion may be costing you a lot of money, and that was never my intention. Please contact me as soon as possible, and I'll remove it ASAP.
|
|
19
19
|
|
|
20
20
|
This is a small hobby project that I built for learning and personal interest, not for profit. I genuinely want to respect the wishes of source owners and will address any removal requests as quickly as I can.
|
|
21
21
|
|
|
22
|
-
This project is developed and maintained by [Vyla Entertainment](https://
|
|
22
|
+
This project is developed and maintained by [Vyla Entertainment](https://gitlab.com/vyla-entertainment) (@vyla-entertainment).
|
|
23
23
|
|
|
24
24
|
Original work and core authorship:
|
|
25
25
|
|
|
@@ -28,4 +28,4 @@ Original work and core authorship:
|
|
|
28
28
|
[@GavinGoGaming](https://github.com/GavinGoGaming)
|
|
29
29
|
|
|
30
30
|
Full credits and acknowledgements:
|
|
31
|
-
https://
|
|
31
|
+
https://vyla.cc/misc/project/credit
|
package/package.json
CHANGED
package/src/config.js
CHANGED
|
@@ -56,50 +56,6 @@ export const SOURCES = [
|
|
|
56
56
|
}],
|
|
57
57
|
},
|
|
58
58
|
|
|
59
|
-
{
|
|
60
|
-
key: 'anihq-sub',
|
|
61
|
-
label: 'AniHQ (Sub)',
|
|
62
|
-
sourceFile: 'anihq',
|
|
63
|
-
proxyParam: 'ahsub',
|
|
64
|
-
timeout: 25000,
|
|
65
|
-
jitter: 500,
|
|
66
|
-
retries: 2,
|
|
67
|
-
multiUrl: true,
|
|
68
|
-
skipProxy: true
|
|
69
|
-
},
|
|
70
|
-
|
|
71
|
-
{
|
|
72
|
-
key: 'anihq-dub',
|
|
73
|
-
label: 'AniHQ (Dub)',
|
|
74
|
-
sourceFile: 'anihq',
|
|
75
|
-
proxyParam: 'ahdub',
|
|
76
|
-
timeout: 25000,
|
|
77
|
-
jitter: 500,
|
|
78
|
-
retries: 2,
|
|
79
|
-
multiUrl: true,
|
|
80
|
-
skipProxy: true
|
|
81
|
-
},
|
|
82
|
-
|
|
83
|
-
{
|
|
84
|
-
key: 'anineko-sub',
|
|
85
|
-
sourceFile: 'anineko',
|
|
86
|
-
label: 'AniNeko (Sub)',
|
|
87
|
-
proxyParam: 'anksub',
|
|
88
|
-
timeout: 25000,
|
|
89
|
-
jitter: 500,
|
|
90
|
-
retries: 2
|
|
91
|
-
},
|
|
92
|
-
|
|
93
|
-
{
|
|
94
|
-
key: 'anineko-dub',
|
|
95
|
-
sourceFile: 'anineko',
|
|
96
|
-
label: 'AniNeko (Dub)',
|
|
97
|
-
proxyParam: 'ankdub',
|
|
98
|
-
timeout: 25000,
|
|
99
|
-
jitter: 500,
|
|
100
|
-
retries: 2
|
|
101
|
-
},
|
|
102
|
-
|
|
103
59
|
{
|
|
104
60
|
key: 'bcine',
|
|
105
61
|
label: 'Bcine',
|
|
@@ -118,25 +74,6 @@ export const SOURCES = [
|
|
|
118
74
|
}],
|
|
119
75
|
},
|
|
120
76
|
|
|
121
|
-
{
|
|
122
|
-
key: 'cinecat',
|
|
123
|
-
label: 'Cinecat',
|
|
124
|
-
sourceFile: 'cinecat',
|
|
125
|
-
proxyParam: 'ccat',
|
|
126
|
-
timeout: 25000,
|
|
127
|
-
jitter: 500,
|
|
128
|
-
retries: 2,
|
|
129
|
-
multiUrl: false,
|
|
130
|
-
skipProxy: true,
|
|
131
|
-
cdnHeaders: [{
|
|
132
|
-
pattern: /bluevelvet\.space/i,
|
|
133
|
-
headers: {
|
|
134
|
-
Referer: 'https://zcdn.bluevelvet.space/',
|
|
135
|
-
Origin: 'https://zcdn.bluevelvet.space',
|
|
136
|
-
},
|
|
137
|
-
}],
|
|
138
|
-
},
|
|
139
|
-
|
|
140
77
|
{
|
|
141
78
|
key: 'cinemaarmy',
|
|
142
79
|
label: 'CinemaArmy',
|
|
@@ -193,6 +130,25 @@ export const SOURCES = [
|
|
|
193
130
|
}],
|
|
194
131
|
},
|
|
195
132
|
|
|
133
|
+
{
|
|
134
|
+
key: 'cno',
|
|
135
|
+
label: 'Cno',
|
|
136
|
+
sourceFile: 'cno',
|
|
137
|
+
proxyParam: 'cno',
|
|
138
|
+
timeout: 25000,
|
|
139
|
+
jitter: 300,
|
|
140
|
+
retries: 1,
|
|
141
|
+
multiUrl: true,
|
|
142
|
+
skipProxy: true,
|
|
143
|
+
cdnHeaders: [{
|
|
144
|
+
pattern: /cno\.to/i,
|
|
145
|
+
headers: {
|
|
146
|
+
Referer: 'https://cno.to/',
|
|
147
|
+
Origin: 'https://cno.to',
|
|
148
|
+
},
|
|
149
|
+
}],
|
|
150
|
+
},
|
|
151
|
+
|
|
196
152
|
{
|
|
197
153
|
key: 'dulo',
|
|
198
154
|
label: 'Dulo',
|
|
@@ -217,18 +173,30 @@ export const SOURCES = [
|
|
|
217
173
|
label: 'FlaxMovies',
|
|
218
174
|
sourceFile: 'flaxmovies',
|
|
219
175
|
proxyParam: 'fx',
|
|
220
|
-
timeout:
|
|
176
|
+
timeout: 25000,
|
|
221
177
|
jitter: 500,
|
|
222
178
|
retries: 2,
|
|
223
179
|
multiUrl: true,
|
|
224
180
|
skipProxy: true,
|
|
225
181
|
cdnHeaders: [{
|
|
226
|
-
pattern: /
|
|
182
|
+
pattern: /themoviebox\.uk|vidrock\.|orbitingdreams\.xyz|fastcloud\.live|deton444eik\.com/i,
|
|
227
183
|
headers: {
|
|
228
|
-
Referer: 'https://
|
|
229
|
-
Origin: 'https://
|
|
184
|
+
Referer: 'https://themoviebox.uk/',
|
|
185
|
+
Origin: 'https://themoviebox.uk',
|
|
230
186
|
},
|
|
231
|
-
}
|
|
187
|
+
}],
|
|
188
|
+
},
|
|
189
|
+
|
|
190
|
+
{
|
|
191
|
+
key: 'frost',
|
|
192
|
+
label: 'FrostStream',
|
|
193
|
+
sourceFile: 'frost',
|
|
194
|
+
proxyParam: 'fst',
|
|
195
|
+
timeout: 25000,
|
|
196
|
+
jitter: 500,
|
|
197
|
+
retries: 2,
|
|
198
|
+
multiUrl: true,
|
|
199
|
+
skipProxy: true,
|
|
232
200
|
},
|
|
233
201
|
|
|
234
202
|
{
|
|
@@ -243,6 +211,18 @@ export const SOURCES = [
|
|
|
243
211
|
skipProxy: true,
|
|
244
212
|
},
|
|
245
213
|
|
|
214
|
+
{
|
|
215
|
+
key: 'hdhub',
|
|
216
|
+
label: 'HDHub',
|
|
217
|
+
sourceFile: 'hdhub',
|
|
218
|
+
proxyParam: 'hdh',
|
|
219
|
+
timeout: 25000,
|
|
220
|
+
jitter: 500,
|
|
221
|
+
retries: 2,
|
|
222
|
+
multiUrl: true,
|
|
223
|
+
skipProxy: true,
|
|
224
|
+
},
|
|
225
|
+
|
|
246
226
|
{
|
|
247
227
|
key: 'hexa',
|
|
248
228
|
label: 'Hexa',
|
|
@@ -262,6 +242,25 @@ export const SOURCES = [
|
|
|
262
242
|
}],
|
|
263
243
|
},
|
|
264
244
|
|
|
245
|
+
{
|
|
246
|
+
key: 'kickassanime',
|
|
247
|
+
label: 'KickAssAnime',
|
|
248
|
+
sourceFile: 'kickassanime',
|
|
249
|
+
proxyParam: 'kaa',
|
|
250
|
+
timeout: 25000,
|
|
251
|
+
jitter: 500,
|
|
252
|
+
retries: 2,
|
|
253
|
+
multiUrl: true,
|
|
254
|
+
skipProxy: true,
|
|
255
|
+
cdnHeaders: [{
|
|
256
|
+
pattern: /krussdomi\.com/i,
|
|
257
|
+
headers: {
|
|
258
|
+
Referer: 'https://kaa.lt/',
|
|
259
|
+
Origin: 'https://kaa.lt',
|
|
260
|
+
},
|
|
261
|
+
}],
|
|
262
|
+
},
|
|
263
|
+
|
|
265
264
|
{
|
|
266
265
|
key: 'hyper',
|
|
267
266
|
label: 'Hyper',
|
|
@@ -334,25 +333,6 @@ export const SOURCES = [
|
|
|
334
333
|
}],
|
|
335
334
|
},
|
|
336
335
|
|
|
337
|
-
{
|
|
338
|
-
key: 'movienight',
|
|
339
|
-
label: 'MovieNight',
|
|
340
|
-
sourceFile: 'movienight',
|
|
341
|
-
proxyParam: 'mn',
|
|
342
|
-
timeout: 20000,
|
|
343
|
-
jitter: 500,
|
|
344
|
-
retries: 2,
|
|
345
|
-
multiUrl: true,
|
|
346
|
-
skipProxy: true,
|
|
347
|
-
cdnHeaders: [{
|
|
348
|
-
pattern: /movienig\.ht/i,
|
|
349
|
-
headers: {
|
|
350
|
-
Referer: 'https://movienig.ht/',
|
|
351
|
-
Origin: 'https://movienig.ht',
|
|
352
|
-
},
|
|
353
|
-
}],
|
|
354
|
-
},
|
|
355
|
-
|
|
356
336
|
{
|
|
357
337
|
key: 'movy',
|
|
358
338
|
label: 'Movy',
|
|
@@ -364,29 +344,29 @@ export const SOURCES = [
|
|
|
364
344
|
multiUrl: true,
|
|
365
345
|
skipProxy: true,
|
|
366
346
|
cdnHeaders: [{
|
|
367
|
-
pattern: /wecollege\.net|movy\.
|
|
347
|
+
pattern: /wecollege\.net|movy\.sx|goldenkite\.top/i,
|
|
368
348
|
headers: {
|
|
369
|
-
Referer: 'https://www.movy.
|
|
370
|
-
Origin: 'https://www.movy.
|
|
349
|
+
Referer: 'https://www.movy.sx/',
|
|
350
|
+
Origin: 'https://www.movy.sx',
|
|
371
351
|
},
|
|
372
352
|
}],
|
|
373
353
|
},
|
|
374
354
|
|
|
375
355
|
{
|
|
376
|
-
key: '
|
|
377
|
-
label: '
|
|
378
|
-
sourceFile: '
|
|
379
|
-
proxyParam: '
|
|
356
|
+
key: 'net79',
|
|
357
|
+
label: 'Net79',
|
|
358
|
+
sourceFile: 'net79',
|
|
359
|
+
proxyParam: 'n79',
|
|
380
360
|
timeout: 25000,
|
|
381
361
|
jitter: 500,
|
|
382
362
|
retries: 2,
|
|
383
363
|
multiUrl: true,
|
|
384
364
|
skipProxy: true,
|
|
385
365
|
cdnHeaders: [{
|
|
386
|
-
pattern: /
|
|
366
|
+
pattern: /hakunaymatata\.com/i,
|
|
387
367
|
headers: {
|
|
388
|
-
Referer: 'https://
|
|
389
|
-
Origin: 'https://
|
|
368
|
+
Referer: 'https://net79.cc/',
|
|
369
|
+
Origin: 'https://net79.cc',
|
|
390
370
|
},
|
|
391
371
|
}],
|
|
392
372
|
},
|
|
@@ -437,6 +417,24 @@ export const SOURCES = [
|
|
|
437
417
|
multiUrl: true,
|
|
438
418
|
},
|
|
439
419
|
|
|
420
|
+
{
|
|
421
|
+
key: 'rivo',
|
|
422
|
+
label: 'Rivo',
|
|
423
|
+
sourceFile: 'rivo',
|
|
424
|
+
proxyParam: 'rv',
|
|
425
|
+
timeout: 25000,
|
|
426
|
+
jitter: 500,
|
|
427
|
+
retries: 2,
|
|
428
|
+
multiUrl: true,
|
|
429
|
+
cdnHeaders: [{
|
|
430
|
+
pattern: /rivo\.st/i,
|
|
431
|
+
headers: {
|
|
432
|
+
Referer: 'https://f.rivo.st/',
|
|
433
|
+
Origin: 'https://f.rivo.st',
|
|
434
|
+
},
|
|
435
|
+
}],
|
|
436
|
+
},
|
|
437
|
+
|
|
440
438
|
{
|
|
441
439
|
key: 'streamaggregator',
|
|
442
440
|
label: 'StreamAggregator',
|
|
@@ -467,7 +465,7 @@ export const SOURCES = [
|
|
|
467
465
|
multiUrl: true,
|
|
468
466
|
skipProxy: true,
|
|
469
467
|
cdnHeaders: [{
|
|
470
|
-
pattern: /thugtv\.online|
|
|
468
|
+
pattern: /thugtv\.online|fcxmb\.com|hscow\.com/i,
|
|
471
469
|
headers: {
|
|
472
470
|
Referer: 'https://thugtv.online/',
|
|
473
471
|
Origin: 'https://thugtv.online',
|
|
@@ -508,15 +506,22 @@ export const SOURCES = [
|
|
|
508
506
|
},
|
|
509
507
|
|
|
510
508
|
{
|
|
511
|
-
key: '
|
|
512
|
-
label: '
|
|
513
|
-
sourceFile: '
|
|
514
|
-
proxyParam: '
|
|
509
|
+
key: 'vidora',
|
|
510
|
+
label: 'Vidora',
|
|
511
|
+
sourceFile: 'vidora',
|
|
512
|
+
proxyParam: 'vdra',
|
|
515
513
|
timeout: 25000,
|
|
516
514
|
jitter: 500,
|
|
517
515
|
retries: 2,
|
|
518
516
|
multiUrl: true,
|
|
519
517
|
skipProxy: true,
|
|
518
|
+
cdnHeaders: [{
|
|
519
|
+
pattern: /rousav\.tech|vidbolt\.xyz|vidrift\.in|goldenkite\.top|ravok\.buzz/i,
|
|
520
|
+
headers: {
|
|
521
|
+
Referer: 'https://vidora-3l2w.onrender.com/',
|
|
522
|
+
Origin: 'https://vidora-3l2w.onrender.com',
|
|
523
|
+
},
|
|
524
|
+
}],
|
|
520
525
|
},
|
|
521
526
|
|
|
522
527
|
{
|
|
@@ -531,41 +536,6 @@ export const SOURCES = [
|
|
|
531
536
|
multiUrl: true,
|
|
532
537
|
},
|
|
533
538
|
|
|
534
|
-
{
|
|
535
|
-
key: 'vidnest',
|
|
536
|
-
label: 'VidNest',
|
|
537
|
-
sourceFile: 'vidnest',
|
|
538
|
-
proxyParam: 'vdn',
|
|
539
|
-
timeout: 20000,
|
|
540
|
-
retries: 1,
|
|
541
|
-
jitter: 0,
|
|
542
|
-
multiUrl: true,
|
|
543
|
-
},
|
|
544
|
-
|
|
545
|
-
{
|
|
546
|
-
key: 'vidnest-sub',
|
|
547
|
-
label: 'VidNest (Sub)',
|
|
548
|
-
sourceFile: 'vidnest',
|
|
549
|
-
proxyParam: 'vdn',
|
|
550
|
-
timeout: 20000,
|
|
551
|
-
retries: 1,
|
|
552
|
-
jitter: 0,
|
|
553
|
-
multiUrl: true,
|
|
554
|
-
skipProxy: true,
|
|
555
|
-
},
|
|
556
|
-
|
|
557
|
-
{
|
|
558
|
-
key: 'vidnest-dub',
|
|
559
|
-
label: 'VidNest (Dub)',
|
|
560
|
-
sourceFile: 'vidnest',
|
|
561
|
-
proxyParam: 'vdn',
|
|
562
|
-
timeout: 20000,
|
|
563
|
-
retries: 1,
|
|
564
|
-
jitter: 0,
|
|
565
|
-
multiUrl: true,
|
|
566
|
-
skipProxy: true,
|
|
567
|
-
},
|
|
568
|
-
|
|
569
539
|
{
|
|
570
540
|
key: 'vidrock',
|
|
571
541
|
label: 'VidRock',
|
|
@@ -662,6 +632,18 @@ export const SOURCES = [
|
|
|
662
632
|
},
|
|
663
633
|
},
|
|
664
634
|
|
|
635
|
+
{
|
|
636
|
+
key: 'watchout',
|
|
637
|
+
label: 'Watchout',
|
|
638
|
+
sourceFile: 'watchout',
|
|
639
|
+
proxyParam: 'wo',
|
|
640
|
+
timeout: 25000,
|
|
641
|
+
jitter: 500,
|
|
642
|
+
retries: 2,
|
|
643
|
+
multiUrl: true,
|
|
644
|
+
skipProxy: true,
|
|
645
|
+
},
|
|
646
|
+
|
|
665
647
|
{
|
|
666
648
|
key: 'xdownloader',
|
|
667
649
|
label: 'XDownloader',
|
|
@@ -681,6 +663,25 @@ export const SOURCES = [
|
|
|
681
663
|
}],
|
|
682
664
|
},
|
|
683
665
|
|
|
666
|
+
{
|
|
667
|
+
key: 'yapgrid',
|
|
668
|
+
label: 'YapGrid',
|
|
669
|
+
sourceFile: 'yapgrid',
|
|
670
|
+
proxyParam: 'yap',
|
|
671
|
+
timeout: 25000,
|
|
672
|
+
jitter: 500,
|
|
673
|
+
retries: 2,
|
|
674
|
+
multiUrl: true,
|
|
675
|
+
skipProxy: true,
|
|
676
|
+
cdnHeaders: [{
|
|
677
|
+
pattern: /yapgrid\.com|embedwave\.cc/i,
|
|
678
|
+
headers: {
|
|
679
|
+
Referer: 'https://yapgrid.com/',
|
|
680
|
+
Origin: 'https://yapgrid.com',
|
|
681
|
+
},
|
|
682
|
+
}],
|
|
683
|
+
},
|
|
684
|
+
|
|
684
685
|
{
|
|
685
686
|
key: 'yastream',
|
|
686
687
|
label: 'YaStream',
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { fetchText } from '../utils/helpers.js';
|
|
2
|
+
|
|
3
|
+
export async function getStream({ id, s, e }) {
|
|
4
|
+
const isTv = s != null && e != null;
|
|
5
|
+
const serverIndices = Array.from({ length: 50 }, (_, i) => i + 1);
|
|
6
|
+
|
|
7
|
+
const headers = {
|
|
8
|
+
'Accept': 'application/json, text/plain, */*',
|
|
9
|
+
'Referer': 'https://cno.to/',
|
|
10
|
+
'Origin': 'https://cno.to',
|
|
11
|
+
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36'
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const promises = serverIndices.map(async (serverNum) => {
|
|
15
|
+
const url = isTv
|
|
16
|
+
? `https://cno.to/api/s/${serverNum}/tv/${id}/${s}/${e}`
|
|
17
|
+
: `https://cno.to/api/s/${serverNum}/movie/${id}?v=3`;
|
|
18
|
+
|
|
19
|
+
try {
|
|
20
|
+
const raw = await fetchText(url, { headers });
|
|
21
|
+
if (!raw || raw.includes('"error":')) return null;
|
|
22
|
+
|
|
23
|
+
if (raw.includes('#EXTM3U')) {
|
|
24
|
+
const lines = raw.split('\n');
|
|
25
|
+
let streamUrl = null;
|
|
26
|
+
let quality = 'Auto';
|
|
27
|
+
|
|
28
|
+
for (let i = 0; i < lines.length; i++) {
|
|
29
|
+
const line = lines[i].trim();
|
|
30
|
+
if (line.startsWith('#EXT-X-STREAM-INF:')) {
|
|
31
|
+
const resMatch = line.match(/RESOLUTION=(\d+x\d+)/);
|
|
32
|
+
if (resMatch) quality = resMatch[1];
|
|
33
|
+
const nextLine = lines[i + 1]?.trim();
|
|
34
|
+
if (nextLine && !nextLine.startsWith('#')) {
|
|
35
|
+
streamUrl = nextLine;
|
|
36
|
+
break;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (!streamUrl) {
|
|
42
|
+
for (const line of lines) {
|
|
43
|
+
const trimmed = line.trim();
|
|
44
|
+
if (trimmed && !trimmed.startsWith('#')) {
|
|
45
|
+
streamUrl = trimmed;
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (streamUrl) {
|
|
52
|
+
if (streamUrl.startsWith('/')) {
|
|
53
|
+
streamUrl = `https://cno.to${streamUrl}`;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return {
|
|
57
|
+
url: streamUrl,
|
|
58
|
+
server: `Cno - Server ${serverNum} (${quality})`,
|
|
59
|
+
headers: {
|
|
60
|
+
Referer: 'https://cno.to/',
|
|
61
|
+
Origin: 'https://cno.to'
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
try {
|
|
68
|
+
const json = JSON.parse(raw);
|
|
69
|
+
const jsonUrl = json.url || json.file || json.stream;
|
|
70
|
+
if (jsonUrl && typeof jsonUrl === 'string' && jsonUrl.startsWith('http')) {
|
|
71
|
+
return {
|
|
72
|
+
url: jsonUrl,
|
|
73
|
+
server: `Cno - Server ${serverNum} (${json.quality || 'Auto'})`,
|
|
74
|
+
headers: {
|
|
75
|
+
Referer: 'https://cno.to/',
|
|
76
|
+
Origin: 'https://cno.to'
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
} catch { }
|
|
81
|
+
} catch { }
|
|
82
|
+
return null;
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
const results = await Promise.all(promises);
|
|
86
|
+
const allUrls = results.filter(Boolean);
|
|
87
|
+
|
|
88
|
+
if (!allUrls.length) return null;
|
|
89
|
+
|
|
90
|
+
return {
|
|
91
|
+
url: allUrls[0].url,
|
|
92
|
+
headers: allUrls[0].headers,
|
|
93
|
+
allUrls
|
|
94
|
+
};
|
|
95
|
+
}
|