react-native-consumet 1.2.2 → 1.3.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/lib/commonjs/extension-registry.json +31 -7
- package/lib/commonjs/extractors/megacloud.js +8 -35
- package/lib/commonjs/extractors/megacloud.js.map +1 -1
- package/lib/commonjs/extractors/megaup.js +1 -1
- package/lib/commonjs/extractors/megaup.js.map +1 -1
- package/lib/commonjs/providers/anime/animekai/create-animekai.js +44 -27
- package/lib/commonjs/providers/anime/animekai/create-animekai.js.map +1 -1
- package/lib/commonjs/providers/anime/animepahe/create-animepahe.js +2 -2
- package/lib/commonjs/providers/anime/animepahe/create-animepahe.js.map +1 -1
- package/lib/commonjs/providers/anime/aniwatchtv/aniwatchtv.js +187 -0
- package/lib/commonjs/providers/anime/aniwatchtv/aniwatchtv.js.map +1 -0
- package/lib/commonjs/providers/anime/aniwatchtv/create-aniwatchtv.js +572 -0
- package/lib/commonjs/providers/anime/aniwatchtv/create-aniwatchtv.js.map +1 -0
- package/lib/commonjs/providers/anime/index.js +5 -1
- package/lib/commonjs/providers/anime/index.js.map +1 -1
- package/lib/commonjs/providers/meta/anilist.js +3 -2
- package/lib/commonjs/providers/meta/anilist.js.map +1 -1
- package/lib/commonjs/providers/movies/index.js +3 -1
- package/lib/commonjs/providers/movies/index.js.map +1 -1
- package/lib/commonjs/providers/movies/multimovies/create-multimovies.js +21 -21
- package/lib/commonjs/providers/movies/multimovies/create-multimovies.js.map +1 -1
- package/lib/commonjs/providers/movies/netflixmirror/create-netflixmirror.js +267 -0
- package/lib/commonjs/providers/movies/netflixmirror/create-netflixmirror.js.map +1 -0
- package/lib/commonjs/providers/movies/netflixmirror/netflixmirror.js +35 -0
- package/lib/commonjs/providers/movies/netflixmirror/netflixmirror.js.map +1 -0
- package/lib/commonjs/utils/provider-maps.js +3 -0
- package/lib/commonjs/utils/provider-maps.js.map +1 -1
- package/lib/commonjs/utils/utils.js +16 -9
- package/lib/commonjs/utils/utils.js.map +1 -1
- package/lib/module/extension-registry.json +31 -7
- package/lib/module/extractors/megacloud.js +8 -35
- package/lib/module/extractors/megacloud.js.map +1 -1
- package/lib/module/extractors/megaup.js +1 -1
- package/lib/module/extractors/megaup.js.map +1 -1
- package/lib/module/providers/anime/animekai/create-animekai.js +44 -27
- package/lib/module/providers/anime/animekai/create-animekai.js.map +1 -1
- package/lib/module/providers/anime/animepahe/create-animepahe.js +2 -2
- package/lib/module/providers/anime/animepahe/create-animepahe.js.map +1 -1
- package/lib/module/providers/anime/aniwatchtv/aniwatchtv.js +184 -0
- package/lib/module/providers/anime/aniwatchtv/aniwatchtv.js.map +1 -0
- package/lib/module/providers/anime/aniwatchtv/create-aniwatchtv.js +569 -0
- package/lib/module/providers/anime/aniwatchtv/create-aniwatchtv.js.map +1 -0
- package/lib/module/providers/anime/index.js +5 -1
- package/lib/module/providers/anime/index.js.map +1 -1
- package/lib/module/providers/meta/anilist.js +3 -2
- package/lib/module/providers/meta/anilist.js.map +1 -1
- package/lib/module/providers/movies/index.js +3 -1
- package/lib/module/providers/movies/index.js.map +1 -1
- package/lib/module/providers/movies/multimovies/create-multimovies.js +21 -21
- package/lib/module/providers/movies/multimovies/create-multimovies.js.map +1 -1
- package/lib/module/providers/movies/netflixmirror/create-netflixmirror.js +263 -0
- package/lib/module/providers/movies/netflixmirror/create-netflixmirror.js.map +1 -0
- package/lib/module/providers/movies/netflixmirror/netflixmirror.js +32 -0
- package/lib/module/providers/movies/netflixmirror/netflixmirror.js.map +1 -0
- package/lib/module/utils/provider-maps.js +3 -0
- package/lib/module/utils/provider-maps.js.map +1 -1
- package/lib/module/utils/utils.js +16 -9
- package/lib/module/utils/utils.js.map +1 -1
- package/lib/typescript/commonjs/src/extractors/megacloud.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/anime/animekai/create-animekai.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/anime/aniwatchtv/aniwatchtv.d.ts +134 -0
- package/lib/typescript/commonjs/src/providers/anime/aniwatchtv/aniwatchtv.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/providers/anime/aniwatchtv/create-aniwatchtv.d.ts +49 -0
- package/lib/typescript/commonjs/src/providers/anime/aniwatchtv/create-aniwatchtv.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/providers/anime/index.d.ts +4 -0
- package/lib/typescript/commonjs/src/providers/anime/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/meta/anilist.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/movies/index.d.ts +3 -1
- package/lib/typescript/commonjs/src/providers/movies/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/movies/multimovies/create-multimovies.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/movies/netflixmirror/create-netflixmirror.d.ts +23 -0
- package/lib/typescript/commonjs/src/providers/movies/netflixmirror/create-netflixmirror.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/providers/movies/netflixmirror/netflixmirror.d.ts +20 -0
- package/lib/typescript/commonjs/src/providers/movies/netflixmirror/netflixmirror.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/utils/provider-maps.d.ts +1 -0
- package/lib/typescript/commonjs/src/utils/provider-maps.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/utils.d.ts +5 -0
- package/lib/typescript/commonjs/src/utils/utils.d.ts.map +1 -1
- package/lib/typescript/module/src/extractors/megacloud.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/anime/animekai/create-animekai.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/anime/aniwatchtv/aniwatchtv.d.ts +134 -0
- package/lib/typescript/module/src/providers/anime/aniwatchtv/aniwatchtv.d.ts.map +1 -0
- package/lib/typescript/module/src/providers/anime/aniwatchtv/create-aniwatchtv.d.ts +49 -0
- package/lib/typescript/module/src/providers/anime/aniwatchtv/create-aniwatchtv.d.ts.map +1 -0
- package/lib/typescript/module/src/providers/anime/index.d.ts +4 -0
- package/lib/typescript/module/src/providers/anime/index.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/meta/anilist.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/movies/index.d.ts +3 -1
- package/lib/typescript/module/src/providers/movies/index.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/movies/multimovies/create-multimovies.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/movies/netflixmirror/create-netflixmirror.d.ts +23 -0
- package/lib/typescript/module/src/providers/movies/netflixmirror/create-netflixmirror.d.ts.map +1 -0
- package/lib/typescript/module/src/providers/movies/netflixmirror/netflixmirror.d.ts +20 -0
- package/lib/typescript/module/src/providers/movies/netflixmirror/netflixmirror.d.ts.map +1 -0
- package/lib/typescript/module/src/utils/provider-maps.d.ts +1 -0
- package/lib/typescript/module/src/utils/provider-maps.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/utils.d.ts +5 -0
- package/lib/typescript/module/src/utils/utils.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/extension-registry.json +31 -7
- package/src/extractors/megacloud.ts +7 -38
- package/src/extractors/megaup.ts +1 -1
- package/src/providers/anime/animekai/create-animekai.ts +45 -26
- package/src/providers/anime/animepahe/create-animepahe.ts +2 -2
- package/src/providers/anime/aniwatchtv/aniwatchtv.ts +198 -0
- package/src/providers/anime/aniwatchtv/create-aniwatchtv.ts +632 -0
- package/src/providers/anime/index.ts +4 -0
- package/src/providers/meta/anilist.ts +8 -2
- package/src/providers/movies/index.ts +3 -1
- package/src/providers/movies/multimovies/create-multimovies.ts +524 -520
- package/src/providers/movies/netflixmirror/create-netflixmirror.ts +344 -0
- package/src/providers/movies/netflixmirror/netflixmirror.ts +46 -0
- package/src/utils/provider-maps.ts +3 -0
- package/src/utils/utils.ts +48 -20
- package/lib/commonjs/providers/movies/netflixmirror.js +0 -245
- package/lib/commonjs/providers/movies/netflixmirror.js.map +0 -1
- package/lib/module/providers/movies/netflixmirror.js +0 -241
- package/lib/module/providers/movies/netflixmirror.js.map +0 -1
- package/lib/typescript/commonjs/src/providers/movies/netflixmirror.d.ts +0 -38
- package/lib/typescript/commonjs/src/providers/movies/netflixmirror.d.ts.map +0 -1
- package/lib/typescript/module/src/providers/movies/netflixmirror.d.ts +0 -38
- package/lib/typescript/module/src/providers/movies/netflixmirror.d.ts.map +0 -1
- package/src/providers/movies/netflixmirror.ts +0 -288
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-consumet",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "React Native library providing access to entertainment media information (anime, movies, manga, etc.) from multiple sources, adapting the Consumet API for mobile applications.",
|
|
5
5
|
"source": "./src/index.tsx",
|
|
6
6
|
"main": "./lib/commonjs/index.js",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"@eslint/js": "^9.22.0",
|
|
92
92
|
"@react-native-community/cli": "15.0.1",
|
|
93
93
|
"@react-native/eslint-config": "^0.78.0",
|
|
94
|
-
"@release-it/conventional-changelog": "
|
|
94
|
+
"@release-it/conventional-changelog": "8.0.2",
|
|
95
95
|
"@types/crypto-js": "^4.2.2",
|
|
96
96
|
"@types/jest": "^29.5.5",
|
|
97
97
|
"@types/react": "^19.0.0",
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
"react": "19.0.0",
|
|
111
111
|
"react-native": "0.78.1",
|
|
112
112
|
"react-native-builder-bob": "^0.38.3",
|
|
113
|
-
"release-it": "
|
|
113
|
+
"release-it": "latest",
|
|
114
114
|
"ts-jest": "^29.3.1",
|
|
115
115
|
"ts-node": "^10.9.2",
|
|
116
116
|
"turbo": "^1.10.7",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"extractors": [
|
|
3
3
|
{
|
|
4
4
|
"name": "MegaCloud",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.3.0",
|
|
6
6
|
"main": "https://raw.githubusercontent.com/uwumilabs/react-native-consumet/refs/heads/main/dist/extractors/megacloud.js"
|
|
7
7
|
},
|
|
8
8
|
{
|
|
@@ -12,15 +12,15 @@
|
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
14
|
"name": "MegaUp",
|
|
15
|
-
"version": "1.1.
|
|
15
|
+
"version": "1.1.1",
|
|
16
16
|
"main": "https://raw.githubusercontent.com/uwumilabs/react-native-consumet/refs/heads/main/dist/extractors/megaup.js"
|
|
17
17
|
}
|
|
18
18
|
],
|
|
19
19
|
"extensions": [
|
|
20
20
|
{
|
|
21
21
|
"id": "zoro",
|
|
22
|
-
"name": "
|
|
23
|
-
"description": "High-quality anime streaming from
|
|
22
|
+
"name": "AniWatchTv",
|
|
23
|
+
"description": "High-quality anime streaming from AniWatchTv (hianime.to) with multiple servers and subtitles",
|
|
24
24
|
"version": "1.1.0",
|
|
25
25
|
"author": {
|
|
26
26
|
"name": "RNConsumet Team",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"id": "animepahe",
|
|
46
46
|
"name": "AnimePahe",
|
|
47
47
|
"description": "High-quality anime streaming from AnimePahe with multiple servers and subtitles",
|
|
48
|
-
"version": "1.
|
|
48
|
+
"version": "1.2.0",
|
|
49
49
|
"author": {
|
|
50
50
|
"name": "RNConsumet Team",
|
|
51
51
|
"url": "https://github.com/uwumilabs"
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"id": "animekai",
|
|
70
70
|
"name": "AnimeKai",
|
|
71
71
|
"description": "High-quality anime streaming from AnimeKai with multiple servers and subtitles",
|
|
72
|
-
"version": "1.
|
|
72
|
+
"version": "1.1.0",
|
|
73
73
|
"author": {
|
|
74
74
|
"name": "RNConsumet Team",
|
|
75
75
|
"url": "https://github.com/uwumilabs"
|
|
@@ -89,6 +89,30 @@
|
|
|
89
89
|
"isSourceEmbed": true,
|
|
90
90
|
"haveMultiServers": true
|
|
91
91
|
},
|
|
92
|
+
{
|
|
93
|
+
"id": "aniwatchtv",
|
|
94
|
+
"name": "AniWatchTv",
|
|
95
|
+
"description": "Aniwatch is a Free anime streaming website which you can watch English Subbed and Dubbed Anime online with No Account and Daily update",
|
|
96
|
+
"version": "1.0.0",
|
|
97
|
+
"author": {
|
|
98
|
+
"name": "RNConsumet Team",
|
|
99
|
+
"url": "https://github.com/uwumilabs"
|
|
100
|
+
},
|
|
101
|
+
"category": "anime",
|
|
102
|
+
"main": "https://raw.githubusercontent.com/uwumilabs/react-native-consumet/refs/heads/main/dist/providers/anime/zoro/create-zoro.js",
|
|
103
|
+
"factoryName": "createAniWatchTv",
|
|
104
|
+
"baseUrl": "https://aniwatchtv.to",
|
|
105
|
+
"logo": "https://aniwatchtv.to/favicon-32x32.png",
|
|
106
|
+
"languages": ["en", "ja"],
|
|
107
|
+
"nsfw": false,
|
|
108
|
+
"status": "alpha",
|
|
109
|
+
"lastUpdated": "2025-08-05T00:00:00Z",
|
|
110
|
+
"extractors": ["MegaCloud"],
|
|
111
|
+
"subbed": true,
|
|
112
|
+
"dubbed": true,
|
|
113
|
+
"isSourceEmbed": true,
|
|
114
|
+
"haveMultiServers": true
|
|
115
|
+
},
|
|
92
116
|
{
|
|
93
117
|
"id": "himovies",
|
|
94
118
|
"name": "HiMovies",
|
|
@@ -146,7 +170,7 @@
|
|
|
146
170
|
"main": "https://raw.githubusercontent.com/uwumilabs/react-native-consumet/refs/heads/main/dist/providers/movies/yflix/create-yflix.js",
|
|
147
171
|
"factoryName": "createYFlix",
|
|
148
172
|
"baseUrl": "https://yflix.to",
|
|
149
|
-
"logo": "https://yflix.to/
|
|
173
|
+
"logo": "https://yflix.to/assets/uploads/2f505f3de3c99889c1a72557f3e3714fc0c457b0.png",
|
|
150
174
|
"languages": ["all"],
|
|
151
175
|
"nsfw": false,
|
|
152
176
|
"status": "stable",
|
|
@@ -18,11 +18,8 @@ export function MegaCloud(ctx: ExtractorContext): IVideoExtractor {
|
|
|
18
18
|
const xrax = embed_url.toString().match(regex)?.[1];
|
|
19
19
|
const basePath = embed_url.pathname.split('/').slice(0, 4).join('/');
|
|
20
20
|
|
|
21
|
-
const url = `${embed_url.origin}${basePath}/getSources?id=${xrax}
|
|
22
|
-
|
|
23
|
-
// console.log(`🔗 Fetching sources from: ${url} with key type: ${getKeyType}`);
|
|
24
|
-
//gets the base64 encoded string from the URL and key in parallel
|
|
25
|
-
let key;
|
|
21
|
+
const url = `${embed_url.origin}${basePath}/getSources?id=${xrax}`;
|
|
22
|
+
// console.log(`🔗 Fetching sources from: ${url}`);
|
|
26
23
|
|
|
27
24
|
const headers = {
|
|
28
25
|
'Accept': '*/*',
|
|
@@ -31,22 +28,12 @@ export function MegaCloud(ctx: ExtractorContext): IVideoExtractor {
|
|
|
31
28
|
'User-Agent': USER_AGENT,
|
|
32
29
|
};
|
|
33
30
|
|
|
34
|
-
try {
|
|
35
|
-
const { data: keyData } = await axios?.get(
|
|
36
|
-
'https://raw.githubusercontent.com/yogesh-hacker/MegacloudKeys/refs/heads/main/keys.json'
|
|
37
|
-
);
|
|
38
|
-
key = keyData;
|
|
39
|
-
} catch (err) {
|
|
40
|
-
console.error('❌ Error fetching key:', err);
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
// console.log(`🔗 Fetched data: ${key[getKeyType]}`);
|
|
44
31
|
let videoTag;
|
|
45
32
|
let embedRes;
|
|
46
33
|
try {
|
|
47
34
|
embedRes = await axios?.get(embed_url.href, { headers });
|
|
48
35
|
const $ = load(embedRes.data);
|
|
49
|
-
videoTag = $('
|
|
36
|
+
videoTag = $('[id$="-player"]');
|
|
50
37
|
} catch (error) {
|
|
51
38
|
console.error('❌ Error fetching embed URL:', error);
|
|
52
39
|
return;
|
|
@@ -61,7 +48,7 @@ export function MegaCloud(ctx: ExtractorContext): IVideoExtractor {
|
|
|
61
48
|
|
|
62
49
|
let nonceMatch = rawText.match(/\b[a-zA-Z0-9]{48}\b/);
|
|
63
50
|
if (!nonceMatch) {
|
|
64
|
-
const altMatch = rawText.match(/\b([a-zA-Z0-9]{16})\b
|
|
51
|
+
const altMatch = rawText.match(/\b([a-zA-Z0-9]{16})\b[\s\S]*?\b([a-zA-Z0-9]{16})\b[\s\S]*?\b([a-zA-Z0-9]{16})\b/);
|
|
65
52
|
if (altMatch) nonceMatch = [altMatch.slice(1).join('')];
|
|
66
53
|
}
|
|
67
54
|
|
|
@@ -75,28 +62,11 @@ export function MegaCloud(ctx: ExtractorContext): IVideoExtractor {
|
|
|
75
62
|
headers,
|
|
76
63
|
}
|
|
77
64
|
);
|
|
78
|
-
// console.log(
|
|
79
|
-
// `🔗 Encrypted response:`,
|
|
80
|
-
// encryptedResData,
|
|
81
|
-
// `${embed_url.origin}${basePath}/getSources?id=${xrax}&_k=${nonce}`
|
|
82
|
-
// );
|
|
83
|
-
const encrypted = encryptedResData.encrypted;
|
|
84
65
|
const sources = encryptedResData.sources;
|
|
85
66
|
let videoSrc = [];
|
|
86
67
|
|
|
87
|
-
if (encrypted) {
|
|
88
|
-
|
|
89
|
-
'https://script.google.com/macros/s/AKfycbxHbYHbrGMXYD2-bC-C43D3njIbU-wGiYQuJL61H4vyy6YVXkybMNNEPJNPPuZrD1gRVA/exec';
|
|
90
|
-
|
|
91
|
-
const params = new URLSearchParams({
|
|
92
|
-
encrypted_data: sources,
|
|
93
|
-
nonce: nonce,
|
|
94
|
-
secret: key[getKeyType],
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
const decodeRes = await axios.get(`${decodeUrl}?${params.toString()}`);
|
|
98
|
-
videoSrc = JSON.parse(decodeRes.data.replace(/\n/g, ' ').match(/\\\[.*?\\\\]/)?.[0]);
|
|
99
|
-
// console.log(`🔗 Video URL: ${videoUrl}`, decodeRes.data.match(/"file":"(.*?)"/));
|
|
68
|
+
if (encryptedResData.encrypted) {
|
|
69
|
+
console.warn('❌ API returned encrypted sources which we are no longer decrypting. Returning empty array.');
|
|
100
70
|
} else {
|
|
101
71
|
videoSrc = sources;
|
|
102
72
|
}
|
|
@@ -108,14 +78,13 @@ export function MegaCloud(ctx: ExtractorContext): IVideoExtractor {
|
|
|
108
78
|
};
|
|
109
79
|
}
|
|
110
80
|
// @ts-ignore
|
|
111
|
-
const extract = async (embedIframeURL: PolyURL, referer = 'https://
|
|
81
|
+
const extract = async (embedIframeURL: PolyURL, referer = 'https://himovies.sx'): Promise<ISource> => {
|
|
112
82
|
const extractedData: ISource = {
|
|
113
83
|
subtitles: [],
|
|
114
84
|
intro: { start: 0, end: 0 },
|
|
115
85
|
outro: { start: 0, end: 0 },
|
|
116
86
|
sources: [],
|
|
117
87
|
};
|
|
118
|
-
// console.log(ctx);
|
|
119
88
|
try {
|
|
120
89
|
const resp = await getSources(embedIframeURL, referer);
|
|
121
90
|
|
package/src/extractors/megaup.ts
CHANGED
|
@@ -95,7 +95,7 @@ export function MegaUp(ctx: ExtractorContext): IVideoExtractor {
|
|
|
95
95
|
...decrypted.tracks.map((track) => ({
|
|
96
96
|
kind: track.kind,
|
|
97
97
|
url: track.file,
|
|
98
|
-
lang: track.label || 'English',
|
|
98
|
+
lang: track.label || track.kind || 'English',
|
|
99
99
|
})),
|
|
100
100
|
...(externalSubs.length > 0 ? externalSubs : []),
|
|
101
101
|
],
|
|
@@ -441,34 +441,53 @@ function createAnimeKai(ctx: ProviderContext, customBaseURL?: string) {
|
|
|
441
441
|
const { data } = await axios.get(requestUrl, { headers: buildHeaders() });
|
|
442
442
|
const $ = load(data.result);
|
|
443
443
|
const servers: IEpisodeServer[] = [];
|
|
444
|
-
const subOrDubKey = subOrDub === SubOrDubEnum.SUB ? 'softsub' : 'dub';
|
|
445
444
|
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
445
|
+
// Define server groups based on subOrDub parameter
|
|
446
|
+
const serverGroups =
|
|
447
|
+
subOrDub === SubOrDubEnum.SUB
|
|
448
|
+
? [
|
|
449
|
+
{ selector: '.server-items.lang-group[data-id="sub"] .server', type: 'hardsub' },
|
|
450
|
+
{ selector: '.server-items.lang-group[data-id="softsub"] .server', type: 'softsub' },
|
|
451
|
+
]
|
|
452
|
+
: [{ selector: '.server-items.lang-group[data-id="dub"] .server', type: 'dub' }];
|
|
453
|
+
|
|
454
|
+
const serverPromises: Promise<void>[] = [];
|
|
455
|
+
|
|
456
|
+
for (const group of serverGroups) {
|
|
457
|
+
$(group.selector).each((_, server) => {
|
|
449
458
|
const serverId = $(server).attr('data-lid');
|
|
450
459
|
if (!serverId) return;
|
|
451
460
|
|
|
452
|
-
const
|
|
453
|
-
const
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
461
|
+
const serverName = $(server).text().trim();
|
|
462
|
+
const serverType = group.type;
|
|
463
|
+
|
|
464
|
+
serverPromises.push(
|
|
465
|
+
(async () => {
|
|
466
|
+
const viewToken = await GenerateToken(serverId);
|
|
467
|
+
const { data: linkData } = await axios.get(
|
|
468
|
+
`${config.baseUrl}/ajax/links/view?id=${serverId}&_=${viewToken}`,
|
|
469
|
+
{ headers: buildHeaders() }
|
|
470
|
+
);
|
|
471
|
+
const decoded = await DecodeIframeData(linkData.result);
|
|
472
|
+
|
|
473
|
+
servers.push({
|
|
474
|
+
name: `megaup ${serverName}-${serverType}`.toLowerCase(),
|
|
475
|
+
url: decoded.url,
|
|
476
|
+
intro: {
|
|
477
|
+
start: decoded.skip.intro[0],
|
|
478
|
+
end: decoded.skip.intro[1],
|
|
479
|
+
},
|
|
480
|
+
outro: {
|
|
481
|
+
start: decoded.skip.outro[0],
|
|
482
|
+
end: decoded.skip.outro[1],
|
|
483
|
+
},
|
|
484
|
+
});
|
|
485
|
+
})()
|
|
486
|
+
);
|
|
487
|
+
});
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
await Promise.all(serverPromises);
|
|
472
491
|
|
|
473
492
|
return servers;
|
|
474
493
|
};
|
|
@@ -498,10 +517,10 @@ function createAnimeKai(ctx: ProviderContext, customBaseURL?: string) {
|
|
|
498
517
|
|
|
499
518
|
try {
|
|
500
519
|
const servers = await fetchEpisodeServers(episodeId, subOrDub);
|
|
501
|
-
const i = servers.findIndex((s) => s.name.
|
|
520
|
+
const i = servers.findIndex((s) => s.name.includes(server.toLowerCase()));
|
|
502
521
|
|
|
503
522
|
if (i === -1) {
|
|
504
|
-
throw new Error(`Server ${server} not found`);
|
|
523
|
+
throw new Error(`Server ${server} not found. Available servers: ${servers.map((s) => s.name).join(', ')}`);
|
|
505
524
|
}
|
|
506
525
|
|
|
507
526
|
const serverUrl: URL = new URL(servers[i]!.url);
|
|
@@ -25,7 +25,7 @@ function createAnimePahe(ctx: ProviderContext, customBaseURL?: string) {
|
|
|
25
25
|
name: 'AnimePahe',
|
|
26
26
|
languages: 'en',
|
|
27
27
|
classPath: 'ANIME.AnimePahe',
|
|
28
|
-
logo: 'https://animepahe.si
|
|
28
|
+
logo: 'https://animepahe.si/web-app-manifest-512x512.png',
|
|
29
29
|
baseUrl,
|
|
30
30
|
isNSFW: false,
|
|
31
31
|
isWorking: true,
|
|
@@ -52,7 +52,7 @@ function createAnimePahe(ctx: ProviderContext, customBaseURL?: string) {
|
|
|
52
52
|
|
|
53
53
|
function Headers(sessionId: string | false) {
|
|
54
54
|
const headers: Record<string, string> = {
|
|
55
|
-
'authority': 'animepahe.
|
|
55
|
+
'authority': 'animepahe.si',
|
|
56
56
|
'accept': 'application/json, text/javascript, */*; q=0.01',
|
|
57
57
|
'sec-ch-ua': '"Not A(Brand";v="99", "Microsoft Edge";v="121", "Chromium";v="121"',
|
|
58
58
|
'sec-ch-ua-mobile': '?0',
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { AnimeParser } from '../../../models';
|
|
2
|
+
import { createProviderContext } from '../../../utils/create-provider-context';
|
|
3
|
+
import createAniWatchTv, { type AniWatchTvProviderInstance } from './create-aniwatchtv';
|
|
4
|
+
|
|
5
|
+
// Backward compatibility wrapper class
|
|
6
|
+
export class AniWatchTv extends AnimeParser {
|
|
7
|
+
private instance: AniWatchTvProviderInstance;
|
|
8
|
+
override logo: string;
|
|
9
|
+
override name: string;
|
|
10
|
+
override baseUrl: string;
|
|
11
|
+
override classPath: string;
|
|
12
|
+
override isNSFW: boolean;
|
|
13
|
+
override isWorking: boolean;
|
|
14
|
+
override readonly isDubAvailableSeparately: boolean;
|
|
15
|
+
|
|
16
|
+
constructor(customBaseURL?: string) {
|
|
17
|
+
super();
|
|
18
|
+
|
|
19
|
+
// Use the context factory to create a complete context with all defaults
|
|
20
|
+
const defaultContext = createProviderContext();
|
|
21
|
+
|
|
22
|
+
this.instance = createAniWatchTv(defaultContext, customBaseURL);
|
|
23
|
+
|
|
24
|
+
this.logo = this.instance.logo;
|
|
25
|
+
this.name = this.instance.name;
|
|
26
|
+
this.baseUrl = this.instance.baseUrl;
|
|
27
|
+
this.classPath = this.instance.classPath;
|
|
28
|
+
this.isNSFW = this.instance.isNSFW ?? false;
|
|
29
|
+
this.isWorking = this.instance.isWorking ?? true;
|
|
30
|
+
this.isDubAvailableSeparately = this.instance.isDubAvailableSeparately ?? false;
|
|
31
|
+
|
|
32
|
+
// Bind all methods to preserve proper typing
|
|
33
|
+
this.search = this.instance.search;
|
|
34
|
+
this.fetchAdvancedSearch = this.instance.fetchAdvancedSearch;
|
|
35
|
+
this.fetchTopAiring = this.instance.fetchTopAiring;
|
|
36
|
+
this.fetchMostPopular = this.instance.fetchMostPopular;
|
|
37
|
+
this.fetchMostFavorite = this.instance.fetchMostFavorite;
|
|
38
|
+
this.fetchLatestCompleted = this.instance.fetchLatestCompleted;
|
|
39
|
+
this.fetchRecentlyUpdated = this.instance.fetchRecentlyUpdated;
|
|
40
|
+
this.fetchRecentlyAdded = this.instance.fetchRecentlyAdded;
|
|
41
|
+
this.fetchTopUpcoming = this.instance.fetchTopUpcoming;
|
|
42
|
+
this.fetchStudio = this.instance.fetchStudio;
|
|
43
|
+
this.fetchSubbedAnime = this.instance.fetchSubbedAnime;
|
|
44
|
+
this.fetchDubbedAnime = this.instance.fetchDubbedAnime;
|
|
45
|
+
this.fetchMovie = this.instance.fetchMovie;
|
|
46
|
+
this.fetchTV = this.instance.fetchTV;
|
|
47
|
+
this.fetchOVA = this.instance.fetchOVA;
|
|
48
|
+
this.fetchONA = this.instance.fetchONA;
|
|
49
|
+
this.fetchSpecial = this.instance.fetchSpecial;
|
|
50
|
+
this.fetchGenres = this.instance.fetchGenres;
|
|
51
|
+
this.genreSearch = this.instance.genreSearch;
|
|
52
|
+
this.fetchSchedule = this.instance.fetchSchedule;
|
|
53
|
+
this.fetchSpotlight = this.instance.fetchSpotlight;
|
|
54
|
+
this.fetchSearchSuggestions = this.instance.fetchSearchSuggestions;
|
|
55
|
+
this.fetchContinueWatching = this.instance.fetchContinueWatching;
|
|
56
|
+
this.fetchWatchList = this.instance.fetchWatchList;
|
|
57
|
+
this.fetchAnimeInfo = this.instance.fetchAnimeInfo;
|
|
58
|
+
this.fetchEpisodeSources = this.instance.fetchEpisodeSources;
|
|
59
|
+
this.fetchEpisodeServers = this.instance.fetchEpisodeServers;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* @param query Search query
|
|
64
|
+
* @param page Page number (optional)
|
|
65
|
+
*/
|
|
66
|
+
search!: AniWatchTvProviderInstance['search'];
|
|
67
|
+
/**
|
|
68
|
+
* Fetch advanced anime search results with various filters.
|
|
69
|
+
*
|
|
70
|
+
* @param page Page number (default: 1)
|
|
71
|
+
* @param type One of (Optional): movie, tv, ova, ona, special, music
|
|
72
|
+
* @param status One of (Optional): finished_airing, currently_airing, not_yet_aired
|
|
73
|
+
* @param rated One of (Optional): g, pg, pg_13, r, r_plus, rx
|
|
74
|
+
* @param score Number from 1 to 10 (Optional)
|
|
75
|
+
* @param season One of (Optional): spring, summer, fall, winter
|
|
76
|
+
* @param language One of (Optional): sub, dub, sub_dub
|
|
77
|
+
* @param startDate Start date object { year, month, day } (Optional)
|
|
78
|
+
* @param endDate End date object { year, month, day } (Optional)
|
|
79
|
+
* @param sort One of (Optional): recently_added, recently_updated, score, name_az, released_date, most_watched
|
|
80
|
+
* @param genres Array of genres (Optional): action, adventure, cars, comedy, dementia, demons, mystery, drama, ecchi, fantasy, game, historical, horror, kids, magic, martial_arts, mecha, music, parody, samurai, romance, school, sci_fi, shoujo, shoujo_ai, shounen, shounen_ai, space, sports, super_power, vampire, harem, military, slice_of_life, supernatural, police, psychological, thriller, seinen, isekai, josei
|
|
81
|
+
* @returns A Promise resolving to the search results.
|
|
82
|
+
*/
|
|
83
|
+
fetchAdvancedSearch!: AniWatchTvProviderInstance['fetchAdvancedSearch'];
|
|
84
|
+
/**
|
|
85
|
+
* @param page number
|
|
86
|
+
*/
|
|
87
|
+
fetchTopAiring!: AniWatchTvProviderInstance['fetchTopAiring'];
|
|
88
|
+
/**
|
|
89
|
+
* @param page number
|
|
90
|
+
*/
|
|
91
|
+
fetchMostPopular!: AniWatchTvProviderInstance['fetchMostPopular'];
|
|
92
|
+
/**
|
|
93
|
+
* @param page number
|
|
94
|
+
*/
|
|
95
|
+
fetchMostFavorite!: AniWatchTvProviderInstance['fetchMostFavorite'];
|
|
96
|
+
/**
|
|
97
|
+
* @param page number
|
|
98
|
+
*/
|
|
99
|
+
fetchLatestCompleted!: AniWatchTvProviderInstance['fetchLatestCompleted'];
|
|
100
|
+
/**
|
|
101
|
+
* @param page number
|
|
102
|
+
*/
|
|
103
|
+
fetchRecentlyUpdated!: AniWatchTvProviderInstance['fetchRecentlyUpdated'];
|
|
104
|
+
/**
|
|
105
|
+
* @param page number
|
|
106
|
+
*/
|
|
107
|
+
fetchRecentlyAdded!: AniWatchTvProviderInstance['fetchRecentlyAdded'];
|
|
108
|
+
/**
|
|
109
|
+
* @param page number
|
|
110
|
+
*/
|
|
111
|
+
fetchTopUpcoming!: AniWatchTvProviderInstance['fetchTopUpcoming'];
|
|
112
|
+
/**
|
|
113
|
+
* @param studio Studio id, e.g. "toei-animation"
|
|
114
|
+
* @param page page number (optional) `default 1`
|
|
115
|
+
*/
|
|
116
|
+
fetchStudio!: AniWatchTvProviderInstance['fetchStudio'];
|
|
117
|
+
/**
|
|
118
|
+
* @param page number
|
|
119
|
+
*/
|
|
120
|
+
fetchSubbedAnime!: AniWatchTvProviderInstance['fetchSubbedAnime'];
|
|
121
|
+
/**
|
|
122
|
+
* @param page number
|
|
123
|
+
*/
|
|
124
|
+
fetchDubbedAnime!: AniWatchTvProviderInstance['fetchDubbedAnime'];
|
|
125
|
+
/**
|
|
126
|
+
* @param page number
|
|
127
|
+
*/
|
|
128
|
+
fetchMovie!: AniWatchTvProviderInstance['fetchMovie'];
|
|
129
|
+
/**
|
|
130
|
+
* @param page number
|
|
131
|
+
*/
|
|
132
|
+
fetchTV!: AniWatchTvProviderInstance['fetchTV'];
|
|
133
|
+
/**
|
|
134
|
+
* @param page number
|
|
135
|
+
*/
|
|
136
|
+
fetchOVA!: AniWatchTvProviderInstance['fetchOVA'];
|
|
137
|
+
/**
|
|
138
|
+
* @param page number
|
|
139
|
+
*/
|
|
140
|
+
fetchONA!: AniWatchTvProviderInstance['fetchONA'];
|
|
141
|
+
/**
|
|
142
|
+
* @param page number
|
|
143
|
+
*/
|
|
144
|
+
fetchSpecial!: AniWatchTvProviderInstance['fetchSpecial'];
|
|
145
|
+
fetchGenres!: AniWatchTvProviderInstance['fetchGenres'];
|
|
146
|
+
/**
|
|
147
|
+
* @param page number
|
|
148
|
+
*/
|
|
149
|
+
genreSearch!: AniWatchTvProviderInstance['genreSearch'];
|
|
150
|
+
/**
|
|
151
|
+
* Fetches the schedule for a given date.
|
|
152
|
+
* @param date The date in format 'YYYY-MM-DD'. Defaults to the current date.
|
|
153
|
+
* @returns A promise that resolves to an object containing the search results.
|
|
154
|
+
*/
|
|
155
|
+
fetchSchedule!: AniWatchTvProviderInstance['fetchSchedule'];
|
|
156
|
+
fetchSpotlight!: AniWatchTvProviderInstance['fetchSpotlight'];
|
|
157
|
+
fetchSearchSuggestions!: AniWatchTvProviderInstance['fetchSearchSuggestions'];
|
|
158
|
+
/**
|
|
159
|
+
* Fetches the list of episodes that the user is currently watching.
|
|
160
|
+
* @param connectSid The session ID of the user. Note: This can be obtained from the browser cookies (needs to be signed in)
|
|
161
|
+
* @returns A promise that resolves to an array of anime episodes.
|
|
162
|
+
*/
|
|
163
|
+
fetchContinueWatching!: AniWatchTvProviderInstance['fetchContinueWatching'];
|
|
164
|
+
fetchWatchList!: AniWatchTvProviderInstance['fetchWatchList'];
|
|
165
|
+
/**
|
|
166
|
+
* @param id Anime id
|
|
167
|
+
*/
|
|
168
|
+
fetchAnimeInfo!: AniWatchTvProviderInstance['fetchAnimeInfo'];
|
|
169
|
+
/**
|
|
170
|
+
*
|
|
171
|
+
* @param episodeId Episode id
|
|
172
|
+
* @param server server type (default `VidCloud`) (optional)
|
|
173
|
+
* @param subOrDub sub or dub (default `SubOrDub.SUB`) (optional)
|
|
174
|
+
*/
|
|
175
|
+
fetchEpisodeSources!: AniWatchTvProviderInstance['fetchEpisodeSources'];
|
|
176
|
+
/**
|
|
177
|
+
* Method not implemented in AniWatchTv provider.
|
|
178
|
+
* @param episodeId Episode id
|
|
179
|
+
*/
|
|
180
|
+
fetchEpisodeServers!: AniWatchTvProviderInstance['fetchEpisodeServers'];
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export default AniWatchTv;
|
|
184
|
+
|
|
185
|
+
// (async () => {
|
|
186
|
+
// // tsx ./src/providers/anime/aniwatchtv/aniwatchtv.ts
|
|
187
|
+
// const aniwatchtv = new AniWatchTv();
|
|
188
|
+
// const anime = await aniwatchtv.search('Dandadan');
|
|
189
|
+
// const info = await aniwatchtv.fetchAnimeInfo('solo-leveling-season-2-arise-from-the-shadow-19413');
|
|
190
|
+
// // console.log(info.episodes);
|
|
191
|
+
// const sources = await aniwatchtv.fetchEpisodeServers(
|
|
192
|
+
// 'solo-leveling-season-2-arise-from-the-shadow-19413$episode$131394',
|
|
193
|
+
// // 'megacloud-hd-2',
|
|
194
|
+
// // undefined,
|
|
195
|
+
// SubOrDub.DUB
|
|
196
|
+
// );
|
|
197
|
+
// // console.log(sources);
|
|
198
|
+
// })();
|