@vyla-entertainment/sdk 1.18.0 → 1.19.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 CHANGED
@@ -1,5 +1,5 @@
1
- # vyla/sdk
2
- VylaSDK is a javascript base version of [Vyla](https://vyla.mintlify.app/)'s stream & scrape api, allowing developers to access content providers directly without using a REST api. This gives you the power & updates of Vyla without the headaches of api keys & server reliability.
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://docs.vyla.cc/misc/dmca)
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://github.com/vyla-entertainment) (@vyla-entertainment).
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://docs.vyla.cc/misc/credit
31
+ https://vyla.cc/misc/project/credit
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vyla-entertainment/sdk",
3
- "version": "1.18.0",
3
+ "version": "1.19.0",
4
4
  "scripts": {
5
5
  "test": "node test/index.js"
6
6
  },
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,18 @@ export const SOURCES = [
217
173
  label: 'FlaxMovies',
218
174
  sourceFile: 'flaxmovies',
219
175
  proxyParam: 'fx',
220
- timeout: 20000,
176
+ timeout: 25000,
221
177
  jitter: 500,
222
178
  retries: 2,
223
179
  multiUrl: true,
224
180
  skipProxy: true,
225
181
  cdnHeaders: [{
226
- pattern: /flix2watch\.pro/i,
182
+ pattern: /themoviebox\.uk|vidrock\.|orbitingdreams\.xyz|fastcloud\.live|deton444eik\.com/i,
227
183
  headers: {
228
- Referer: 'https://flaxmovies.xyz/',
229
- Origin: 'https://flaxmovies.xyz',
184
+ Referer: 'https://themoviebox.uk/',
185
+ Origin: 'https://themoviebox.uk',
230
186
  },
231
- },],
187
+ }],
232
188
  },
233
189
 
234
190
  {
@@ -262,6 +218,25 @@ export const SOURCES = [
262
218
  }],
263
219
  },
264
220
 
221
+ {
222
+ key: 'kickassanime',
223
+ label: 'KickAssAnime',
224
+ sourceFile: 'kickassanime',
225
+ proxyParam: 'kaa',
226
+ timeout: 25000,
227
+ jitter: 500,
228
+ retries: 2,
229
+ multiUrl: true,
230
+ skipProxy: true,
231
+ cdnHeaders: [{
232
+ pattern: /krussdomi\.com/i,
233
+ headers: {
234
+ Referer: 'https://kaa.lt/',
235
+ Origin: 'https://kaa.lt',
236
+ },
237
+ }],
238
+ },
239
+
265
240
  {
266
241
  key: 'hyper',
267
242
  label: 'Hyper',
@@ -334,25 +309,6 @@ export const SOURCES = [
334
309
  }],
335
310
  },
336
311
 
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
312
  {
357
313
  key: 'movy',
358
314
  label: 'Movy',
@@ -364,29 +320,29 @@ export const SOURCES = [
364
320
  multiUrl: true,
365
321
  skipProxy: true,
366
322
  cdnHeaders: [{
367
- pattern: /wecollege\.net|movy\.bz/i,
323
+ pattern: /wecollege\.net|movy\.sx|goldenkite\.top/i,
368
324
  headers: {
369
- Referer: 'https://www.movy.bz/',
370
- Origin: 'https://www.movy.bz',
325
+ Referer: 'https://www.movy.sx/',
326
+ Origin: 'https://www.movy.sx',
371
327
  },
372
328
  }],
373
329
  },
374
330
 
375
331
  {
376
- key: 'peestream',
377
- label: 'PeeStream',
378
- sourceFile: 'peestream',
379
- proxyParam: 'pee',
332
+ key: 'net79',
333
+ label: 'Net79',
334
+ sourceFile: 'net79',
335
+ proxyParam: 'n79',
380
336
  timeout: 25000,
381
337
  jitter: 500,
382
338
  retries: 2,
383
339
  multiUrl: true,
384
340
  skipProxy: true,
385
341
  cdnHeaders: [{
386
- pattern: /peestream\.in/i,
342
+ pattern: /hakunaymatata\.com/i,
387
343
  headers: {
388
- Referer: 'https://peestream.in/',
389
- Origin: 'https://peestream.in',
344
+ Referer: 'https://net79.cc/',
345
+ Origin: 'https://net79.cc',
390
346
  },
391
347
  }],
392
348
  },
@@ -437,6 +393,24 @@ export const SOURCES = [
437
393
  multiUrl: true,
438
394
  },
439
395
 
396
+ {
397
+ key: 'rivo',
398
+ label: 'Rivo',
399
+ sourceFile: 'rivo',
400
+ proxyParam: 'rv',
401
+ timeout: 25000,
402
+ jitter: 500,
403
+ retries: 2,
404
+ multiUrl: true,
405
+ cdnHeaders: [{
406
+ pattern: /rivo\.st/i,
407
+ headers: {
408
+ Referer: 'https://f.rivo.st/',
409
+ Origin: 'https://f.rivo.st',
410
+ },
411
+ }],
412
+ },
413
+
440
414
  {
441
415
  key: 'streamaggregator',
442
416
  label: 'StreamAggregator',
@@ -467,7 +441,7 @@ export const SOURCES = [
467
441
  multiUrl: true,
468
442
  skipProxy: true,
469
443
  cdnHeaders: [{
470
- pattern: /thugtv\.online|thuktv\.onrender\.com/i,
444
+ pattern: /thugtv\.online|fcxmb\.com|hscow\.com/i,
471
445
  headers: {
472
446
  Referer: 'https://thugtv.online/',
473
447
  Origin: 'https://thugtv.online',
@@ -508,15 +482,22 @@ export const SOURCES = [
508
482
  },
509
483
 
510
484
  {
511
- key: 'vidgod',
512
- label: 'VidGod',
513
- sourceFile: 'vidgod',
514
- proxyParam: 'vg',
485
+ key: 'vidora',
486
+ label: 'Vidora',
487
+ sourceFile: 'vidora',
488
+ proxyParam: 'vdra',
515
489
  timeout: 25000,
516
490
  jitter: 500,
517
491
  retries: 2,
518
492
  multiUrl: true,
519
493
  skipProxy: true,
494
+ cdnHeaders: [{
495
+ pattern: /rousav\.tech|vidbolt\.xyz|vidrift\.in|goldenkite\.top|ravok\.buzz/i,
496
+ headers: {
497
+ Referer: 'https://vidora-3l2w.onrender.com/',
498
+ Origin: 'https://vidora-3l2w.onrender.com',
499
+ },
500
+ }],
520
501
  },
521
502
 
522
503
  {
@@ -531,41 +512,6 @@ export const SOURCES = [
531
512
  multiUrl: true,
532
513
  },
533
514
 
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
515
  {
570
516
  key: 'vidrock',
571
517
  label: 'VidRock',
@@ -681,6 +627,25 @@ export const SOURCES = [
681
627
  }],
682
628
  },
683
629
 
630
+ {
631
+ key: 'yapgrid',
632
+ label: 'YapGrid',
633
+ sourceFile: 'yapgrid',
634
+ proxyParam: 'yap',
635
+ timeout: 25000,
636
+ jitter: 500,
637
+ retries: 2,
638
+ multiUrl: true,
639
+ skipProxy: true,
640
+ cdnHeaders: [{
641
+ pattern: /yapgrid\.com|embedwave\.cc/i,
642
+ headers: {
643
+ Referer: 'https://yapgrid.com/',
644
+ Origin: 'https://yapgrid.com',
645
+ },
646
+ }],
647
+ },
648
+
684
649
  {
685
650
  key: 'yastream',
686
651
  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
+ }