@vyla-entertainment/sdk 1.0.0 → 1.2.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.
Files changed (53) hide show
  1. package/.env.example +1 -0
  2. package/.github/workflows/publish.yml +38 -0
  3. package/.gitlab-ci.yml +22 -0
  4. package/LICENSE +0 -0
  5. package/README.md +13 -26
  6. package/package.json +5 -3
  7. package/src/config.js +63 -77
  8. package/src/downloads/downloads.js +8 -4
  9. package/src/downloads/sources/trendimovies.js +0 -0
  10. package/src/health.js +0 -0
  11. package/src/sdk.d.ts +123 -0
  12. package/src/sdk.js +0 -0
  13. package/src/sources/123anime.js +0 -0
  14. package/src/sources/anihq.js +14 -2
  15. package/src/sources/anineko.js +122 -15
  16. package/src/sources/anipm.js +0 -0
  17. package/src/sources/cinejoy.js +210 -0
  18. package/src/sources/flaxmovies.js +114 -10
  19. package/src/sources/frame.js +88 -0
  20. package/src/sources/fsharetv.js +0 -0
  21. package/src/sources/fsonic.js +2 -2
  22. package/src/sources/fsonline.js +2 -2
  23. package/src/sources/hexa.js +0 -0
  24. package/src/sources/kisskh.js +0 -0
  25. package/src/sources/lmscript.js +43 -0
  26. package/src/sources/lookmovie.js +0 -0
  27. package/src/sources/mapple.js +40 -4
  28. package/src/sources/meowtv.js +1 -9
  29. package/src/sources/peestream.js +122 -0
  30. package/src/sources/pengu.js +0 -0
  31. package/src/sources/purstream.js +0 -0
  32. package/src/sources/vidapi.js +0 -0
  33. package/src/sources/vidcore.js +0 -0
  34. package/src/sources/videasy.js +6 -12
  35. package/src/sources/vidfast.js +0 -0
  36. package/src/sources/vidlink.js +0 -0
  37. package/src/sources/vidnest.js +0 -0
  38. package/src/sources/vidrift.js +0 -0
  39. package/src/sources/vidrock.js +0 -0
  40. package/src/sources/vidsync.js +0 -0
  41. package/src/sources/vidup.js +0 -0
  42. package/src/sources/vidvault.js +114 -0
  43. package/src/sources/vidzee.js +73 -87
  44. package/src/sources/vixsrc.js +28 -14
  45. package/src/sources/xpass.js +0 -0
  46. package/src/subtitles.js +0 -0
  47. package/src/utils/helpers.js +56 -20
  48. package/src/sources/1embed.js +0 -92
  49. package/src/sources/goated.js +0 -262
  50. package/src/sources/nebula.js +0 -62
  51. package/src/sources/nekowatch.js +0 -57
  52. package/src/sources/opstream.js +0 -123
  53. package/src/sources/peachify.js +0 -78
package/.env.example ADDED
@@ -0,0 +1 @@
1
+ TMDB_API_KEY=your_tmdb_api_key_here
@@ -0,0 +1,38 @@
1
+ name: Publish npm package
2
+
3
+ on:
4
+ workflow_dispatch:
5
+
6
+ permissions:
7
+ contents: write
8
+
9
+ jobs:
10
+ publish:
11
+ runs-on: ubuntu-latest
12
+
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ with:
16
+ token: ${{ secrets.GITHUB_TOKEN }}
17
+
18
+ - uses: actions/setup-node@v4
19
+ with:
20
+ node-version: 22
21
+ registry-url: https://registry.npmjs.org/
22
+
23
+ - name: Configure git
24
+ run: |
25
+ git config user.name "github-actions[bot]"
26
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
27
+
28
+ - run: npm ci
29
+
30
+ - name: Bump version
31
+ run: |
32
+ npm version minor
33
+ git push --follow-tags
34
+
35
+ - name: Publish
36
+ run: npm publish
37
+ env:
38
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_KEY }}
package/.gitlab-ci.yml ADDED
@@ -0,0 +1,22 @@
1
+ stages:
2
+ - build
3
+ - test
4
+ - deploy
5
+ - publish
6
+
7
+ publish:
8
+ stage: publish
9
+ image: node:22
10
+ rules:
11
+ - when: manual
12
+ before_script:
13
+ - git config user.name "gitlab-ci"
14
+ - git config user.email "gitlab-ci@$CI_SERVER_HOST"
15
+ - git remote set-url origin "https://oauth2:${GITLAB_PUSH_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git"
16
+ - git checkout "$CI_COMMIT_BRANCH"
17
+ script:
18
+ - npm ci
19
+ - npm version minor
20
+ - git push origin HEAD:"$CI_COMMIT_BRANCH" --follow-tags
21
+ - echo "//registry.npmjs.org/:_authToken=${NPM_KEY}" > .npmrc
22
+ - npm publish
package/LICENSE CHANGED
File without changes
package/README.md CHANGED
@@ -11,34 +11,21 @@ npm install @vyla-entertainment/sdk
11
11
  pnpm install @vyla-entertainment/sdk
12
12
  ```
13
13
 
14
- ## Usage
15
- Start by creating a VylaSDK element with your TMDB api key.
16
- ```js
17
- import VylaSDK from "@vyla-entertainment/sdk";
18
-
19
- const sdk = new VylaSDK({
20
- tmdbApiKey: ...
21
- });
22
- ```
14
+ View our full documentation at https://docs.vyla.cc/sdk
15
+
16
+ # [DMCA](https://docs.vyla.cc/misc/dmca)
17
+
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
+
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.
23
21
 
24
- You can now use this to access Vyla's content.
25
- ```js
26
- // Get sources
27
- // Args: excludeDisabled
28
- sdk.getSources(false); -> {key, timeout, label, ...}[]
22
+ This project is developed and maintained by [Vyla Entertainment](https://github.com/vyla-entertainment) (@vyla-entertainment).
29
23
 
30
- // Get subtitles
31
- // Args: tmdb id, season?, episode?
32
- await sdk.getSubtitles('0000000', null, null); -> {label, file, type, source}[]
24
+ Original work and core authorship:
33
25
 
34
- // Probe & test a source
35
- // Args: source key
36
- await sdk.probeSource('nebula'); -> {ok, ms}
26
+ [@alwaysmesmerizingyou](https://gitlab.com/alwaysmesmerizingyou)
37
27
 
38
- // Probe & test all sources
39
- await sdk.probeAllSources(); -> {'key': {ok, ms}, ...}
28
+ [@GavinGoGaming](https://github.com/GavinGoGaming)
40
29
 
41
- // Get HLS streams
42
- // Args: source key, tmdb id, season?, episode?, clientIP?
43
- await sdk.getStream('nebula', '0000000', null, null, null) -> {allUrls: {url, quality, label, ...}[]}
44
- ```
30
+ Full credits and acknowledgements:
31
+ https://docs.vyla.cc/misc/credit
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vyla-entertainment/sdk",
3
- "version": "1.0.0",
3
+ "version": "1.2.0",
4
4
  "scripts": {
5
5
  "test": "node test/index.js"
6
6
  },
@@ -11,13 +11,15 @@
11
11
  "email": "gavin@klash.dev"
12
12
  },
13
13
  {
14
- "name": "EndOverdosing"
14
+ "name": "alwaysmesmerizingyou",
15
+ "email": "alwaysmesmerizingyou@gmail.com"
15
16
  }
16
17
  ],
17
18
  "license": "CC-BY-NC-4.0",
18
19
  "type": "module",
19
20
  "description": "Vyla's multi-provider stream scraper SDK",
20
21
  "main": "src/sdk.js",
22
+ "types": "src/sdk.d.ts",
21
23
  "directories": {
22
24
  "test": "test"
23
25
  },
@@ -28,4 +30,4 @@
28
30
  "publishConfig": {
29
31
  "access": "public"
30
32
  }
31
- }
33
+ }
package/src/config.js CHANGED
@@ -1,15 +1,11 @@
1
- export const SOURCES = [
2
- {
3
- key: '1embed',
4
- label: '1Embed',
5
- sourceFile: '1embed',
6
- proxyParam: '1e',
7
- timeout: 20000,
8
- jitter: 500,
9
- retries: 2,
10
- multiUrl: true,
11
- },
1
+ // Currently active sources reported on 9:22:41 PM PST 7/30/2026
2
+
3
+ // None Anime Tested: 936075
4
+ // Anime Tested: 37854
5
+
6
+ // Fshare/Fsonic Tested: 155 ( they don't have Michael )
12
7
 
8
+ export const SOURCES = [
13
9
  {
14
10
  key: '123anime',
15
11
  label: '123Anime',
@@ -107,6 +103,18 @@ export const SOURCES = [
107
103
  },
108
104
  },
109
105
 
106
+ {
107
+ key: 'cinejoy',
108
+ label: 'Cinejoy',
109
+ sourceFile: 'cinejoy',
110
+ proxyParam: 'cj',
111
+ timeout: 30000,
112
+ jitter: 500,
113
+ retries: 1,
114
+ multiUrl: true,
115
+ skipProxy: true,
116
+ },
117
+
110
118
  {
111
119
  key: 'flaxmovies',
112
120
  label: 'FlaxMovies',
@@ -116,7 +124,7 @@ export const SOURCES = [
116
124
  jitter: 500,
117
125
  retries: 2,
118
126
  multiUrl: true,
119
- disabled: true, // Temporarily disabled because their site is down, all streams are returning 403's
127
+ skipProxy: true,
120
128
  cdnHeaders: [{
121
129
  pattern: /flix2watch\.pro/i,
122
130
  headers: {
@@ -126,6 +134,18 @@ export const SOURCES = [
126
134
  },],
127
135
  },
128
136
 
137
+ {
138
+ key: 'frame',
139
+ label: 'Frame',
140
+ sourceFile: 'frame',
141
+ proxyParam: 'fr',
142
+ timeout: 25000,
143
+ jitter: 500,
144
+ retries: 2,
145
+ multiUrl: true,
146
+ skipProxy: true,
147
+ },
148
+
129
149
  {
130
150
  key: 'fsharetv',
131
151
  label: 'FShareTV',
@@ -142,18 +162,6 @@ export const SOURCES = [
142
162
  },
143
163
  },
144
164
 
145
- {
146
- key: 'goated',
147
- label: 'Goated',
148
- sourceFile: 'goated',
149
- proxyParam: 'gt',
150
- timeout: 25000,
151
- jitter: 500,
152
- retries: 2,
153
- multiUrl: true,
154
- skipProxy: true,
155
- },
156
-
157
165
  {
158
166
  key: 'fsonic',
159
167
  label: 'Fsonic',
@@ -197,6 +205,17 @@ export const SOURCES = [
197
205
  retries: 1,
198
206
  },
199
207
 
208
+ {
209
+ key: 'lmscript',
210
+ label: 'LMScript',
211
+ sourceFile: 'lmscript',
212
+ proxyParam: 'lmsc',
213
+ timeout: 20000,
214
+ jitter: 500,
215
+ retries: 2,
216
+ multiUrl: true,
217
+ },
218
+
200
219
  {
201
220
  key: 'lookmovie',
202
221
  label: 'LookMovie',
@@ -234,62 +253,15 @@ export const SOURCES = [
234
253
  },
235
254
 
236
255
  {
237
- key: 'nebula',
238
- label: 'Nebula',
239
- sourceFile: 'nebula',
240
- proxyParam: 'nb',
256
+ key: 'peestream',
257
+ label: 'PeeStream',
258
+ sourceFile: 'peestream',
259
+ proxyParam: 'pee',
241
260
  timeout: 25000,
242
261
  jitter: 500,
243
- retries: 1,
244
- multiUrl: true,
245
- skipProxy: true,
246
- },
247
-
248
- {
249
- key: 'nekowatch-sub',
250
- sourceFile: 'nekowatch',
251
- label: 'NekoWatch (Sub)',
252
- proxyParam: 'nwsub',
253
- timeout: 30000,
254
- jitter: 500,
255
- retries: 2
256
- },
257
-
258
- {
259
- key: 'nekowatch-dub',
260
- sourceFile: 'nekowatch',
261
- label: 'NekoWatch (Dub)',
262
- proxyParam: 'nwdub',
263
- timeout: 30000,
264
- jitter: 500,
265
- retries: 2
266
- },
267
-
268
- {
269
- key: 'opstream',
270
- label: 'OpStream',
271
- sourceFile: 'opstream',
272
- proxyParam: 'op',
273
- timeout: 35000,
274
- jitter: 500,
275
262
  retries: 2,
276
263
  multiUrl: true,
277
264
  skipProxy: true,
278
- verifyHeaders: {
279
- Referer: 'https://opstream.fun/',
280
- Origin: 'https://opstream.fun',
281
- },
282
- },
283
-
284
- {
285
- key: 'peachify',
286
- label: 'Peachify',
287
- sourceFile: 'peachify',
288
- proxyParam: 'pf',
289
- timeout: 30000,
290
- jitter: 500,
291
- retries: 1,
292
- multiUrl: true
293
265
  },
294
266
 
295
267
  {
@@ -313,6 +285,7 @@ export const SOURCES = [
313
285
  timeout: 20000,
314
286
  jitter: 500,
315
287
  retries: 2,
288
+ skipProxy: true
316
289
  },
317
290
 
318
291
  {
@@ -421,7 +394,8 @@ export const SOURCES = [
421
394
  jitter: 500,
422
395
  retries: 2,
423
396
  multiUrl: true,
424
- skipProxy: true
397
+ skipProxy: true,
398
+ disabled: true, // Temporarily disabled because their site is down, embed website does not load
425
399
  },
426
400
 
427
401
  {
@@ -466,6 +440,17 @@ export const SOURCES = [
466
440
  multiUrl: true
467
441
  },
468
442
 
443
+ {
444
+ key: 'vidvault',
445
+ label: 'VidVault',
446
+ sourceFile: 'vidvault',
447
+ proxyParam: 'vv',
448
+ timeout: 25000,
449
+ jitter: 500,
450
+ retries: 2,
451
+ multiUrl: true,
452
+ },
453
+
469
454
  {
470
455
  key: 'vidzee',
471
456
  label: 'VidZee',
@@ -475,13 +460,13 @@ export const SOURCES = [
475
460
  sourcesTimeout: 10000,
476
461
  jitter: 400,
477
462
  retries: 3,
478
- disabled: true, // Temporarily disabled because their site is down, all streams are returning 403's
479
463
  verifyHeaders: {
480
464
  Accept: '/',
481
465
  'Accept-Language': 'en-US,en;q=0.9',
482
466
  Referer: 'https://player.vidzee.wtf',
483
467
  Origin: 'https://player.vidzee.wtf',
484
468
  },
469
+ disabled: true // Disabled temporarily due to decryption issues
485
470
  },
486
471
 
487
472
  {
@@ -512,6 +497,7 @@ export const SOURCES = [
512
497
  retries: 2,
513
498
  skipProxy: true,
514
499
  },
500
+
515
501
  ];
516
502
 
517
503
  export const HEALTH_PROBE_ID = '155';
@@ -1,8 +1,12 @@
1
1
  import { getDownloads, getDownloadsTv } from "./sources/trendimovies.js";
2
2
 
3
3
  export async function fetchDownloads(id, s = null, e = null) {
4
- const res = s != null && e != null
5
- ? await getDownloadsTv(id, s, e)
6
- : await getDownloads(id);
7
- return res;
4
+ try {
5
+ const res = s != null && e != null
6
+ ? await getDownloadsTv(id, s, e)
7
+ : await getDownloads(id);
8
+ return res || [];
9
+ } catch {
10
+ return [];
11
+ }
8
12
  }
File without changes
package/src/health.js CHANGED
File without changes
package/src/sdk.d.ts ADDED
@@ -0,0 +1,123 @@
1
+ export interface SourceConfig {
2
+ key: string;
3
+ label: string;
4
+ sourceFile: string;
5
+ proxyParam: string;
6
+ timeout: number;
7
+ jitter: number;
8
+ retries: number;
9
+ multiUrl: boolean;
10
+ skipProxy?: boolean;
11
+ cdnHeaders?: {
12
+ pattern: RegExp;
13
+ headers: {
14
+ Referer: string;
15
+ Origin: string;
16
+ };
17
+ }[];
18
+ skipVerify?: boolean;
19
+ verifyHeaders?: boolean;
20
+ disabled?: boolean;
21
+ sourcesTimeout?: number;
22
+ }
23
+ export interface ProbeResult {
24
+ ok: boolean;
25
+ ms: number | null;
26
+ }
27
+ export interface StreamResult {
28
+ url: string;
29
+ headers: {
30
+ "User-Agent": string;
31
+ Referer: string;
32
+ Origin: string;
33
+ [key: string]: string;
34
+ };
35
+ server: string;
36
+ quality: string;
37
+ type: "mp4" | "hls";
38
+ skipVerify?: boolean;
39
+ skipProxy?: boolean;
40
+ }
41
+
42
+ export interface DownloadResult {
43
+ url: string;
44
+ quality: string;
45
+ size: number | null;
46
+ type: "mkv";
47
+ active: boolean;
48
+ }
49
+ export interface SubtitleResult {
50
+ label: string;
51
+ file: string;
52
+ type: "vtt" | "srt";
53
+ source: string;
54
+ }
55
+
56
+ export type ProbeAllResult = Record<string, ProbeResult>;
57
+
58
+ export interface VylaSDKOptions {
59
+ tmdbApiKey?: string;
60
+ }
61
+
62
+ // Descriptions written with Claude.
63
+ export default class VylaSDK {
64
+ tmdbApiKey?: string;
65
+
66
+ constructor(options?: VylaSDKOptions);
67
+
68
+ /**
69
+ * Get the list of configured sources.
70
+ * @param excludeDisabled If true, filters out disabled sources.
71
+ */
72
+ getSources(excludeDisabled?: boolean): SourceConfig[];
73
+
74
+ /**
75
+ * Probe all active (non-disabled) sources for availability.
76
+ */
77
+ probeAllSources(): Promise<ProbeAllResult>;
78
+
79
+ /**
80
+ * Probe a single source by key.
81
+ */
82
+ probeSource(key: string): Promise<ProbeResult>;
83
+
84
+ /**
85
+ * Get a playable stream for a given source/media id.
86
+ * @param key Source key
87
+ * @param id Media id (e.g. TMDB id)
88
+ * @param s Season number (for TV), or null for movies
89
+ * @param e Episode number (for TV), or null for movies
90
+ * @param clientIP Optional client IP for source-specific logic
91
+ */
92
+ getStream(
93
+ key: string,
94
+ id: string | number,
95
+ s?: number | null,
96
+ e?: number | null,
97
+ clientIP?: string | null
98
+ ): Promise<StreamResult | { allUrls: StreamResult[] }>;
99
+
100
+ /**
101
+ * Get subtitles for a movie or TV episode.
102
+ * @param id Media id
103
+ * @param s Season number (for TV), or null for movies
104
+ * @param e Episode number (for TV), or null for movies
105
+ */
106
+ getSubtitles(
107
+ id: string | number,
108
+ s?: number | null,
109
+ e?: number | null
110
+ ): Promise<SubtitleResult[]>;
111
+
112
+ /**
113
+ * Get download links for a movie or TV episode.
114
+ * @param id Media id
115
+ * @param s Season number (for TV), or null for movies
116
+ * @param e Episode number (for TV), or null for movies
117
+ */
118
+ getDownloads(
119
+ id: string | number,
120
+ s?: number | null,
121
+ e?: number | null
122
+ ): Promise<DownloadResult[]>;
123
+ }
package/src/sdk.js CHANGED
File without changes
File without changes
@@ -2,15 +2,27 @@ import { getTmdbInfo, USER_AGENT } from '../utils/helpers.js';
2
2
 
3
3
  async function extractVoe(voeUrl) {
4
4
  try {
5
- const res = await fetch(voeUrl, {
5
+ let res = await fetch(voeUrl, {
6
6
  headers: {
7
7
  'User-Agent': USER_AGENT,
8
8
  'Referer': 'https://anihq.cc/'
9
9
  }
10
10
  });
11
11
 
12
+ let html = await res.text();
13
+
14
+ const redirectMatch = html.match(/window\.location\.href\s*=\s*['"](https?:\/\/[^'"]+)['"]/);
15
+ if (redirectMatch) {
16
+ res = await fetch(redirectMatch[1], {
17
+ headers: {
18
+ 'User-Agent': USER_AGENT,
19
+ 'Referer': 'https://anihq.cc/'
20
+ }
21
+ });
22
+ html = await res.text();
23
+ }
24
+
12
25
  const mirrorUrl = res.url;
13
- const html = await res.text();
14
26
 
15
27
  const scriptMatch = html.match(/<script type="application\/json">\["(.*?)"\]<\/script>/);
16
28
  if (!scriptMatch) return null;