@vyla-entertainment/sdk 1.12.0 → 1.13.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/package.json +1 -1
- package/src/config.js +7 -230
- package/src/sources/dulo.js +150 -0
- package/src/sources/streamaggregator.js +5 -3
- package/src/sources/4khdhub.js +0 -324
- package/src/sources/cinejoy.js +0 -195
- package/src/sources/cinesrc.js +0 -212
- package/src/sources/cinesu.js +0 -148
- package/src/sources/downloadeverything.js +0 -338
- package/src/sources/frame.js +0 -88
- package/src/sources/fsharetv.js +0 -44
- package/src/sources/fsonic.js +0 -49
- package/src/sources/hexa.js +0 -82
- package/src/sources/luna.js +0 -125
- package/src/sources/meowtv.js +0 -142
- package/src/sources/peestream.js +0 -122
- package/src/sources/vadapav.js +0 -85
- package/src/sources/vidcore.js +0 -43
- package/src/sources/vidfast.js +0 -53
- package/src/sources/vuflix.js +0 -249
package/package.json
CHANGED
package/src/config.js
CHANGED
|
@@ -6,18 +6,6 @@
|
|
|
6
6
|
// Fshare/Fsonic Tested: 155 ( they don't have Michael )
|
|
7
7
|
|
|
8
8
|
export const SOURCES = [
|
|
9
|
-
{
|
|
10
|
-
key: '4khdhub',
|
|
11
|
-
label: '4KHDHub',
|
|
12
|
-
sourceFile: '4khdhub',
|
|
13
|
-
proxyParam: 'khd',
|
|
14
|
-
timeout: 35000,
|
|
15
|
-
jitter: 500,
|
|
16
|
-
retries: 1,
|
|
17
|
-
multiUrl: true,
|
|
18
|
-
skipProxy: true,
|
|
19
|
-
},
|
|
20
|
-
|
|
21
9
|
{
|
|
22
10
|
key: '123anime',
|
|
23
11
|
label: '123Anime',
|
|
@@ -119,72 +107,20 @@ export const SOURCES = [
|
|
|
119
107
|
},
|
|
120
108
|
|
|
121
109
|
{
|
|
122
|
-
key: '
|
|
123
|
-
label: '
|
|
124
|
-
sourceFile: '
|
|
125
|
-
proxyParam: '
|
|
126
|
-
timeout: 30000,
|
|
127
|
-
jitter: 500,
|
|
128
|
-
retries: 1,
|
|
129
|
-
multiUrl: true,
|
|
130
|
-
skipProxy: true,
|
|
131
|
-
},
|
|
132
|
-
|
|
133
|
-
{
|
|
134
|
-
key: 'cinesrc',
|
|
135
|
-
label: 'CineSrc',
|
|
136
|
-
sourceFile: 'cinesrc',
|
|
137
|
-
proxyParam: 'csr',
|
|
110
|
+
key: 'dulo',
|
|
111
|
+
label: 'Dulo',
|
|
112
|
+
sourceFile: 'dulo',
|
|
113
|
+
proxyParam: 'dl',
|
|
138
114
|
timeout: 25000,
|
|
139
115
|
jitter: 500,
|
|
140
116
|
retries: 2,
|
|
141
117
|
multiUrl: true,
|
|
142
118
|
skipProxy: true,
|
|
143
|
-
skipVerify: true,
|
|
144
|
-
cdnHeaders: [{
|
|
145
|
-
pattern: /glendale-plumbing\.com|1embed\.cc|bright\d+\.online/i,
|
|
146
|
-
headers: {
|
|
147
|
-
Referer: 'https://cinesrc.st/',
|
|
148
|
-
Origin: 'https://cinesrc.st',
|
|
149
|
-
},
|
|
150
|
-
}],
|
|
151
|
-
},
|
|
152
|
-
|
|
153
|
-
{
|
|
154
|
-
key: 'cinesu',
|
|
155
|
-
label: 'CineSu',
|
|
156
|
-
sourceFile: 'cinesu',
|
|
157
|
-
proxyParam: 'cs',
|
|
158
|
-
timeout: 25000,
|
|
159
|
-
jitter: 500,
|
|
160
|
-
retries: 2,
|
|
161
|
-
multiUrl: true,
|
|
162
|
-
skipProxy: true,
|
|
163
|
-
skipVerify: true,
|
|
164
|
-
cdnHeaders: [{
|
|
165
|
-
pattern: /glendale-plumbing\.com/i,
|
|
166
|
-
headers: {
|
|
167
|
-
Referer: 'https://cine.su/',
|
|
168
|
-
Origin: 'https://cine.su',
|
|
169
|
-
},
|
|
170
|
-
}],
|
|
171
|
-
},
|
|
172
|
-
|
|
173
|
-
{
|
|
174
|
-
key: 'downloadeverything',
|
|
175
|
-
label: 'DownloadEverything',
|
|
176
|
-
sourceFile: 'downloadeverything',
|
|
177
|
-
proxyParam: 'de',
|
|
178
|
-
timeout: 35000,
|
|
179
|
-
jitter: 500,
|
|
180
|
-
retries: 1,
|
|
181
|
-
multiUrl: true,
|
|
182
|
-
skipProxy: true,
|
|
183
119
|
cdnHeaders: [{
|
|
184
|
-
pattern: /
|
|
120
|
+
pattern: /dulo\.mov/i,
|
|
185
121
|
headers: {
|
|
186
|
-
Referer: 'https://
|
|
187
|
-
Origin: 'https://
|
|
122
|
+
Referer: 'https://dulo.mov/',
|
|
123
|
+
Origin: 'https://dulo.mov',
|
|
188
124
|
},
|
|
189
125
|
}],
|
|
190
126
|
},
|
|
@@ -208,45 +144,6 @@ export const SOURCES = [
|
|
|
208
144
|
},],
|
|
209
145
|
},
|
|
210
146
|
|
|
211
|
-
{
|
|
212
|
-
key: 'frame',
|
|
213
|
-
label: 'Frame',
|
|
214
|
-
sourceFile: 'frame',
|
|
215
|
-
proxyParam: 'fr',
|
|
216
|
-
timeout: 25000,
|
|
217
|
-
jitter: 500,
|
|
218
|
-
retries: 2,
|
|
219
|
-
multiUrl: true,
|
|
220
|
-
skipProxy: true,
|
|
221
|
-
},
|
|
222
|
-
|
|
223
|
-
{
|
|
224
|
-
key: 'fsharetv',
|
|
225
|
-
label: 'FShareTV',
|
|
226
|
-
sourceFile: 'fsharetv',
|
|
227
|
-
proxyParam: 'fs',
|
|
228
|
-
timeout: 25000,
|
|
229
|
-
jitter: 600,
|
|
230
|
-
retries: 2,
|
|
231
|
-
multiUrl: false,
|
|
232
|
-
verifyHeaders: {
|
|
233
|
-
Accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8',
|
|
234
|
-
'Accept-Language': 'en-US,en;q=0.9',
|
|
235
|
-
Referer: 'https://fsharetv.cc',
|
|
236
|
-
},
|
|
237
|
-
},
|
|
238
|
-
|
|
239
|
-
{
|
|
240
|
-
key: 'fsonic',
|
|
241
|
-
label: 'Fsonic',
|
|
242
|
-
sourceFile: 'fsonic',
|
|
243
|
-
proxyParam: 'fn',
|
|
244
|
-
timeout: 35000,
|
|
245
|
-
jitter: 600,
|
|
246
|
-
retries: 1,
|
|
247
|
-
multiUrl: true,
|
|
248
|
-
},
|
|
249
|
-
|
|
250
147
|
{
|
|
251
148
|
key: 'fsonline',
|
|
252
149
|
label: 'FSOnline',
|
|
@@ -259,16 +156,6 @@ export const SOURCES = [
|
|
|
259
156
|
skipProxy: true,
|
|
260
157
|
},
|
|
261
158
|
|
|
262
|
-
{
|
|
263
|
-
key: 'hexa',
|
|
264
|
-
label: 'Hexa',
|
|
265
|
-
sourceFile: 'hexa',
|
|
266
|
-
proxyParam: 'hx',
|
|
267
|
-
timeout: 20000,
|
|
268
|
-
jitter: 500,
|
|
269
|
-
retries: 2,
|
|
270
|
-
},
|
|
271
|
-
|
|
272
159
|
{
|
|
273
160
|
key: 'kisskh',
|
|
274
161
|
label: 'KissKH',
|
|
@@ -304,44 +191,6 @@ export const SOURCES = [
|
|
|
304
191
|
},
|
|
305
192
|
},
|
|
306
193
|
|
|
307
|
-
{
|
|
308
|
-
key: 'luna-sub',
|
|
309
|
-
label: 'Luna (Sub)',
|
|
310
|
-
sourceFile: 'luna',
|
|
311
|
-
proxyParam: 'lusub',
|
|
312
|
-
subtype: 'sub',
|
|
313
|
-
timeout: 25000,
|
|
314
|
-
jitter: 500,
|
|
315
|
-
retries: 2,
|
|
316
|
-
multiUrl: true,
|
|
317
|
-
skipProxy: true,
|
|
318
|
-
},
|
|
319
|
-
|
|
320
|
-
{
|
|
321
|
-
key: 'luna-dub',
|
|
322
|
-
label: 'Luna (Dub)',
|
|
323
|
-
sourceFile: 'luna',
|
|
324
|
-
proxyParam: 'ludub',
|
|
325
|
-
subtype: 'dub',
|
|
326
|
-
timeout: 25000,
|
|
327
|
-
jitter: 500,
|
|
328
|
-
retries: 2,
|
|
329
|
-
multiUrl: true,
|
|
330
|
-
skipProxy: true,
|
|
331
|
-
},
|
|
332
|
-
|
|
333
|
-
{
|
|
334
|
-
key: 'meowtv',
|
|
335
|
-
label: 'MeowTV',
|
|
336
|
-
sourceFile: 'meowtv',
|
|
337
|
-
proxyParam: 'mt',
|
|
338
|
-
timeout: 20000,
|
|
339
|
-
jitter: 500,
|
|
340
|
-
retries: 2,
|
|
341
|
-
multiUrl: true,
|
|
342
|
-
skipProxy: true
|
|
343
|
-
},
|
|
344
|
-
|
|
345
194
|
{
|
|
346
195
|
key: 'movienight',
|
|
347
196
|
label: 'MovieNight',
|
|
@@ -380,18 +229,6 @@ export const SOURCES = [
|
|
|
380
229
|
}],
|
|
381
230
|
},
|
|
382
231
|
|
|
383
|
-
{
|
|
384
|
-
key: 'peestream',
|
|
385
|
-
label: 'PeeStream',
|
|
386
|
-
sourceFile: 'peestream',
|
|
387
|
-
proxyParam: 'pee',
|
|
388
|
-
timeout: 25000,
|
|
389
|
-
jitter: 500,
|
|
390
|
-
retries: 2,
|
|
391
|
-
multiUrl: true,
|
|
392
|
-
skipProxy: true,
|
|
393
|
-
},
|
|
394
|
-
|
|
395
232
|
{
|
|
396
233
|
key: 'pengu',
|
|
397
234
|
label: 'Pengu',
|
|
@@ -456,26 +293,6 @@ export const SOURCES = [
|
|
|
456
293
|
},
|
|
457
294
|
}],
|
|
458
295
|
},
|
|
459
|
-
|
|
460
|
-
{
|
|
461
|
-
key: 'vadapav',
|
|
462
|
-
label: 'Vadapav',
|
|
463
|
-
sourceFile: 'vadapav',
|
|
464
|
-
proxyParam: 'vp',
|
|
465
|
-
timeout: 25000,
|
|
466
|
-
jitter: 500,
|
|
467
|
-
retries: 2,
|
|
468
|
-
multiUrl: true,
|
|
469
|
-
skipProxy: true,
|
|
470
|
-
cdnHeaders: [{
|
|
471
|
-
pattern: /vadapav\.mov/i,
|
|
472
|
-
headers: {
|
|
473
|
-
Referer: 'https://stremio.vadapav.mov/',
|
|
474
|
-
Origin: 'https://stremio.vadapav.mov',
|
|
475
|
-
},
|
|
476
|
-
}],
|
|
477
|
-
},
|
|
478
|
-
|
|
479
296
|
{
|
|
480
297
|
key: 'vidapi',
|
|
481
298
|
label: 'VidAPI',
|
|
@@ -487,27 +304,6 @@ export const SOURCES = [
|
|
|
487
304
|
multiUrl: true
|
|
488
305
|
},
|
|
489
306
|
|
|
490
|
-
{
|
|
491
|
-
key: 'vidcore',
|
|
492
|
-
sourceFile: 'vidcore',
|
|
493
|
-
label: 'Vidcore',
|
|
494
|
-
proxyParam: 'vc',
|
|
495
|
-
timeout: 30000,
|
|
496
|
-
jitter: 500,
|
|
497
|
-
retries: 2,
|
|
498
|
-
sourcesTimeout: 10000,
|
|
499
|
-
},
|
|
500
|
-
|
|
501
|
-
{
|
|
502
|
-
key: 'vidfast',
|
|
503
|
-
label: 'Vidfast',
|
|
504
|
-
sourceFile: 'vidfast',
|
|
505
|
-
proxyParam: 'vf',
|
|
506
|
-
timeout: 35000,
|
|
507
|
-
jitter: 500,
|
|
508
|
-
retries: 1,
|
|
509
|
-
},
|
|
510
|
-
|
|
511
307
|
{
|
|
512
308
|
key: 'vidgod',
|
|
513
309
|
label: 'VidGod',
|
|
@@ -644,25 +440,6 @@ export const SOURCES = [
|
|
|
644
440
|
},
|
|
645
441
|
},
|
|
646
442
|
|
|
647
|
-
{
|
|
648
|
-
key: 'vuflix',
|
|
649
|
-
label: 'Vuflix',
|
|
650
|
-
sourceFile: 'vuflix',
|
|
651
|
-
proxyParam: 'vfx',
|
|
652
|
-
timeout: 25000,
|
|
653
|
-
jitter: 500,
|
|
654
|
-
retries: 2,
|
|
655
|
-
multiUrl: true,
|
|
656
|
-
skipProxy: true,
|
|
657
|
-
cdnHeaders: [{
|
|
658
|
-
pattern: /vuflix\.co/i,
|
|
659
|
-
headers: {
|
|
660
|
-
Referer: 'https://vuflix.co/',
|
|
661
|
-
Origin: 'https://vuflix.co',
|
|
662
|
-
},
|
|
663
|
-
}],
|
|
664
|
-
},
|
|
665
|
-
|
|
666
443
|
{
|
|
667
444
|
key: 'xdownloader',
|
|
668
445
|
label: 'XDownloader',
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { getUA } from '../utils/helpers.js';
|
|
2
|
+
|
|
3
|
+
const BASE_URL = 'https://dulo.mov';
|
|
4
|
+
|
|
5
|
+
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
6
|
+
|
|
7
|
+
async function resolveDetails(sdk, id, isTv) {
|
|
8
|
+
const apiKey = sdk?.tmdbApiKey || process.env.TMDB_API_KEY;
|
|
9
|
+
if (!apiKey) return null;
|
|
10
|
+
const type = isTv ? 'tv' : 'movie';
|
|
11
|
+
try {
|
|
12
|
+
const res = await fetch(`https://api.themoviedb.org/3/${type}/${id}?api_key=${apiKey}`, {
|
|
13
|
+
signal: AbortSignal.timeout(6000),
|
|
14
|
+
});
|
|
15
|
+
if (!res.ok) return null;
|
|
16
|
+
const data = await res.json();
|
|
17
|
+
const title = isTv ? data.name : data.title;
|
|
18
|
+
const releaseDate = isTv ? data.first_air_date : data.release_date;
|
|
19
|
+
const year = releaseDate ? releaseDate.split('-')[0] : '';
|
|
20
|
+
const runtime = isTv ? (data.episode_run_time?.[0] || 24) : (data.runtime || 90);
|
|
21
|
+
return { title, year, runtime };
|
|
22
|
+
} catch {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
async function fetchSource(url, headers) {
|
|
28
|
+
try {
|
|
29
|
+
const res = await fetch(url, {
|
|
30
|
+
headers,
|
|
31
|
+
signal: AbortSignal.timeout(8000),
|
|
32
|
+
});
|
|
33
|
+
if (!res.ok) return null;
|
|
34
|
+
return await res.json();
|
|
35
|
+
} catch {
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export async function getStream({ id, s, e, sdk }) {
|
|
41
|
+
const isTv = Boolean(s && e);
|
|
42
|
+
const mediaType = isTv ? 'tv' : 'movie';
|
|
43
|
+
const ua = getUA();
|
|
44
|
+
|
|
45
|
+
const details = await resolveDetails(sdk, id, isTv);
|
|
46
|
+
const title = details?.title || '';
|
|
47
|
+
const year = details?.year || '';
|
|
48
|
+
const runtime = details?.runtime || '';
|
|
49
|
+
|
|
50
|
+
const referer = isTv
|
|
51
|
+
? `${BASE_URL}/watch/tv/${id}/${s}/${e}`
|
|
52
|
+
: `${BASE_URL}/watch/movie/${id}`;
|
|
53
|
+
|
|
54
|
+
const defaultHeaders = {
|
|
55
|
+
'User-Agent': ua,
|
|
56
|
+
Referer: referer,
|
|
57
|
+
Origin: BASE_URL,
|
|
58
|
+
Accept: '*/*',
|
|
59
|
+
'Sec-Fetch-Dest': 'empty',
|
|
60
|
+
'Sec-Fetch-Mode': 'cors',
|
|
61
|
+
'Sec-Fetch-Site': 'same-origin',
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
const baseParams = new URLSearchParams({
|
|
65
|
+
tmdbId: String(id),
|
|
66
|
+
type: mediaType,
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
const additionalParams = new URLSearchParams({
|
|
70
|
+
tmdbId: String(id),
|
|
71
|
+
type: mediaType,
|
|
72
|
+
progressive: 'true',
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
if (title) additionalParams.set('title', title);
|
|
76
|
+
if (year) additionalParams.set('year', String(year));
|
|
77
|
+
if (runtime) additionalParams.set('runtime', String(runtime));
|
|
78
|
+
|
|
79
|
+
if (isTv) {
|
|
80
|
+
baseParams.set('season', String(s));
|
|
81
|
+
baseParams.set('episode', String(e));
|
|
82
|
+
additionalParams.set('season', String(s));
|
|
83
|
+
additionalParams.set('episode', String(e));
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const endpoints = [
|
|
87
|
+
`${BASE_URL}/api/sources?${baseParams.toString()}`,
|
|
88
|
+
`${BASE_URL}/api/sources/willow?${baseParams.toString()}`,
|
|
89
|
+
`${BASE_URL}/api/sources/additional?${additionalParams.toString()}`,
|
|
90
|
+
];
|
|
91
|
+
|
|
92
|
+
const seenUrls = new Set();
|
|
93
|
+
const allUrls = [];
|
|
94
|
+
|
|
95
|
+
let pendingUrls = [...endpoints];
|
|
96
|
+
const maxPollTime = Date.now() + 16000;
|
|
97
|
+
|
|
98
|
+
while (pendingUrls.length > 0 && Date.now() < maxPollTime) {
|
|
99
|
+
const results = await Promise.all(
|
|
100
|
+
pendingUrls.map((url) => fetchSource(url, defaultHeaders))
|
|
101
|
+
);
|
|
102
|
+
|
|
103
|
+
const nextPending = [];
|
|
104
|
+
|
|
105
|
+
results.forEach((data, index) => {
|
|
106
|
+
if (!data) return;
|
|
107
|
+
|
|
108
|
+
if (Array.isArray(data.sources) && data.sources.length > 0) {
|
|
109
|
+
for (const src of data.sources) {
|
|
110
|
+
let streamUrl = String(src?.url || '').trim();
|
|
111
|
+
if (!streamUrl) continue;
|
|
112
|
+
|
|
113
|
+
if (streamUrl.startsWith('/')) {
|
|
114
|
+
streamUrl = `${BASE_URL}${streamUrl}`;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
if (!streamUrl.startsWith('http') || seenUrls.has(streamUrl)) continue;
|
|
118
|
+
seenUrls.add(streamUrl);
|
|
119
|
+
|
|
120
|
+
allUrls.push({
|
|
121
|
+
url: streamUrl,
|
|
122
|
+
label: src.label || 'Dulo',
|
|
123
|
+
headers: {
|
|
124
|
+
'User-Agent': ua,
|
|
125
|
+
Referer: referer,
|
|
126
|
+
},
|
|
127
|
+
captions: Array.isArray(src.captions) ? src.captions : [],
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
if (data.pending) {
|
|
133
|
+
nextPending.push(pendingUrls[index]);
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
pendingUrls = nextPending;
|
|
138
|
+
if (pendingUrls.length > 0) {
|
|
139
|
+
await sleep(1500);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
if (allUrls.length === 0) return null;
|
|
144
|
+
|
|
145
|
+
return {
|
|
146
|
+
url: allUrls[0].url,
|
|
147
|
+
allUrls,
|
|
148
|
+
headers: allUrls[0].headers,
|
|
149
|
+
};
|
|
150
|
+
}
|
|
@@ -49,9 +49,9 @@ export async function getStream({ id, s, e, sdk }) {
|
|
|
49
49
|
'User-Agent': ua,
|
|
50
50
|
Referer: `${BASE_URL}/`,
|
|
51
51
|
Origin: BASE_URL,
|
|
52
|
-
Accept: 'application/x-ndjson, text/plain, */*',
|
|
52
|
+
Accept: 'text/event-stream, application/x-ndjson, text/plain, */*',
|
|
53
53
|
},
|
|
54
|
-
signal: AbortSignal.timeout(
|
|
54
|
+
signal: AbortSignal.timeout(90000),
|
|
55
55
|
});
|
|
56
56
|
|
|
57
57
|
if (!res.ok) return null;
|
|
@@ -89,7 +89,9 @@ export async function getStream({ id, s, e, sdk }) {
|
|
|
89
89
|
|
|
90
90
|
for (const line of lines) {
|
|
91
91
|
try {
|
|
92
|
-
const
|
|
92
|
+
const raw = line.startsWith('data:') ? line.slice(5).trim() : line;
|
|
93
|
+
if (!raw || raw === '[DONE]') continue;
|
|
94
|
+
const item = JSON.parse(raw);
|
|
93
95
|
const streamUrl = String(item?.url || '').trim();
|
|
94
96
|
if (!streamUrl || !streamUrl.startsWith('http') || seenUrls.has(streamUrl)) continue;
|
|
95
97
|
|