@vyla-entertainment/sdk 1.19.0 → 1.21.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 +3 -2
- package/src/config.js +46 -85
- package/src/sdk.d.ts +94 -121
- package/src/sdk.js +82 -78
- package/src/sources/111477.js +88 -100
- package/src/sources/123anime.js +120 -56
- package/src/sources/3eyedraven.js +82 -135
- package/src/sources/cinecat.js +37 -18
- package/src/sources/cinemaarmy.js +179 -180
- package/src/sources/cinesrc.js +401 -397
- package/src/sources/cno.js +101 -94
- package/src/sources/dulo.js +134 -149
- package/src/sources/flaxmovies.js +114 -105
- package/src/sources/frost.js +39 -0
- package/src/sources/fsonline.js +95 -47
- package/src/sources/hdhub.js +43 -0
- package/src/sources/hexa.js +60 -53
- package/src/sources/hyper.js +42 -35
- package/src/sources/kickassanime.js +117 -124
- package/src/sources/kisskh.js +114 -59
- package/src/sources/lmscript.js +72 -70
- package/src/sources/lookmovie.js +80 -79
- package/src/sources/movenerds.js +74 -124
- package/src/sources/movy.js +197 -209
- package/src/sources/net79.js +59 -55
- package/src/sources/peestream.js +126 -138
- package/src/sources/pengu.js +46 -49
- package/src/sources/pstream.js +73 -67
- package/src/sources/purstream.js +96 -104
- package/src/sources/rivestream.js +182 -176
- package/src/sources/rivo.js +58 -53
- package/src/sources/streamaggregator.js +114 -128
- package/src/sources/thugtv.js +70 -62
- package/src/sources/vidapi.js +122 -114
- package/src/sources/vidcore.js +14 -122
- package/src/sources/vidfast.js +14 -122
- package/src/sources/vidlink.js +78 -27
- package/src/sources/vidup.js +14 -122
- package/src/sources/vidvault.js +133 -187
- package/src/sources/vidy.js +192 -187
- package/src/sources/vidzee.js +189 -183
- package/src/sources/vixsrc.js +123 -113
- package/src/sources/watchout.js +60 -0
- package/src/sources/xdownloader.js +127 -128
- package/src/sources/yapgrid.js +68 -62
- package/src/sources/yastream.js +35 -29
- package/src/subtitles.js +105 -122
- package/src/utils/helpers.js +586 -230
- package/src/sources/bcine.js +0 -202
- package/src/sources/cinezo.js +0 -55
- package/src/sources/vidora.js +0 -62
- package/src/sources/vidrock.js +0 -145
package/src/sources/cno.js
CHANGED
|
@@ -1,95 +1,102 @@
|
|
|
1
|
-
import { fetchText } from '../utils/helpers.js';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
1
|
+
import { fetchText } from '../utils/helpers.js';
|
|
2
|
+
|
|
3
|
+
const BASE_URL = 'https://cno.to';
|
|
4
|
+
|
|
5
|
+
export async function getStream(args) {
|
|
6
|
+
const { id, s, e } = args || {};
|
|
7
|
+
const isTv = s != null && e != null;
|
|
8
|
+
const serverIndices = Array.from({ length: 50 }, (_, i) => i + 1);
|
|
9
|
+
|
|
10
|
+
const headers = {
|
|
11
|
+
Accept: 'application/json, text/plain, */*',
|
|
12
|
+
Referer: `${BASE_URL}/`,
|
|
13
|
+
Origin: BASE_URL,
|
|
14
|
+
'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',
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const promises = serverIndices.map(async (serverNum) => {
|
|
18
|
+
const url = isTv
|
|
19
|
+
? `${BASE_URL}/api/s/${serverNum}/tv/${id}/${s}/${e}`
|
|
20
|
+
: `${BASE_URL}/api/s/${serverNum}/movie/${id}?v=3`;
|
|
21
|
+
|
|
22
|
+
try {
|
|
23
|
+
const raw = await fetchText(url, { headers });
|
|
24
|
+
if (!raw || raw.includes('"error":')) return null;
|
|
25
|
+
|
|
26
|
+
if (raw.includes('#EXTM3U')) {
|
|
27
|
+
const lines = raw.split('\n');
|
|
28
|
+
let streamUrl = null;
|
|
29
|
+
let quality = 'Auto';
|
|
30
|
+
|
|
31
|
+
for (let i = 0; i < lines.length; i++) {
|
|
32
|
+
const line = lines[i].trim();
|
|
33
|
+
if (line.startsWith('#EXT-X-STREAM-INF:')) {
|
|
34
|
+
const resMatch = line.match(/RESOLUTION=(\d+x\d+)/);
|
|
35
|
+
if (resMatch) quality = resMatch[1];
|
|
36
|
+
const nextLine = lines[i + 1]?.trim();
|
|
37
|
+
if (nextLine && !nextLine.startsWith('#')) {
|
|
38
|
+
streamUrl = nextLine;
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
if (!streamUrl) {
|
|
45
|
+
for (const line of lines) {
|
|
46
|
+
const trimmed = line.trim();
|
|
47
|
+
if (trimmed && !trimmed.startsWith('#')) {
|
|
48
|
+
streamUrl = trimmed;
|
|
49
|
+
break;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
if (streamUrl) {
|
|
55
|
+
if (streamUrl.startsWith('/')) {
|
|
56
|
+
streamUrl = `${BASE_URL}${streamUrl}`;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return {
|
|
60
|
+
url: streamUrl,
|
|
61
|
+
server: `Cno - Server ${serverNum} (${quality})`,
|
|
62
|
+
quality,
|
|
63
|
+
type: 'hls',
|
|
64
|
+
headers: {
|
|
65
|
+
Referer: `${BASE_URL}/`,
|
|
66
|
+
Origin: BASE_URL,
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
try {
|
|
73
|
+
const json = JSON.parse(raw);
|
|
74
|
+
const jsonUrl = json.url || json.file || json.stream;
|
|
75
|
+
if (jsonUrl && typeof jsonUrl === 'string' && jsonUrl.startsWith('http')) {
|
|
76
|
+
return {
|
|
77
|
+
url: jsonUrl,
|
|
78
|
+
server: `Cno - Server ${serverNum} (${json.quality || 'Auto'})`,
|
|
79
|
+
quality: json.quality || 'Auto',
|
|
80
|
+
type: jsonUrl.includes('.m3u8') ? 'hls' : 'mp4',
|
|
81
|
+
headers: {
|
|
82
|
+
Referer: `${BASE_URL}/`,
|
|
83
|
+
Origin: BASE_URL,
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
} catch { }
|
|
88
|
+
} catch { }
|
|
89
|
+
return null;
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
const results = await Promise.all(promises);
|
|
93
|
+
const allUrls = results.filter(Boolean);
|
|
94
|
+
|
|
95
|
+
if (!allUrls.length) return null;
|
|
96
|
+
|
|
97
|
+
return {
|
|
98
|
+
url: allUrls[0].url,
|
|
99
|
+
headers: allUrls[0].headers,
|
|
100
|
+
allUrls,
|
|
101
|
+
};
|
|
95
102
|
}
|
package/src/sources/dulo.js
CHANGED
|
@@ -1,150 +1,135 @@
|
|
|
1
|
-
import { getUA } from '../utils/helpers.js';
|
|
2
|
-
|
|
3
|
-
const BASE_URL = 'https://dulo.mov';
|
|
4
|
-
|
|
5
|
-
const sleep =
|
|
6
|
-
|
|
7
|
-
async function
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
:
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
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
|
-
};
|
|
1
|
+
import { getTmdbMetadata, getUA, resolveTmdbKey } 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 fetchSource(url, headers) {
|
|
8
|
+
try {
|
|
9
|
+
const res = await fetch(url, {
|
|
10
|
+
headers,
|
|
11
|
+
signal: AbortSignal.timeout(8000),
|
|
12
|
+
});
|
|
13
|
+
if (!res.ok) return null;
|
|
14
|
+
return await res.json();
|
|
15
|
+
} catch {
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export async function getStream(args) {
|
|
21
|
+
const { id, s, e, sdk } = args || {};
|
|
22
|
+
const isTv = s != null && e != null;
|
|
23
|
+
const mediaType = isTv ? 'tv' : 'movie';
|
|
24
|
+
const apiKey = resolveTmdbKey(args, sdk);
|
|
25
|
+
const ua = getUA();
|
|
26
|
+
|
|
27
|
+
const meta = await getTmdbMetadata(id, isTv, apiKey);
|
|
28
|
+
const title = meta?.title || '';
|
|
29
|
+
const year = meta?.year || '';
|
|
30
|
+
const runtime = meta?.runtime || '';
|
|
31
|
+
|
|
32
|
+
const referer = isTv
|
|
33
|
+
? `${BASE_URL}/watch/tv/${id}/${s}/${e}`
|
|
34
|
+
: `${BASE_URL}/watch/movie/${id}`;
|
|
35
|
+
|
|
36
|
+
const defaultHeaders = {
|
|
37
|
+
'User-Agent': ua,
|
|
38
|
+
Referer: referer,
|
|
39
|
+
Origin: BASE_URL,
|
|
40
|
+
Accept: '*/*',
|
|
41
|
+
'Sec-Fetch-Dest': 'empty',
|
|
42
|
+
'Sec-Fetch-Mode': 'cors',
|
|
43
|
+
'Sec-Fetch-Site': 'same-origin',
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const baseParams = new URLSearchParams({
|
|
47
|
+
tmdbId: String(id),
|
|
48
|
+
type: mediaType,
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
const additionalParams = new URLSearchParams({
|
|
52
|
+
tmdbId: String(id),
|
|
53
|
+
type: mediaType,
|
|
54
|
+
progressive: 'true',
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
if (title) additionalParams.set('title', title);
|
|
58
|
+
if (year) additionalParams.set('year', String(year));
|
|
59
|
+
if (runtime) additionalParams.set('runtime', String(runtime));
|
|
60
|
+
|
|
61
|
+
if (isTv) {
|
|
62
|
+
baseParams.set('season', String(s));
|
|
63
|
+
baseParams.set('episode', String(e));
|
|
64
|
+
additionalParams.set('season', String(s));
|
|
65
|
+
additionalParams.set('episode', String(e));
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const endpoints = [
|
|
69
|
+
`${BASE_URL}/api/sources?${baseParams.toString()}`,
|
|
70
|
+
`${BASE_URL}/api/sources/willow?${baseParams.toString()}`,
|
|
71
|
+
`${BASE_URL}/api/sources/additional?${additionalParams.toString()}`,
|
|
72
|
+
];
|
|
73
|
+
|
|
74
|
+
const seenUrls = new Set();
|
|
75
|
+
const allUrls = [];
|
|
76
|
+
|
|
77
|
+
let pendingUrls = [...endpoints];
|
|
78
|
+
const maxPollTime = Date.now() + 16000;
|
|
79
|
+
|
|
80
|
+
while (pendingUrls.length > 0 && Date.now() < maxPollTime) {
|
|
81
|
+
const results = await Promise.all(
|
|
82
|
+
pendingUrls.map(url => fetchSource(url, defaultHeaders))
|
|
83
|
+
);
|
|
84
|
+
|
|
85
|
+
const nextPending = [];
|
|
86
|
+
|
|
87
|
+
results.forEach((data, index) => {
|
|
88
|
+
if (!data) return;
|
|
89
|
+
|
|
90
|
+
if (Array.isArray(data.sources) && data.sources.length > 0) {
|
|
91
|
+
for (const src of data.sources) {
|
|
92
|
+
let streamUrl = String(src?.url || '').trim();
|
|
93
|
+
if (!streamUrl) continue;
|
|
94
|
+
|
|
95
|
+
if (streamUrl.startsWith('/')) {
|
|
96
|
+
streamUrl = `${BASE_URL}${streamUrl}`;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
if (!streamUrl.startsWith('http') || seenUrls.has(streamUrl)) continue;
|
|
100
|
+
seenUrls.add(streamUrl);
|
|
101
|
+
|
|
102
|
+
allUrls.push({
|
|
103
|
+
url: streamUrl,
|
|
104
|
+
server: src.label || 'Dulo',
|
|
105
|
+
label: src.label || 'Dulo',
|
|
106
|
+
quality: 'Auto',
|
|
107
|
+
type: streamUrl.includes('.m3u8') ? 'hls' : 'mp4',
|
|
108
|
+
headers: {
|
|
109
|
+
'User-Agent': ua,
|
|
110
|
+
Referer: referer,
|
|
111
|
+
},
|
|
112
|
+
captions: Array.isArray(src.captions) ? src.captions : [],
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
if (data.pending) {
|
|
118
|
+
nextPending.push(pendingUrls[index]);
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
pendingUrls = nextPending;
|
|
123
|
+
if (pendingUrls.length > 0) {
|
|
124
|
+
await sleep(1500);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
if (allUrls.length === 0) return null;
|
|
129
|
+
|
|
130
|
+
return {
|
|
131
|
+
url: allUrls[0].url,
|
|
132
|
+
headers: allUrls[0].headers,
|
|
133
|
+
allUrls,
|
|
134
|
+
};
|
|
150
135
|
}
|