react-native-consumet 0.7.1 → 0.8.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/android/build.gradle +1 -0
- package/android/generated/java/com/consumet/NativeConsumetSpec.java +4 -4
- package/android/generated/jni/RNConsumetSpec-generated.cpp +6 -6
- package/android/generated/jni/react/renderer/components/RNConsumetSpec/RNConsumetSpecJSI-generated.cpp +7 -8
- package/android/generated/jni/react/renderer/components/RNConsumetSpec/RNConsumetSpecJSI.h +9 -9
- package/android/src/main/java/com/consumet/ConsumetModule.kt +6 -103
- package/android/src/main/java/com/consumet/DeobfuscatorModule.kt +90 -0
- package/ios/generated/RNConsumetSpec/RNConsumetSpec-generated.mm +7 -7
- package/ios/generated/RNConsumetSpec/RNConsumetSpec.h +3 -4
- package/ios/generated/RNConsumetSpecJSI-generated.cpp +7 -8
- package/ios/generated/RNConsumetSpecJSI.h +9 -9
- package/lib/commonjs/NativeConsumet.ts +2 -2
- package/lib/commonjs/extractors/index.js +7 -0
- package/lib/commonjs/extractors/index.js.map +1 -1
- package/lib/commonjs/extractors/luffy.js +39 -0
- package/lib/commonjs/extractors/luffy.js.map +1 -0
- package/lib/commonjs/extractors/megacloud/index.js +2 -5
- package/lib/commonjs/extractors/megacloud/index.js.map +1 -1
- package/lib/commonjs/extractors/megacloud/megacloud.getsrcs.js +68 -0
- package/lib/commonjs/extractors/megacloud/megacloud.getsrcs.js.map +1 -0
- package/lib/commonjs/extractors/streamwish.js +2 -2
- package/lib/commonjs/extractors/streamwish.js.map +1 -1
- package/lib/commonjs/extractors/vidcloud.js +6 -17
- package/lib/commonjs/extractors/vidcloud.js.map +1 -1
- package/lib/commonjs/extractors/vidhide.js +2 -2
- package/lib/commonjs/extractors/vidhide.js.map +1 -1
- package/lib/commonjs/extractors/voe.js +57 -32
- package/lib/commonjs/extractors/voe.js.map +1 -1
- package/lib/commonjs/index.js +6 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/models/types.js +1 -0
- package/lib/commonjs/models/types.js.map +1 -1
- package/lib/commonjs/providers/anime/animeowl.js +501 -0
- package/lib/commonjs/providers/anime/animeowl.js.map +1 -0
- package/lib/commonjs/providers/anime/index.js +3 -1
- package/lib/commonjs/providers/anime/index.js.map +1 -1
- package/lib/commonjs/providers/anime/zoro.js +1 -2
- package/lib/commonjs/providers/anime/zoro.js.map +1 -1
- package/lib/commonjs/providers/meta/anilist.js +6 -5
- package/lib/commonjs/providers/meta/anilist.js.map +1 -1
- package/lib/commonjs/providers/meta/tmdb.js +1 -1
- package/lib/commonjs/providers/meta/tmdb.js.map +1 -1
- package/lib/commonjs/providers/movies/himovies.js +16 -16
- package/lib/commonjs/providers/movies/multimovies.js +2 -2
- package/lib/commonjs/providers/movies/multimovies.js.map +1 -1
- package/lib/commonjs/utils/index.js +6 -0
- package/lib/commonjs/utils/index.js.map +1 -1
- package/lib/commonjs/utils/providers-list.js +1 -1
- package/lib/commonjs/utils/providers-list.js.map +1 -1
- package/lib/module/NativeConsumet.ts +2 -2
- package/lib/module/extractors/index.js +2 -1
- package/lib/module/extractors/index.js.map +1 -1
- package/lib/module/extractors/luffy.js +35 -0
- package/lib/module/extractors/luffy.js.map +1 -0
- package/lib/module/extractors/megacloud/index.js +2 -5
- package/lib/module/extractors/megacloud/index.js.map +1 -1
- package/lib/module/extractors/megacloud/megacloud.getsrcs.js +64 -0
- package/lib/module/extractors/megacloud/megacloud.getsrcs.js.map +1 -0
- package/lib/module/extractors/streamwish.js +2 -2
- package/lib/module/extractors/streamwish.js.map +1 -1
- package/lib/module/extractors/vidcloud.js +6 -17
- package/lib/module/extractors/vidcloud.js.map +1 -1
- package/lib/module/extractors/vidhide.js +2 -2
- package/lib/module/extractors/vidhide.js.map +1 -1
- package/lib/module/extractors/voe.js +57 -32
- package/lib/module/extractors/voe.js.map +1 -1
- package/lib/module/index.js +2 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/models/types.js +1 -0
- package/lib/module/models/types.js.map +1 -1
- package/lib/module/providers/anime/animeowl.js +498 -0
- package/lib/module/providers/anime/animeowl.js.map +1 -0
- package/lib/module/providers/anime/index.js +3 -1
- package/lib/module/providers/anime/index.js.map +1 -1
- package/lib/module/providers/anime/zoro.js +1 -2
- package/lib/module/providers/anime/zoro.js.map +1 -1
- package/lib/module/providers/meta/anilist.js +6 -5
- package/lib/module/providers/meta/anilist.js.map +1 -1
- package/lib/module/providers/meta/tmdb.js +1 -1
- package/lib/module/providers/meta/tmdb.js.map +1 -1
- package/lib/module/providers/movies/himovies.js +16 -16
- package/lib/module/providers/movies/multimovies.js +2 -2
- package/lib/module/providers/movies/multimovies.js.map +1 -1
- package/lib/module/utils/index.js +2 -2
- package/lib/module/utils/index.js.map +1 -1
- package/lib/module/utils/providers-list.js +1 -1
- package/lib/module/utils/providers-list.js.map +1 -1
- package/lib/typescript/commonjs/src/NativeConsumet.d.ts +2 -2
- package/lib/typescript/commonjs/src/NativeConsumet.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/extractors/index.d.ts +2 -1
- package/lib/typescript/commonjs/src/extractors/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/extractors/luffy.d.ts +9 -0
- package/lib/typescript/commonjs/src/extractors/luffy.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/extractors/megacloud/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/extractors/megacloud/megacloud.getsrcs.d.ts +11 -0
- package/lib/typescript/commonjs/src/extractors/megacloud/megacloud.getsrcs.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/extractors/streamwish.d.ts +1 -1
- package/lib/typescript/commonjs/src/extractors/streamwish.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/extractors/vidcloud.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/extractors/voe.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +2 -2
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/models/types.d.ts +2 -1
- package/lib/typescript/commonjs/src/models/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/anime/animeowl.d.ts +76 -0
- package/lib/typescript/commonjs/src/providers/anime/animeowl.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/providers/anime/index.d.ts +2 -0
- package/lib/typescript/commonjs/src/providers/anime/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/anime/zoro.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/meta/tmdb.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/movies/multimovies.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/index.d.ts +2 -2
- package/lib/typescript/commonjs/src/utils/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/providers-list.d.ts +1 -1
- package/lib/typescript/commonjs/src/utils/providers-list.d.ts.map +1 -1
- package/lib/typescript/module/src/NativeConsumet.d.ts +2 -2
- package/lib/typescript/module/src/NativeConsumet.d.ts.map +1 -1
- package/lib/typescript/module/src/extractors/index.d.ts +2 -1
- package/lib/typescript/module/src/extractors/index.d.ts.map +1 -1
- package/lib/typescript/module/src/extractors/luffy.d.ts +9 -0
- package/lib/typescript/module/src/extractors/luffy.d.ts.map +1 -0
- package/lib/typescript/module/src/extractors/megacloud/index.d.ts.map +1 -1
- package/lib/typescript/module/src/extractors/megacloud/megacloud.getsrcs.d.ts +11 -0
- package/lib/typescript/module/src/extractors/megacloud/megacloud.getsrcs.d.ts.map +1 -0
- package/lib/typescript/module/src/extractors/streamwish.d.ts +1 -1
- package/lib/typescript/module/src/extractors/streamwish.d.ts.map +1 -1
- package/lib/typescript/module/src/extractors/vidcloud.d.ts.map +1 -1
- package/lib/typescript/module/src/extractors/voe.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +2 -2
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/models/types.d.ts +2 -1
- package/lib/typescript/module/src/models/types.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/anime/animeowl.d.ts +76 -0
- package/lib/typescript/module/src/providers/anime/animeowl.d.ts.map +1 -0
- package/lib/typescript/module/src/providers/anime/index.d.ts +2 -0
- package/lib/typescript/module/src/providers/anime/index.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/anime/zoro.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/meta/tmdb.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/movies/multimovies.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/index.d.ts +2 -2
- package/lib/typescript/module/src/utils/index.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/providers-list.d.ts +1 -1
- package/lib/typescript/module/src/utils/providers-list.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/NativeConsumet.ts +2 -2
- package/src/extractors/index.ts +2 -0
- package/src/extractors/luffy.ts +33 -0
- package/src/extractors/megacloud/index.ts +2 -5
- package/src/extractors/megacloud/megacloud.getsrcs.ts +63 -0
- package/src/extractors/streamwish.ts +2 -2
- package/src/extractors/vidcloud.ts +6 -20
- package/src/extractors/vidhide.ts +2 -2
- package/src/extractors/voe.ts +65 -33
- package/src/index.tsx +137 -135
- package/src/models/types.ts +1 -0
- package/src/providers/anime/animeowl.ts +565 -0
- package/src/providers/anime/index.ts +2 -0
- package/src/providers/anime/zoro.ts +1 -2
- package/src/providers/meta/anilist.ts +5 -5
- package/src/providers/meta/tmdb.ts +1 -2
- package/src/providers/movies/himovies.ts +495 -495
- package/src/providers/movies/multimovies.ts +3 -3
- package/src/utils/index.ts +2 -0
- package/src/utils/providers-list.ts +1 -0
- package/android/src/main/assets/crypto-js.js +0 -1
- package/android/src/main/assets/megacloud.decodedpng.js +0 -606
- package/android/src/main/assets/megacloud.getsrcs.js +0 -832
package/src/NativeConsumet.ts
CHANGED
|
@@ -2,7 +2,6 @@ import type { TurboModule } from 'react-native';
|
|
|
2
2
|
import { TurboModuleRegistry } from 'react-native';
|
|
3
3
|
|
|
4
4
|
export interface Spec extends TurboModule {
|
|
5
|
-
getSources(embedUrl: string, site: string): Promise<string>;
|
|
6
5
|
bypassDdosGuard(url: string): Promise<{ cookie: string }>;
|
|
7
6
|
getDdosGuardCookiesWithWebView(url: string): Promise<string>;
|
|
8
7
|
makeGetRequestWithWebView(
|
|
@@ -14,6 +13,7 @@ export interface Spec extends TurboModule {
|
|
|
14
13
|
cookies: string;
|
|
15
14
|
status: string;
|
|
16
15
|
}>;
|
|
16
|
+
deobfuscateScript: (source: string) => Promise<string | null>;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
const NativeConsumet = TurboModuleRegistry.getEnforcing<Spec>('Consumet');
|
|
@@ -21,6 +21,6 @@ const NativeConsumet = TurboModuleRegistry.getEnforcing<Spec>('Consumet');
|
|
|
21
21
|
export const bypassDdosGuard = NativeConsumet.bypassDdosGuard;
|
|
22
22
|
export const getDdosGuardCookiesWithWebView = NativeConsumet.getDdosGuardCookiesWithWebView;
|
|
23
23
|
export const makeGetRequestWithWebView = NativeConsumet.makeGetRequestWithWebView;
|
|
24
|
-
export const
|
|
24
|
+
export const deobfuscateScript = NativeConsumet.deobfuscateScript;
|
|
25
25
|
|
|
26
26
|
export default NativeConsumet;
|
package/src/extractors/index.ts
CHANGED
|
@@ -20,6 +20,7 @@ import VizCloud from './vizcloud';
|
|
|
20
20
|
import VidHide from './vidhide';
|
|
21
21
|
import Voe from './voe';
|
|
22
22
|
import { MegaUp } from './megaup';
|
|
23
|
+
import Luffy from './luffy';
|
|
23
24
|
|
|
24
25
|
export {
|
|
25
26
|
AsianLoad,
|
|
@@ -44,4 +45,5 @@ export {
|
|
|
44
45
|
VidHide,
|
|
45
46
|
Voe,
|
|
46
47
|
MegaUp,
|
|
48
|
+
Luffy,
|
|
47
49
|
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { VideoExtractor, type IVideo } from '../models';
|
|
2
|
+
import { deobfuscateScript } from '../NativeConsumet';
|
|
3
|
+
|
|
4
|
+
class Luffy extends VideoExtractor {
|
|
5
|
+
protected override serverName = 'luffy';
|
|
6
|
+
protected override sources: IVideo[] = [];
|
|
7
|
+
|
|
8
|
+
private readonly host = 'https://animeowl.me';
|
|
9
|
+
|
|
10
|
+
override extract = async (videoUrl: URL): Promise<IVideo[]> => {
|
|
11
|
+
try {
|
|
12
|
+
const { data: server } = await this.client.get(videoUrl.href!);
|
|
13
|
+
const jwtRegex = /([A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+)/;
|
|
14
|
+
const { data: script } = await this.client.get(`${this.host}/players/${videoUrl.href!.split('/').pop()}.v2.js`);
|
|
15
|
+
const c = await deobfuscateScript(script);
|
|
16
|
+
|
|
17
|
+
const jwt = c ? jwtRegex.exec(c!)![0] : '';
|
|
18
|
+
server.luffy?.map((item: any) => {
|
|
19
|
+
this.sources.push({
|
|
20
|
+
quality: item.url.match(/[?&]resolution=([^&]+)/)?.[1],
|
|
21
|
+
url: item.url + jwt,
|
|
22
|
+
isM3U8: item.url.includes('.m3u8'),
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
return this.sources ?? ([] as IVideo[]);
|
|
27
|
+
} catch (err) {
|
|
28
|
+
console.log(err);
|
|
29
|
+
throw new Error((err as Error).message);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export default Luffy;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ISource, type IVideo, VideoExtractor } from '../../models';
|
|
2
|
-
import { getSources } from '
|
|
2
|
+
import { getSources } from './megacloud.getsrcs';
|
|
3
3
|
|
|
4
4
|
class MegaCloud extends VideoExtractor {
|
|
5
5
|
protected override serverName = 'MegaCloud';
|
|
@@ -19,10 +19,7 @@ class MegaCloud extends VideoExtractor {
|
|
|
19
19
|
},
|
|
20
20
|
sources: [],
|
|
21
21
|
};
|
|
22
|
-
const
|
|
23
|
-
const xrax = embedIframeURL.toString().match(regex)?.[1];
|
|
24
|
-
const jsonResponse = await getSources(embedIframeURL.href, referer);
|
|
25
|
-
const resp = JSON.parse(jsonResponse);
|
|
22
|
+
const resp = await getSources(embedIframeURL, referer);
|
|
26
23
|
|
|
27
24
|
if (!resp) return extractedData;
|
|
28
25
|
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import CryptoJS from 'crypto-js';
|
|
2
|
+
import { USER_AGENT } from '../../utils/utils';
|
|
3
|
+
import axios from 'axios';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Thanks to https://github.com/yogesh-hacker for the key's api
|
|
7
|
+
* Thanks to https://github.com/illusionTBA for the key's api
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
export async function getSources(embed_url: URL, site: string) {
|
|
11
|
+
const regex = /\/([^\/?]+)(?=\?)/;
|
|
12
|
+
const xrax = embed_url.toString().match(regex)?.[1];
|
|
13
|
+
const basePath = embed_url.pathname.split('/').slice(0, 4).join('/');
|
|
14
|
+
const url = `${embed_url.origin}${basePath}/getSources?id=${xrax}`;
|
|
15
|
+
|
|
16
|
+
const getKeyType = url.includes('mega') ? 'mega' : url.includes('videostr') ? 'vidstr' : 'rabbit';
|
|
17
|
+
|
|
18
|
+
//gets the base64 encoded string from the URL and key in parallel
|
|
19
|
+
let key;
|
|
20
|
+
let data;
|
|
21
|
+
|
|
22
|
+
try {
|
|
23
|
+
[{ data }, { data: key }] = await Promise.all([
|
|
24
|
+
axios.get(url, {
|
|
25
|
+
headers: {
|
|
26
|
+
'User-Agent': USER_AGENT,
|
|
27
|
+
'Referer': site,
|
|
28
|
+
'X-Requested-With': 'XMLHttpRequest',
|
|
29
|
+
},
|
|
30
|
+
}),
|
|
31
|
+
axios.get('https://raw.githubusercontent.com/yogesh-hacker/MegacloudKeys/refs/heads/main/keys.json'),
|
|
32
|
+
]);
|
|
33
|
+
} catch (err) {
|
|
34
|
+
[{ data }, { data: key }] = await Promise.all([
|
|
35
|
+
axios.get(url, {
|
|
36
|
+
headers: {
|
|
37
|
+
'User-Agent': USER_AGENT,
|
|
38
|
+
'Referer': site,
|
|
39
|
+
'X-Requested-With': 'XMLHttpRequest',
|
|
40
|
+
},
|
|
41
|
+
}),
|
|
42
|
+
axios.get('https://keys.hs.vc/'),
|
|
43
|
+
]);
|
|
44
|
+
|
|
45
|
+
// Transform keys.hs.vc format to match yogesh-hacker format
|
|
46
|
+
if (key.megacloud && key.rabbitstream) {
|
|
47
|
+
key = {
|
|
48
|
+
mega: key.megacloud.key,
|
|
49
|
+
vidstr: key.rabbitstream.key,
|
|
50
|
+
rabbit: key.rabbitstream.key,
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const sources = JSON.parse(CryptoJS.AES.decrypt(data.sources, key[getKeyType]).toString(CryptoJS.enc.Utf8));
|
|
56
|
+
|
|
57
|
+
return {
|
|
58
|
+
sources,
|
|
59
|
+
tracks: data.tracks,
|
|
60
|
+
intro: data?.intro,
|
|
61
|
+
outro: data?.outro,
|
|
62
|
+
};
|
|
63
|
+
}
|
|
@@ -7,7 +7,7 @@ class StreamWish extends VideoExtractor {
|
|
|
7
7
|
|
|
8
8
|
override extract = async (
|
|
9
9
|
videoUrl: URL,
|
|
10
|
-
|
|
10
|
+
referer?: string
|
|
11
11
|
): Promise<{ sources: IVideo[] } & { subtitles: ISubtitle[] }> => {
|
|
12
12
|
try {
|
|
13
13
|
const options = {
|
|
@@ -19,7 +19,7 @@ class StreamWish extends VideoExtractor {
|
|
|
19
19
|
'Cache-Control': 'max-age=0',
|
|
20
20
|
'Priority': 'u=0, i',
|
|
21
21
|
'Origin': videoUrl.origin,
|
|
22
|
-
'Referer':
|
|
22
|
+
'Referer': referer ?? videoUrl.origin,
|
|
23
23
|
'Sec-Ch-Ua': '"Google Chrome";v="129", "Not=A?Brand";v="8", "Chromium";v="129"',
|
|
24
24
|
'Sec-Ch-Ua-Mobile': '?0',
|
|
25
25
|
'Sec-Ch-Ua-Platform': 'Windows',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VideoExtractor, type IVideo, type ISubtitle, type Intro } from '../models';
|
|
2
2
|
import { USER_AGENT } from '../utils';
|
|
3
|
-
import { getSources } from '
|
|
3
|
+
import { getSources } from './megacloud/megacloud.getsrcs';
|
|
4
4
|
|
|
5
5
|
class VidCloud extends VideoExtractor {
|
|
6
6
|
protected override serverName = 'VidCloud';
|
|
@@ -24,23 +24,9 @@ class VidCloud extends VideoExtractor {
|
|
|
24
24
|
},
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
-
const
|
|
28
|
-
const xrax = videoUrl.toString().match(regex)?.[1];
|
|
29
|
-
const jsonResponse = await getSources(videoUrl.href, referer);
|
|
30
|
-
const res = JSON.parse(jsonResponse);
|
|
31
|
-
const sources = res.sources;
|
|
27
|
+
const resp = await getSources(videoUrl, referer);
|
|
32
28
|
|
|
33
|
-
|
|
34
|
-
url: s.file,
|
|
35
|
-
isM3U8: s.file.includes('.m3u8') || s.file.endsWith('m3u8'),
|
|
36
|
-
}));
|
|
37
|
-
|
|
38
|
-
result.sources.push(...this.sources);
|
|
39
|
-
|
|
40
|
-
result.sources = [];
|
|
41
|
-
this.sources = [];
|
|
42
|
-
|
|
43
|
-
for (const source of sources) {
|
|
29
|
+
for (const source of resp.sources) {
|
|
44
30
|
const { data } = await this.client.get(source.file, options);
|
|
45
31
|
const urls = data
|
|
46
32
|
.split('\n')
|
|
@@ -65,12 +51,12 @@ class VidCloud extends VideoExtractor {
|
|
|
65
51
|
}
|
|
66
52
|
|
|
67
53
|
result.sources.push({
|
|
68
|
-
url: sources
|
|
69
|
-
isM3U8: sources
|
|
54
|
+
url: resp.sources.file,
|
|
55
|
+
isM3U8: resp.sources.file.includes('.m3u8') || resp.sources.file.endsWith('m3u8'),
|
|
70
56
|
quality: 'auto',
|
|
71
57
|
});
|
|
72
58
|
|
|
73
|
-
result.subtitles =
|
|
59
|
+
result.subtitles = resp.tracks.map((s: any) => ({
|
|
74
60
|
url: s.file,
|
|
75
61
|
lang: s.label ? s.label : 'Default (maybe)',
|
|
76
62
|
}));
|
|
@@ -16,8 +16,8 @@ class VidHide extends VideoExtractor {
|
|
|
16
16
|
});
|
|
17
17
|
|
|
18
18
|
const unpackedData = eval(/(eval)(\(f.*?)(\n<\/script>)/s.exec(data)![2]!.replace('eval', ''));
|
|
19
|
-
const links = unpackedData.match(
|
|
20
|
-
const m3u8Link = links[
|
|
19
|
+
const links = unpackedData.match(/https?:\/\/[^"]+?\.m3u8[^"]*/g) ?? [];
|
|
20
|
+
const m3u8Link = links[0];
|
|
21
21
|
const m3u8Content = await this.client.get(m3u8Link, {
|
|
22
22
|
headers: {
|
|
23
23
|
Referer: m3u8Link,
|
package/src/extractors/voe.ts
CHANGED
|
@@ -10,6 +10,61 @@ class Voe extends VideoExtractor {
|
|
|
10
10
|
|
|
11
11
|
override extract = async (videoUrl: URL): Promise<{ sources: IVideo[] } & { subtitles: ISubtitle[] }> => {
|
|
12
12
|
try {
|
|
13
|
+
function decryptF7(p8: string): Record<string, any> {
|
|
14
|
+
try {
|
|
15
|
+
const vF = rot13(p8);
|
|
16
|
+
const vF2 = replacePatterns(vF);
|
|
17
|
+
const vF3 = removeUnderscores(vF2);
|
|
18
|
+
const vF4 = base64Decode(vF3);
|
|
19
|
+
const vF5 = charShift(vF4, 3);
|
|
20
|
+
const vF6 = reverse(vF5);
|
|
21
|
+
const vAtob = base64Decode(vF6);
|
|
22
|
+
|
|
23
|
+
return JSON.parse(vAtob);
|
|
24
|
+
} catch (e) {
|
|
25
|
+
console.error('Decryption error:', e);
|
|
26
|
+
return {};
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function rot13(input: string): string {
|
|
31
|
+
return input.replace(/[a-zA-Z]/g, (c) => {
|
|
32
|
+
const base = c <= 'Z' ? 65 : 97;
|
|
33
|
+
return String.fromCharCode(((c.charCodeAt(0) - base + 13) % 26) + base);
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function replacePatterns(input: string): string {
|
|
38
|
+
const patterns = ['@$', '^^', '~@', '%?', '*~', '!!', '#&'];
|
|
39
|
+
let result = input;
|
|
40
|
+
for (const pattern of patterns) {
|
|
41
|
+
const regex = new RegExp(pattern.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, '\\$1'), 'g');
|
|
42
|
+
result = result.replace(regex, '_');
|
|
43
|
+
}
|
|
44
|
+
return result;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function removeUnderscores(input: string): string {
|
|
48
|
+
return input.replace(/_/g, '');
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function charShift(input: string, shift: number): string {
|
|
52
|
+
return [...input].map((c) => String.fromCharCode(c.charCodeAt(0) - shift)).join('');
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function reverse(input: string): string {
|
|
56
|
+
return input.split('').reverse().join('');
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function base64Decode(input: string): string {
|
|
60
|
+
try {
|
|
61
|
+
return Buffer.from(input, 'base64').toString('utf-8');
|
|
62
|
+
} catch (e) {
|
|
63
|
+
console.error('Base64 decode failed:', e);
|
|
64
|
+
return '';
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
13
68
|
const res = await this.client.get(videoUrl.href);
|
|
14
69
|
const $ = load(res.data);
|
|
15
70
|
const scriptContent = $('script').html();
|
|
@@ -19,42 +74,20 @@ class Voe extends VideoExtractor {
|
|
|
19
74
|
|
|
20
75
|
const { data } = await this.client.get(pageUrl);
|
|
21
76
|
const $$ = load(data);
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
const subtitleRegex = /<track\s+kind="subtitles"\s+label="([^"]+)"\s+srclang="([^"]+)"\s+src="([^"]+)"/g;
|
|
26
|
-
let subtitles: ISubtitle[] = [];
|
|
27
|
-
let match;
|
|
28
|
-
while ((match = subtitleRegex.exec(bodyHtml)) !== null) {
|
|
29
|
-
subtitles.push({
|
|
30
|
-
lang: match[1]!,
|
|
31
|
-
url: new URL(match[3]!, videoUrl.origin).href,
|
|
32
|
-
});
|
|
33
|
-
}
|
|
77
|
+
const encodedString = $$('script[type="application/json"]').html()?.trim() || '';
|
|
78
|
+
const jsonData = decryptF7(encodedString);
|
|
34
79
|
|
|
35
|
-
let
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
if (match && match[1]) {
|
|
42
|
-
thumbnailSrc = match[1];
|
|
43
|
-
return false;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
if (thumbnailSrc) {
|
|
48
|
-
subtitles.push({
|
|
49
|
-
lang: 'thumbnails',
|
|
50
|
-
url: `${videoUrl.origin}${thumbnailSrc}`,
|
|
51
|
-
});
|
|
52
|
-
}
|
|
80
|
+
let url = jsonData.source;
|
|
81
|
+
let siteName = jsonData.site_name;
|
|
82
|
+
let subtitles = jsonData.captions.map((sub: { file: string; label: string }) => ({
|
|
83
|
+
lang: sub.label,
|
|
84
|
+
url: `https://${siteName}${sub.file}`,
|
|
85
|
+
})) as ISubtitle[];
|
|
53
86
|
|
|
54
87
|
this.sources.push({
|
|
55
|
-
url:
|
|
88
|
+
url: url,
|
|
56
89
|
quality: 'default',
|
|
57
|
-
isM3U8:
|
|
90
|
+
isM3U8: url.includes('.m3u8'),
|
|
58
91
|
});
|
|
59
92
|
|
|
60
93
|
return {
|
|
@@ -62,7 +95,6 @@ class Voe extends VideoExtractor {
|
|
|
62
95
|
subtitles: subtitles,
|
|
63
96
|
};
|
|
64
97
|
} catch (err) {
|
|
65
|
-
console.log(err);
|
|
66
98
|
throw new Error((err as Error).message);
|
|
67
99
|
}
|
|
68
100
|
};
|
package/src/index.tsx
CHANGED
|
@@ -1,135 +1,137 @@
|
|
|
1
|
-
import 'react-native-url-polyfill/auto';
|
|
2
|
-
|
|
3
|
-
import { ANIME, COMICS, LIGHT_NOVELS, MANGA, MOVIES, META, NEWS } from './providers';
|
|
4
|
-
import { PROVIDERS_LIST } from './utils/providers-list';
|
|
5
|
-
import {
|
|
6
|
-
AsianLoad,
|
|
7
|
-
BilibiliExtractor,
|
|
8
|
-
Filemoon,
|
|
9
|
-
GogoCDN,
|
|
10
|
-
Kwik,
|
|
11
|
-
MixDrop,
|
|
12
|
-
Mp4Upload,
|
|
13
|
-
RapidCloud,
|
|
14
|
-
SmashyStream,
|
|
15
|
-
StreamHub,
|
|
16
|
-
StreamLare,
|
|
17
|
-
StreamSB,
|
|
18
|
-
StreamTape,
|
|
19
|
-
StreamWish,
|
|
20
|
-
VidCloud,
|
|
21
|
-
VidMoly,
|
|
22
|
-
VizCloud,
|
|
23
|
-
Mp4Player,
|
|
24
|
-
MegaCloud,
|
|
25
|
-
VidHide,
|
|
26
|
-
Voe,
|
|
27
|
-
MegaUp,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
type
|
|
32
|
-
type
|
|
33
|
-
type
|
|
34
|
-
type
|
|
35
|
-
type
|
|
36
|
-
type
|
|
37
|
-
type
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
type
|
|
43
|
-
type
|
|
44
|
-
type
|
|
45
|
-
type
|
|
46
|
-
type
|
|
47
|
-
type
|
|
48
|
-
type
|
|
49
|
-
type
|
|
50
|
-
type
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
type
|
|
54
|
-
type
|
|
55
|
-
type
|
|
56
|
-
type
|
|
57
|
-
type
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
type
|
|
63
|
-
type
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
type
|
|
67
|
-
type
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
export {
|
|
72
|
-
export {
|
|
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
|
-
|
|
1
|
+
import 'react-native-url-polyfill/auto';
|
|
2
|
+
|
|
3
|
+
import { ANIME, COMICS, LIGHT_NOVELS, MANGA, MOVIES, META, NEWS } from './providers';
|
|
4
|
+
import { PROVIDERS_LIST } from './utils/providers-list';
|
|
5
|
+
import {
|
|
6
|
+
AsianLoad,
|
|
7
|
+
BilibiliExtractor,
|
|
8
|
+
Filemoon,
|
|
9
|
+
GogoCDN,
|
|
10
|
+
Kwik,
|
|
11
|
+
MixDrop,
|
|
12
|
+
Mp4Upload,
|
|
13
|
+
RapidCloud,
|
|
14
|
+
SmashyStream,
|
|
15
|
+
StreamHub,
|
|
16
|
+
StreamLare,
|
|
17
|
+
StreamSB,
|
|
18
|
+
StreamTape,
|
|
19
|
+
StreamWish,
|
|
20
|
+
VidCloud,
|
|
21
|
+
VidMoly,
|
|
22
|
+
VizCloud,
|
|
23
|
+
Mp4Player,
|
|
24
|
+
MegaCloud,
|
|
25
|
+
VidHide,
|
|
26
|
+
Voe,
|
|
27
|
+
MegaUp,
|
|
28
|
+
Luffy,
|
|
29
|
+
} from './extractors';
|
|
30
|
+
import {
|
|
31
|
+
type IProviderStats,
|
|
32
|
+
type ISearch,
|
|
33
|
+
type IAnimeEpisode,
|
|
34
|
+
type IAnimeInfo,
|
|
35
|
+
type IAnimeResult,
|
|
36
|
+
type IEpisodeServer,
|
|
37
|
+
type IVideo,
|
|
38
|
+
type LibgenBook,
|
|
39
|
+
StreamingServers,
|
|
40
|
+
MediaStatus,
|
|
41
|
+
SubOrSub,
|
|
42
|
+
type IMangaResult,
|
|
43
|
+
type IMangaChapter,
|
|
44
|
+
type IMangaInfo,
|
|
45
|
+
type ILightNovelResult,
|
|
46
|
+
type ILightNovelInfo,
|
|
47
|
+
type ILightNovelChapter,
|
|
48
|
+
type ILightNovelChapterContent,
|
|
49
|
+
type GetComicsComics,
|
|
50
|
+
type ComicRes,
|
|
51
|
+
type IMangaChapterPage,
|
|
52
|
+
TvType,
|
|
53
|
+
type IMovieEpisode,
|
|
54
|
+
type IMovieInfo,
|
|
55
|
+
type ISource,
|
|
56
|
+
type ISubtitle,
|
|
57
|
+
type IMovieResult,
|
|
58
|
+
type Intro,
|
|
59
|
+
Genres,
|
|
60
|
+
type INewsFeed,
|
|
61
|
+
Topics,
|
|
62
|
+
type INewsInfo,
|
|
63
|
+
type FuzzyDate,
|
|
64
|
+
type ITitle,
|
|
65
|
+
MediaFormat,
|
|
66
|
+
type ProxyConfig,
|
|
67
|
+
type AniZipEpisode,
|
|
68
|
+
type IMovieSeason,
|
|
69
|
+
} from './models';
|
|
70
|
+
|
|
71
|
+
export { ANIME, COMICS, MANGA, LIGHT_NOVELS, MOVIES, META, NEWS };
|
|
72
|
+
export { PROVIDERS_LIST };
|
|
73
|
+
export {
|
|
74
|
+
Topics,
|
|
75
|
+
Genres,
|
|
76
|
+
SubOrSub,
|
|
77
|
+
StreamingServers,
|
|
78
|
+
MediaStatus,
|
|
79
|
+
TvType,
|
|
80
|
+
MediaFormat,
|
|
81
|
+
GogoCDN,
|
|
82
|
+
StreamSB,
|
|
83
|
+
VidCloud,
|
|
84
|
+
MixDrop,
|
|
85
|
+
Kwik,
|
|
86
|
+
RapidCloud,
|
|
87
|
+
StreamTape,
|
|
88
|
+
StreamLare,
|
|
89
|
+
StreamHub,
|
|
90
|
+
SmashyStream,
|
|
91
|
+
VizCloud,
|
|
92
|
+
AsianLoad,
|
|
93
|
+
BilibiliExtractor,
|
|
94
|
+
Filemoon,
|
|
95
|
+
Mp4Upload,
|
|
96
|
+
StreamWish,
|
|
97
|
+
VidMoly,
|
|
98
|
+
MegaUp,
|
|
99
|
+
Mp4Player,
|
|
100
|
+
MegaCloud,
|
|
101
|
+
VidHide,
|
|
102
|
+
Voe,
|
|
103
|
+
Luffy,
|
|
104
|
+
};
|
|
105
|
+
export type {
|
|
106
|
+
IProviderStats,
|
|
107
|
+
IAnimeEpisode,
|
|
108
|
+
IAnimeInfo,
|
|
109
|
+
IAnimeResult,
|
|
110
|
+
IEpisodeServer,
|
|
111
|
+
IVideo,
|
|
112
|
+
LibgenBook,
|
|
113
|
+
IMangaResult,
|
|
114
|
+
IMangaChapter,
|
|
115
|
+
IMangaInfo,
|
|
116
|
+
ILightNovelResult,
|
|
117
|
+
ILightNovelInfo,
|
|
118
|
+
ILightNovelChapter,
|
|
119
|
+
ILightNovelChapterContent,
|
|
120
|
+
GetComicsComics,
|
|
121
|
+
ComicRes,
|
|
122
|
+
ISearch,
|
|
123
|
+
IMangaChapterPage,
|
|
124
|
+
IMovieEpisode,
|
|
125
|
+
IMovieInfo,
|
|
126
|
+
ISource,
|
|
127
|
+
ISubtitle,
|
|
128
|
+
IMovieResult,
|
|
129
|
+
Intro,
|
|
130
|
+
INewsFeed,
|
|
131
|
+
INewsInfo,
|
|
132
|
+
FuzzyDate,
|
|
133
|
+
ITitle,
|
|
134
|
+
ProxyConfig,
|
|
135
|
+
AniZipEpisode,
|
|
136
|
+
IMovieSeason,
|
|
137
|
+
};
|