react-native-consumet 1.0.0-rc.0 → 1.0.0-rc.2
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/generated/java/com/consumet/NativeConsumetSpec.java +4 -0
- package/android/generated/jni/RNConsumetSpec-generated.cpp +6 -0
- package/android/generated/jni/react/renderer/components/RNConsumetSpec/RNConsumetSpecJSI-generated.cpp +8 -0
- package/android/generated/jni/react/renderer/components/RNConsumetSpec/RNConsumetSpecJSI.h +9 -0
- package/android/src/main/java/com/consumet/ConsumetModule.kt +7 -0
- package/android/src/main/java/com/consumet/DdosGuardModule.kt +248 -189
- package/ios/generated/RNConsumetSpec/RNConsumetSpec-generated.mm +7 -0
- package/ios/generated/RNConsumetSpec/RNConsumetSpec.h +2 -0
- package/ios/generated/RNConsumetSpecJSI-generated.cpp +8 -0
- package/ios/generated/RNConsumetSpecJSI.h +9 -0
- package/lib/commonjs/NativeConsumet.ts +28 -26
- package/lib/commonjs/extension-registry.json +13 -13
- package/lib/commonjs/extractors/filemoon.js +2 -2
- package/lib/commonjs/extractors/kwik.js +60 -15
- package/lib/commonjs/extractors/kwik.js.map +1 -1
- package/lib/commonjs/extractors/megacloud.js +6 -6
- package/lib/commonjs/index.js +2 -11
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/models/types.js +4 -4
- package/lib/commonjs/models/video-extractor.js +4 -4
- package/lib/commonjs/providers/anime/animedrive.js +12 -12
- package/lib/commonjs/providers/anime/animekai.js +41 -41
- package/lib/commonjs/providers/anime/animepahe/animepahe.js +16 -15
- package/lib/commonjs/providers/anime/animepahe/animepahe.js.map +1 -1
- package/lib/commonjs/providers/anime/animepahe/create-animepahe.js +12 -9
- package/lib/commonjs/providers/anime/animepahe/create-animepahe.js.map +1 -1
- package/lib/commonjs/providers/anime/animesuge/animesuge.js +78 -0
- package/lib/commonjs/providers/anime/animesuge/animesuge.js.map +1 -0
- package/lib/commonjs/providers/anime/animesuge/create-animesuge.js +312 -0
- package/lib/commonjs/providers/anime/animesuge/create-animesuge.js.map +1 -0
- package/lib/commonjs/providers/anime/animeunity.js +13 -13
- package/lib/commonjs/providers/anime/index.js +4 -4
- package/lib/commonjs/providers/anime/index.js.map +1 -1
- package/lib/commonjs/providers/anime/marin.js +12 -12
- package/lib/commonjs/providers/anime/zoro/create-zoro.js +2 -2
- package/lib/commonjs/providers/anime/zoro/create-zoro.js.map +1 -1
- package/lib/commonjs/providers/anime/zoro/zoro.js +76 -74
- package/lib/commonjs/providers/anime/zoro/zoro.js.map +1 -1
- package/lib/commonjs/providers/manga/brmangas.js +3 -3
- package/lib/commonjs/providers/meta/anilist.js +91 -91
- package/lib/commonjs/providers/meta/mal.js +12 -12
- package/lib/commonjs/providers/meta/tmdb.js +21 -21
- package/lib/commonjs/providers/movies/himovies/create-himovies.js +16 -16
- package/lib/commonjs/providers/movies/himovies/himovies.js +16 -16
- package/lib/commonjs/providers/movies/multimovies.js +15 -15
- package/lib/commonjs/providers/movies/multistream/index.js +21 -20
- package/lib/commonjs/providers/movies/multistream/index.js.map +1 -1
- package/lib/commonjs/providers/movies/multistream/utils.js +142 -130
- package/lib/commonjs/providers/movies/multistream/utils.js.map +1 -1
- package/lib/commonjs/utils/ExtractorManager.js +15 -15
- package/lib/commonjs/utils/ExtractorManager.js.map +1 -1
- package/lib/commonjs/utils/ProviderManager.js +2 -1
- package/lib/commonjs/utils/ProviderManager.js.map +1 -1
- package/lib/commonjs/utils/create-extractor-context.js +9 -1
- package/lib/commonjs/utils/create-extractor-context.js.map +1 -1
- package/lib/commonjs/utils/create-provider-context.js +6 -2
- package/lib/commonjs/utils/create-provider-context.js.map +1 -1
- package/lib/commonjs/utils/extension-utils.js +44 -54
- package/lib/commonjs/utils/extension-utils.js.map +1 -1
- package/lib/commonjs/utils/index.js +2 -2
- package/lib/commonjs/utils/provider-maps.js +31 -0
- package/lib/commonjs/utils/provider-maps.js.map +1 -0
- package/lib/commonjs/utils/providers-list.js +4 -4
- package/lib/commonjs/utils/url-polyfill.js +4 -4
- package/lib/module/NativeConsumet.ts +28 -26
- package/lib/module/extension-registry.json +13 -13
- package/lib/module/extractors/filemoon.js +2 -2
- package/lib/module/extractors/kwik.js +60 -15
- package/lib/module/extractors/kwik.js.map +1 -1
- package/lib/module/extractors/megacloud.js +6 -6
- package/lib/module/index.js +3 -7
- package/lib/module/index.js.map +1 -1
- package/lib/module/models/types.js +4 -4
- package/lib/module/models/video-extractor.js +4 -4
- package/lib/module/providers/anime/animedrive.js +12 -12
- package/lib/module/providers/anime/animekai.js +41 -41
- package/lib/module/providers/anime/animepahe/animepahe.js +14 -14
- package/lib/module/providers/anime/animepahe/animepahe.js.map +1 -1
- package/lib/module/providers/anime/animepahe/create-animepahe.js +13 -9
- package/lib/module/providers/anime/animepahe/create-animepahe.js.map +1 -1
- package/lib/module/providers/anime/animesuge/animesuge.js +73 -0
- package/lib/module/providers/anime/animesuge/animesuge.js.map +1 -0
- package/lib/module/providers/anime/animesuge/create-animesuge.js +309 -0
- package/lib/module/providers/anime/animesuge/create-animesuge.js.map +1 -0
- package/lib/module/providers/anime/animeunity.js +13 -13
- package/lib/module/providers/anime/index.js +2 -2
- package/lib/module/providers/anime/index.js.map +1 -1
- package/lib/module/providers/anime/marin.js +12 -12
- package/lib/module/providers/anime/zoro/create-zoro.js +3 -2
- package/lib/module/providers/anime/zoro/create-zoro.js.map +1 -1
- package/lib/module/providers/anime/zoro/zoro.js +74 -73
- package/lib/module/providers/anime/zoro/zoro.js.map +1 -1
- package/lib/module/providers/manga/brmangas.js +3 -3
- package/lib/module/providers/meta/anilist.js +91 -91
- package/lib/module/providers/meta/mal.js +12 -12
- package/lib/module/providers/meta/tmdb.js +21 -21
- package/lib/module/providers/movies/himovies/create-himovies.js +16 -16
- package/lib/module/providers/movies/himovies/himovies.js +16 -16
- package/lib/module/providers/movies/multimovies.js +15 -15
- package/lib/module/providers/movies/multistream/index.js +21 -20
- package/lib/module/providers/movies/multistream/index.js.map +1 -1
- package/lib/module/providers/movies/multistream/utils.js +141 -129
- package/lib/module/providers/movies/multistream/utils.js.map +1 -1
- package/lib/module/utils/ExtractorManager.js +16 -16
- package/lib/module/utils/ExtractorManager.js.map +1 -1
- package/lib/module/utils/ProviderManager.js +2 -1
- package/lib/module/utils/ProviderManager.js.map +1 -1
- package/lib/module/utils/create-extractor-context.js +10 -1
- package/lib/module/utils/create-extractor-context.js.map +1 -1
- package/lib/module/utils/create-provider-context.js +8 -4
- package/lib/module/utils/create-provider-context.js.map +1 -1
- package/lib/module/utils/extension-utils.js +23 -33
- package/lib/module/utils/extension-utils.js.map +1 -1
- package/lib/module/utils/index.js +1 -1
- package/lib/module/utils/index.js.map +1 -1
- package/lib/module/utils/provider-maps.js +27 -0
- package/lib/module/utils/provider-maps.js.map +1 -0
- package/lib/module/utils/providers-list.js +4 -4
- package/lib/module/utils/url-polyfill.js +4 -4
- package/lib/typescript/commonjs/src/NativeConsumet.d.ts +2 -0
- package/lib/typescript/commonjs/src/NativeConsumet.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/extractors/kwik.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +6 -6
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/models/extractor-context.d.ts +8 -0
- package/lib/typescript/commonjs/src/models/extractor-context.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/models/index.d.ts +2 -2
- package/lib/typescript/commonjs/src/models/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/models/provider-context.d.ts +6 -2
- package/lib/typescript/commonjs/src/models/provider-context.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/anime/animepahe/animepahe.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/anime/animepahe/create-animepahe.d.ts +1 -1
- package/lib/typescript/commonjs/src/providers/anime/animepahe/create-animepahe.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/anime/animesuge/animesuge.d.ts +34 -0
- package/lib/typescript/commonjs/src/providers/anime/animesuge/animesuge.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/providers/anime/animesuge/create-animesuge.d.ts +14 -0
- package/lib/typescript/commonjs/src/providers/anime/animesuge/create-animesuge.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/providers/anime/index.d.ts +2 -2
- package/lib/typescript/commonjs/src/providers/anime/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/anime/zoro/create-zoro.d.ts +1 -1
- package/lib/typescript/commonjs/src/providers/anime/zoro/create-zoro.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/anime/zoro/zoro.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/movies/multistream/index.d.ts +1 -1
- package/lib/typescript/commonjs/src/providers/movies/multistream/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/movies/multistream/utils.d.ts +2 -2
- package/lib/typescript/commonjs/src/providers/movies/multistream/utils.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/ProviderManager.d.ts +1 -1
- package/lib/typescript/commonjs/src/utils/ProviderManager.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/create-extractor-context.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/create-provider-context.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/extension-utils.d.ts +1 -20
- package/lib/typescript/commonjs/src/utils/extension-utils.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/index.d.ts +2 -1
- package/lib/typescript/commonjs/src/utils/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/provider-maps.d.ts +27 -0
- package/lib/typescript/commonjs/src/utils/provider-maps.d.ts.map +1 -0
- package/lib/typescript/module/src/NativeConsumet.d.ts +2 -0
- package/lib/typescript/module/src/NativeConsumet.d.ts.map +1 -1
- package/lib/typescript/module/src/extractors/kwik.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +6 -6
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/models/extractor-context.d.ts +8 -0
- package/lib/typescript/module/src/models/extractor-context.d.ts.map +1 -1
- package/lib/typescript/module/src/models/index.d.ts +2 -2
- package/lib/typescript/module/src/models/index.d.ts.map +1 -1
- package/lib/typescript/module/src/models/provider-context.d.ts +6 -2
- package/lib/typescript/module/src/models/provider-context.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/anime/animepahe/animepahe.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/anime/animepahe/create-animepahe.d.ts +1 -1
- package/lib/typescript/module/src/providers/anime/animepahe/create-animepahe.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/anime/animesuge/animesuge.d.ts +34 -0
- package/lib/typescript/module/src/providers/anime/animesuge/animesuge.d.ts.map +1 -0
- package/lib/typescript/module/src/providers/anime/animesuge/create-animesuge.d.ts +14 -0
- package/lib/typescript/module/src/providers/anime/animesuge/create-animesuge.d.ts.map +1 -0
- package/lib/typescript/module/src/providers/anime/index.d.ts +2 -2
- package/lib/typescript/module/src/providers/anime/index.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/anime/zoro/create-zoro.d.ts +1 -1
- package/lib/typescript/module/src/providers/anime/zoro/create-zoro.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/anime/zoro/zoro.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/movies/multistream/index.d.ts +1 -1
- package/lib/typescript/module/src/providers/movies/multistream/index.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/movies/multistream/utils.d.ts +2 -2
- package/lib/typescript/module/src/providers/movies/multistream/utils.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/ProviderManager.d.ts +1 -1
- package/lib/typescript/module/src/utils/ProviderManager.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/create-extractor-context.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/create-provider-context.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/extension-utils.d.ts +1 -20
- package/lib/typescript/module/src/utils/extension-utils.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/index.d.ts +2 -1
- package/lib/typescript/module/src/utils/index.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/provider-maps.d.ts +27 -0
- package/lib/typescript/module/src/utils/provider-maps.d.ts.map +1 -0
- package/package.json +6 -2
- package/src/NativeConsumet.ts +2 -0
- package/src/extension-registry.json +81 -81
- package/src/extractors/StreamP2P.ts +60 -60
- package/src/extractors/filemoon.ts +58 -58
- package/src/extractors/index.ts +41 -41
- package/src/extractors/kwik.ts +113 -50
- package/src/extractors/megacloud.ts +163 -163
- package/src/extractors/mixdrop.ts +31 -31
- package/src/extractors/mp4upload.ts +31 -31
- package/src/extractors/streamhub.ts +58 -58
- package/src/extractors/streamwish.ts +120 -120
- package/src/extractors/vidhide.ts +59 -59
- package/src/index.tsx +176 -175
- package/src/models/extension-manifest.ts +77 -77
- package/src/models/extractor-context.ts +55 -41
- package/src/models/index.ts +107 -106
- package/src/models/provider-context.ts +192 -182
- package/src/models/types.ts +531 -531
- package/src/models/video-extractor.ts +48 -48
- package/src/providers/anime/animedrive.ts +245 -245
- package/src/providers/anime/animekai.ts +627 -627
- package/src/providers/anime/animepahe/animepahe.ts +76 -76
- package/src/providers/anime/animepahe/create-animepahe.ts +350 -348
- package/src/providers/anime/animesuge/animesuge.ts +77 -0
- package/src/providers/anime/animesuge/create-animesuge.ts +327 -0
- package/src/providers/anime/animeunity.ts +216 -216
- package/src/providers/anime/index.ts +21 -21
- package/src/providers/anime/marin.ts +319 -319
- package/src/providers/anime/zoro/create-zoro.ts +656 -655
- package/src/providers/anime/zoro/zoro.ts +198 -197
- package/src/providers/index.ts +7 -7
- package/src/providers/manga/brmangas.ts +144 -144
- package/src/providers/meta/anilist.ts +2108 -2108
- package/src/providers/meta/mal.ts +635 -635
- package/src/providers/meta/tmdb.ts +470 -470
- package/src/providers/movies/himovies/create-himovies.ts +529 -529
- package/src/providers/movies/himovies/himovies.ts +90 -90
- package/src/providers/movies/index.ts +15 -15
- package/src/providers/movies/multimovies.ts +495 -495
- package/src/providers/movies/multistream/index.ts +232 -231
- package/src/providers/movies/multistream/utils.ts +147 -270
- package/src/utils/ExtractorManager.ts +311 -311
- package/src/utils/ProviderManager.ts +423 -424
- package/src/utils/create-extractor-context.ts +36 -22
- package/src/utils/create-provider-context.ts +117 -107
- package/src/utils/extension-utils.ts +105 -114
- package/src/utils/index.ts +96 -95
- package/src/utils/provider-maps.ts +31 -0
- package/src/utils/providers-list.ts +27 -27
- package/src/utils/url-polyfill.ts +642 -642
- package/src/utils/utils.ts +374 -374
|
@@ -1,495 +1,495 @@
|
|
|
1
|
-
import axios from 'axios';
|
|
2
|
-
import { load } from 'cheerio';
|
|
3
|
-
import {
|
|
4
|
-
MovieParser,
|
|
5
|
-
TvType,
|
|
6
|
-
type IMovieInfo,
|
|
7
|
-
type IEpisodeServer,
|
|
8
|
-
StreamingServers,
|
|
9
|
-
type ISource,
|
|
10
|
-
type IMovieResult,
|
|
11
|
-
type ISearch,
|
|
12
|
-
} from '../../models';
|
|
13
|
-
import { MixDrop, StreamTape, StreamWish, VidHide } from '../../extractors';
|
|
14
|
-
import { USER_AGENT } from '../../utils';
|
|
15
|
-
|
|
16
|
-
class MultiMovies extends MovieParser {
|
|
17
|
-
override readonly name = 'MultiMovies';
|
|
18
|
-
protected override baseUrl = 'https://multimovies.asia';
|
|
19
|
-
protected override logo =
|
|
20
|
-
'https://multimovies.asia/wp-content/uploads/2024/01/cropped-CompressJPEG.online_512x512_image.png';
|
|
21
|
-
protected override classPath = 'MOVIES.MultiMovies';
|
|
22
|
-
override supportedTypes = new Set([TvType.MOVIE, TvType.TVSERIES]);
|
|
23
|
-
constructor(customBaseURL?: string) {
|
|
24
|
-
super();
|
|
25
|
-
if (customBaseURL) {
|
|
26
|
-
if (customBaseURL.startsWith('http://') || customBaseURL.startsWith('https://')) {
|
|
27
|
-
this.baseUrl = customBaseURL;
|
|
28
|
-
} else {
|
|
29
|
-
this.baseUrl = `http://${customBaseURL}`;
|
|
30
|
-
}
|
|
31
|
-
} else {
|
|
32
|
-
this.baseUrl = this.baseUrl;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
private proxiedBaseUrl = 'https://m3u8proxy.durgeshdwivedi81.workers.dev/v2?url=' + encodeURIComponent(this.baseUrl);
|
|
36
|
-
private customProxyUrl = 'https://m3u8proxy.durgeshdwivedi81.workers.dev/v2?url=';
|
|
37
|
-
/**
|
|
38
|
-
*
|
|
39
|
-
* @param query search query string
|
|
40
|
-
* @param page page number (default 1) (optional)
|
|
41
|
-
*/
|
|
42
|
-
override search = async (query: string, page: number = 1): Promise<ISearch<IMovieResult>> => {
|
|
43
|
-
const searchResult: ISearch<IMovieResult> = {
|
|
44
|
-
currentPage: page,
|
|
45
|
-
hasNextPage: false,
|
|
46
|
-
results: [],
|
|
47
|
-
};
|
|
48
|
-
try {
|
|
49
|
-
let url;
|
|
50
|
-
if (page === 1) {
|
|
51
|
-
url = `${this.proxiedBaseUrl}/?s=${query.replace(/[\W_]+/g, '+')}`;
|
|
52
|
-
} else {
|
|
53
|
-
url = `${this.proxiedBaseUrl}/page/${page}/?s=${query.replace(/[\W_]+/g, '+')}`;
|
|
54
|
-
}
|
|
55
|
-
const { data } = await axios.get(url);
|
|
56
|
-
const $ = load(data);
|
|
57
|
-
|
|
58
|
-
const navSelector = 'div.pagination';
|
|
59
|
-
searchResult.hasNextPage = $(navSelector).find('#nextpagination').length > 0;
|
|
60
|
-
const articles = $('.search-page .result-item article').toArray();
|
|
61
|
-
|
|
62
|
-
await Promise.all(
|
|
63
|
-
articles.map(async (el) => {
|
|
64
|
-
const seasonSet = new Set<number>();
|
|
65
|
-
|
|
66
|
-
const href =
|
|
67
|
-
$(el)
|
|
68
|
-
.find('.thumbnail a')
|
|
69
|
-
.attr('href')
|
|
70
|
-
?.replace(/^https?:\/\/[^/]+\//, '')
|
|
71
|
-
.replace(/^\/|\/$/g, '') ?? '';
|
|
72
|
-
|
|
73
|
-
const episodesInfo = await this.fetchMediaInfo(href);
|
|
74
|
-
const episodes = episodesInfo?.episodes || [];
|
|
75
|
-
|
|
76
|
-
for (const episode of episodes) {
|
|
77
|
-
if (episode.season !== null) {
|
|
78
|
-
seasonSet.add(episode.season!);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
searchResult.results.push({
|
|
82
|
-
id: href,
|
|
83
|
-
title: $(el).find('.details .title a').text().trim(),
|
|
84
|
-
url: $(el).find('.thumbnail a').attr('href') ?? '',
|
|
85
|
-
image: $(el).find('.thumbnail img').attr('src') ?? '',
|
|
86
|
-
rating: parseFloat($(el).find('.meta .rating').text().replace('IMDb ', '')) || 0,
|
|
87
|
-
releaseDate: $(el).find('.meta .year').text().trim(),
|
|
88
|
-
season: seasonSet.size,
|
|
89
|
-
description: $(el).find('.contenido p').text().trim(),
|
|
90
|
-
type: $(el).find('.thumbnail a').attr('href')?.includes('/movies/') ? TvType.MOVIE : TvType.TVSERIES,
|
|
91
|
-
});
|
|
92
|
-
})
|
|
93
|
-
);
|
|
94
|
-
|
|
95
|
-
return searchResult;
|
|
96
|
-
} catch (err) {
|
|
97
|
-
throw new Error((err as Error).message);
|
|
98
|
-
}
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
*
|
|
103
|
-
* @param mediaId media link or id
|
|
104
|
-
*/
|
|
105
|
-
override fetchMediaInfo = async (mediaId: string): Promise<IMovieInfo> => {
|
|
106
|
-
if (!mediaId.startsWith(this.proxiedBaseUrl)) {
|
|
107
|
-
mediaId = `${this.proxiedBaseUrl}/${mediaId}`;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
// Extract the clean media ID from the proxied URL
|
|
111
|
-
let cleanId = mediaId;
|
|
112
|
-
if (mediaId.includes('?url=')) {
|
|
113
|
-
// If it's a proxied URL, extract the original URL and then get the path
|
|
114
|
-
const originalUrl = decodeURIComponent(mediaId.split('?url=')[1]!);
|
|
115
|
-
cleanId = originalUrl.replace(/^https?:\/\/[^/]+\//, '').replace(/^\/|\/$/g, '');
|
|
116
|
-
} else {
|
|
117
|
-
// If it's not proxied, clean it normally
|
|
118
|
-
cleanId = mediaId.replace(/^https?:\/\/[^/]+\//, '').replace(/^\/|\/$/g, '');
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
const movieInfo: IMovieInfo = {
|
|
122
|
-
id: cleanId,
|
|
123
|
-
title: '',
|
|
124
|
-
url: mediaId,
|
|
125
|
-
};
|
|
126
|
-
try {
|
|
127
|
-
const { data } = await axios.get(mediaId);
|
|
128
|
-
const $ = load(data);
|
|
129
|
-
const recommendationsArray: IMovieResult[] = [];
|
|
130
|
-
|
|
131
|
-
$('div#single_relacionados article').each((i, el) => {
|
|
132
|
-
recommendationsArray.push({
|
|
133
|
-
id: $(el)
|
|
134
|
-
.find('a')
|
|
135
|
-
.attr('href')
|
|
136
|
-
?.replace(/^https?:\/\/[^/]+\//, '')
|
|
137
|
-
.replace(/^\/|\/$/g, '')!,
|
|
138
|
-
title: $(el).find('a img').attr('alt')!,
|
|
139
|
-
image: $(el).find('a img').attr('data-src') ?? $(el).find('a img').attr('src'),
|
|
140
|
-
type: $(el).find('.thumbnail a').attr('href')?.includes('/movies/')
|
|
141
|
-
? TvType.TVSERIES
|
|
142
|
-
: (TvType.MOVIE ?? null),
|
|
143
|
-
});
|
|
144
|
-
});
|
|
145
|
-
movieInfo.cover = $('div#info .galeria').first().find('.g-item a').attr('href')?.trim() ?? '';
|
|
146
|
-
movieInfo.title = $('.sheader > .data > h1').text();
|
|
147
|
-
movieInfo.image = $('.sheader > .poster > img').attr('src') ?? $('.sheader > .poster > img').attr('data-src');
|
|
148
|
-
movieInfo.description = $('div#info div[itemprop="description"] p').text();
|
|
149
|
-
movieInfo.type = movieInfo.id.split('/')[0] === 'tvshows' ? TvType.TVSERIES : TvType.MOVIE;
|
|
150
|
-
movieInfo.releaseDate = $('.sheader > .data > .extra > span.date').text().trim();
|
|
151
|
-
movieInfo.trailer = {
|
|
152
|
-
id:
|
|
153
|
-
$('div#trailer .embed iframe').attr('data-litespeed-src')?.split('embed/')[1]?.split('?')[0] ??
|
|
154
|
-
$('div#trailer .embed iframe').attr('src')?.split('embed/')[1]?.split('?')[0]!,
|
|
155
|
-
url: $('div#trailer .embed iframe').attr('data-litespeed-src') ?? $('div#trailer .embed iframe').attr('src'),
|
|
156
|
-
};
|
|
157
|
-
movieInfo.genres = $('.sgeneros a')
|
|
158
|
-
.map((i, el) => $(el).text())
|
|
159
|
-
.get()
|
|
160
|
-
.map((v) => v.trim());
|
|
161
|
-
movieInfo.characters = [];
|
|
162
|
-
$('div#cast .persons .person').each((i, el) => {
|
|
163
|
-
const url = $(el).find('.img > a').attr('href');
|
|
164
|
-
const image = $(el).find('.img > a > img').attr('data-src') ?? $(el).find('.img > a > img').attr('src');
|
|
165
|
-
const name = $(el).find('.data > .name > a').text();
|
|
166
|
-
const character = $(el).find('.data > .caracter').text();
|
|
167
|
-
|
|
168
|
-
(movieInfo.characters as any[]).push({
|
|
169
|
-
url,
|
|
170
|
-
image,
|
|
171
|
-
name,
|
|
172
|
-
character,
|
|
173
|
-
});
|
|
174
|
-
});
|
|
175
|
-
movieInfo.country = $('.sheader > .data > .extra > span.country').text();
|
|
176
|
-
movieInfo.duration = $('.sheader > .data > .extra > span.runtime').text();
|
|
177
|
-
movieInfo.rating = parseFloat($('.starstruck-rating span.dt_rating_vgs[itemprop="ratingValue"]').text());
|
|
178
|
-
movieInfo.recommendations = recommendationsArray as any;
|
|
179
|
-
|
|
180
|
-
if (movieInfo.type === TvType.TVSERIES) {
|
|
181
|
-
movieInfo.episodes = [];
|
|
182
|
-
$('#seasons .se-c').each((i, el) => {
|
|
183
|
-
const seasonNumber = parseInt($(el).find('.se-t').text().trim());
|
|
184
|
-
$(el)
|
|
185
|
-
.find('.episodios li')
|
|
186
|
-
.each((j, ep) => {
|
|
187
|
-
const episode = {
|
|
188
|
-
id: $(ep)
|
|
189
|
-
.find('.episodiotitle a')
|
|
190
|
-
.attr('href')
|
|
191
|
-
?.replace(/^https?:\/\/[^/]+\//, '')
|
|
192
|
-
.replace(/^\/|\/$/g, '')!,
|
|
193
|
-
season: seasonNumber,
|
|
194
|
-
number: parseInt($(ep).find('.numerando').text().trim().split('-')[1]!),
|
|
195
|
-
title: $(ep).find('.episodiotitle a').text().trim(),
|
|
196
|
-
url: $(ep).find('.episodiotitle a').attr('href')?.trim() ?? '',
|
|
197
|
-
releaseDate: String(new Date($(ep).find('.episodiotitle .date').text().trim()).getFullYear()),
|
|
198
|
-
image:
|
|
199
|
-
$(ep).find('.imagen img').attr('data-src')?.trim() ?? $(ep).find('.imagen img').attr('src')?.trim(),
|
|
200
|
-
};
|
|
201
|
-
|
|
202
|
-
movieInfo.episodes?.push(episode);
|
|
203
|
-
});
|
|
204
|
-
});
|
|
205
|
-
} else {
|
|
206
|
-
movieInfo.episodes = [
|
|
207
|
-
{
|
|
208
|
-
id: movieInfo.id,
|
|
209
|
-
title: movieInfo.title,
|
|
210
|
-
url: movieInfo.url,
|
|
211
|
-
image: movieInfo.cover || movieInfo.image,
|
|
212
|
-
},
|
|
213
|
-
];
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
return movieInfo;
|
|
217
|
-
} catch (err) {
|
|
218
|
-
throw new Error((err as Error).message);
|
|
219
|
-
}
|
|
220
|
-
};
|
|
221
|
-
|
|
222
|
-
/**
|
|
223
|
-
*
|
|
224
|
-
* @param episodeId episode id
|
|
225
|
-
* @param media media id
|
|
226
|
-
* @param server server type (default `StreamWish`) (optional)
|
|
227
|
-
*/
|
|
228
|
-
override fetchEpisodeSources = async (
|
|
229
|
-
episodeId: string,
|
|
230
|
-
mediaId?: string, //just placeholder for compatibility with tmdb
|
|
231
|
-
server: StreamingServers = StreamingServers.StreamWish,
|
|
232
|
-
fileId?: string
|
|
233
|
-
): Promise<ISource> => {
|
|
234
|
-
if (episodeId.startsWith('http')) {
|
|
235
|
-
const serverUrl = new URL(episodeId);
|
|
236
|
-
switch (server) {
|
|
237
|
-
case StreamingServers.MixDrop:
|
|
238
|
-
return {
|
|
239
|
-
headers: { Referer: serverUrl.href },
|
|
240
|
-
sources: await new MixDrop().extract(serverUrl),
|
|
241
|
-
download: fileId ? `https://gdmirrorbot.nl/file/${fileId}` : '',
|
|
242
|
-
};
|
|
243
|
-
case StreamingServers.StreamWish:
|
|
244
|
-
return {
|
|
245
|
-
headers: { Referer: serverUrl.href },
|
|
246
|
-
...(await new StreamWish().extract(serverUrl, this.baseUrl)),
|
|
247
|
-
download: fileId ? `${serverUrl.href.toString().replace('/e/', '/f/')}/${fileId}` : '',
|
|
248
|
-
};
|
|
249
|
-
case StreamingServers.StreamTape:
|
|
250
|
-
return {
|
|
251
|
-
headers: { Referer: serverUrl.href },
|
|
252
|
-
sources: await new StreamTape().extract(serverUrl),
|
|
253
|
-
download: fileId ? `https://gdmirrorbot.nl/file/${fileId}` : '',
|
|
254
|
-
};
|
|
255
|
-
case StreamingServers.VidHide:
|
|
256
|
-
return {
|
|
257
|
-
headers: { Referer: serverUrl.href },
|
|
258
|
-
sources: await new VidHide().extract(serverUrl),
|
|
259
|
-
download: fileId ? `https://gdmirrorbot.nl/file/${fileId}` : '',
|
|
260
|
-
};
|
|
261
|
-
default:
|
|
262
|
-
return {
|
|
263
|
-
headers: { Referer: serverUrl.href },
|
|
264
|
-
...(await new StreamWish().extract(serverUrl)),
|
|
265
|
-
download: fileId ? `https://gdmirrorbot.nl/file/${fileId}` : '',
|
|
266
|
-
};
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
try {
|
|
271
|
-
const servers = await this.fetchEpisodeServers(episodeId);
|
|
272
|
-
const i = servers.findIndex((s) => s.name.toLowerCase() === server.toLowerCase());
|
|
273
|
-
if (i === -1) {
|
|
274
|
-
throw new Error(`Server ${server} not found`);
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
const serverUrl: URL = new URL(servers[i]!.url);
|
|
278
|
-
let extractedFileId = '';
|
|
279
|
-
|
|
280
|
-
if (!episodeId.startsWith('http')) {
|
|
281
|
-
const { fileId: id } = await this.getServer(`${this.baseUrl}/${episodeId}`);
|
|
282
|
-
extractedFileId = id ?? '';
|
|
283
|
-
}
|
|
284
|
-
// extractedFileId to be used for download link
|
|
285
|
-
return await this.fetchEpisodeSources(serverUrl.href, mediaId, server, extractedFileId);
|
|
286
|
-
} catch (err) {
|
|
287
|
-
//console.log(err);
|
|
288
|
-
throw new Error((err as Error).message);
|
|
289
|
-
}
|
|
290
|
-
};
|
|
291
|
-
|
|
292
|
-
/**
|
|
293
|
-
*
|
|
294
|
-
* @param episodeId takes episode link or movie id
|
|
295
|
-
*/
|
|
296
|
-
override fetchEpisodeServers = async (episodeId: string): Promise<IEpisodeServer[]> => {
|
|
297
|
-
if (!episodeId.startsWith(this.baseUrl)) {
|
|
298
|
-
episodeId = `${this.baseUrl}/${episodeId}`;
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
try {
|
|
302
|
-
const { servers } = await this.getServer(episodeId);
|
|
303
|
-
return servers;
|
|
304
|
-
} catch (err) {
|
|
305
|
-
//console.log(err);
|
|
306
|
-
throw new Error((err as Error).message);
|
|
307
|
-
}
|
|
308
|
-
};
|
|
309
|
-
|
|
310
|
-
fetchPopular = async (page: number = 1): Promise<ISearch<IMovieResult>> => {
|
|
311
|
-
const result: ISearch<IMovieResult> = {
|
|
312
|
-
currentPage: page,
|
|
313
|
-
hasNextPage: false,
|
|
314
|
-
results: [],
|
|
315
|
-
};
|
|
316
|
-
try {
|
|
317
|
-
const { data } = await axios.get(`${this.proxiedBaseUrl}/trending/page/${page}/`);
|
|
318
|
-
const $ = load(data);
|
|
319
|
-
const navSelector = 'div.pagination';
|
|
320
|
-
|
|
321
|
-
result.hasNextPage = $(navSelector).find('#nextpagination').length > 0;
|
|
322
|
-
$('.items > article')
|
|
323
|
-
.each((i, el) => {
|
|
324
|
-
const resultItem: IMovieResult = {
|
|
325
|
-
id: $(el).attr('id')!,
|
|
326
|
-
title: $(el).find('div.data > h3').text() ?? '',
|
|
327
|
-
url: $(el).find('div.poster > a').attr('href'),
|
|
328
|
-
image: $(el).find('div.poster > img').attr('data-src') ?? '',
|
|
329
|
-
type: $(el).find('div.poster > a').attr('href')?.includes('/movies/') ? TvType.MOVIE : TvType.TVSERIES,
|
|
330
|
-
rating: $(el).find('div.poster > div.rating').text() ?? '',
|
|
331
|
-
releaseDate: $(el).find('div.data > span').text() ?? '',
|
|
332
|
-
};
|
|
333
|
-
result.results.push(resultItem);
|
|
334
|
-
})
|
|
335
|
-
.get();
|
|
336
|
-
|
|
337
|
-
return result;
|
|
338
|
-
} catch (err) {
|
|
339
|
-
throw new Error((err as Error).message);
|
|
340
|
-
}
|
|
341
|
-
};
|
|
342
|
-
|
|
343
|
-
fetchByGenre = async (genre: string, page: number = 1): Promise<ISearch<IMovieResult>> => {
|
|
344
|
-
const result: ISearch<IMovieResult> = {
|
|
345
|
-
currentPage: page,
|
|
346
|
-
hasNextPage: false,
|
|
347
|
-
results: [],
|
|
348
|
-
};
|
|
349
|
-
try {
|
|
350
|
-
const { data } = await axios.get(`${this.proxiedBaseUrl}/genre/${genre}/page/${page}`);
|
|
351
|
-
|
|
352
|
-
const $ = load(data);
|
|
353
|
-
const navSelector = 'div.pagination';
|
|
354
|
-
|
|
355
|
-
result.hasNextPage = $(navSelector).find('#nextpagination').length > 0;
|
|
356
|
-
$('.items > article')
|
|
357
|
-
.each((i, el) => {
|
|
358
|
-
const resultItem: IMovieResult = {
|
|
359
|
-
id: $(el).attr('id')!,
|
|
360
|
-
title: $(el).find('div.data > h3').text() ?? '',
|
|
361
|
-
url: $(el).find('div.poster > a').attr('href'),
|
|
362
|
-
image: $(el).find('div.poster > img').attr('data-src') ?? '',
|
|
363
|
-
type: $(el).find('div.poster > a').attr('href')?.includes('/movies/') ? TvType.MOVIE : TvType.TVSERIES,
|
|
364
|
-
rating: $(el).find('div.poster > div.rating').text() ?? '',
|
|
365
|
-
releaseDate: $(el).find('div.data > span').text() ?? '',
|
|
366
|
-
};
|
|
367
|
-
result.results.push(resultItem);
|
|
368
|
-
})
|
|
369
|
-
.get();
|
|
370
|
-
|
|
371
|
-
return result;
|
|
372
|
-
} catch (err) {
|
|
373
|
-
throw new Error((err as Error).message);
|
|
374
|
-
}
|
|
375
|
-
};
|
|
376
|
-
|
|
377
|
-
private async getServer(url: string): Promise<{ servers: IEpisodeServer[]; fileId: string }> {
|
|
378
|
-
//console.log(`Fetching server for URL: ${url}`);
|
|
379
|
-
try {
|
|
380
|
-
//console.log('step1');
|
|
381
|
-
const { data } = await axios.get(this.customProxyUrl + url);
|
|
382
|
-
const $ = load(data);
|
|
383
|
-
//console.log('step2');
|
|
384
|
-
// Extract player config
|
|
385
|
-
const playerConfig = {
|
|
386
|
-
postId: $('#player-option-1').attr('data-post'),
|
|
387
|
-
nume: $('#player-option-1').attr('data-nume'),
|
|
388
|
-
type: $('#player-option-1').attr('data-type'),
|
|
389
|
-
};
|
|
390
|
-
|
|
391
|
-
if (!playerConfig.postId || !playerConfig.nume || !playerConfig.type) {
|
|
392
|
-
throw new Error('Missing player configuration');
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
const formData = new FormData();
|
|
396
|
-
formData.append('action', 'doo_player_ajax');
|
|
397
|
-
formData.append('post', playerConfig.postId);
|
|
398
|
-
formData.append('nume', playerConfig.nume);
|
|
399
|
-
formData.append('type', playerConfig.type);
|
|
400
|
-
|
|
401
|
-
const headers = {
|
|
402
|
-
'User-Agent': USER_AGENT,
|
|
403
|
-
};
|
|
404
|
-
//console.log(`${this.baseUrl}/wp-admin/admin-ajax.php`, formData);
|
|
405
|
-
const response = await fetch(this.customProxyUrl + `${this.baseUrl}/wp-admin/admin-ajax.php`, {
|
|
406
|
-
method: 'POST',
|
|
407
|
-
headers: headers,
|
|
408
|
-
body: formData,
|
|
409
|
-
});
|
|
410
|
-
const playerRes = await response.json();
|
|
411
|
-
// console.log('playerRes', playerRes);
|
|
412
|
-
const iframeUrl = playerRes?.embed_url?.match(/<iframe[^>]+src="([^"]+)"[^>]*>/i)?.[1] || playerRes?.embed_url;
|
|
413
|
-
|
|
414
|
-
// Handle non-multimovies case
|
|
415
|
-
if (!iframeUrl.includes('multimovies')) {
|
|
416
|
-
if (iframeUrl.includes('dhcplay')) {
|
|
417
|
-
return {
|
|
418
|
-
servers: [{ name: 'StreamWish', url: iframeUrl }],
|
|
419
|
-
fileId: iframeUrl.split('/').pop() ?? '',
|
|
420
|
-
};
|
|
421
|
-
}
|
|
422
|
-
let playerBaseUrl = iframeUrl.split('/').slice(0, 3).join('/');
|
|
423
|
-
const redirectResponse = await axios.head(playerBaseUrl, {
|
|
424
|
-
headers,
|
|
425
|
-
});
|
|
426
|
-
|
|
427
|
-
// Update base URL if redirect occurred
|
|
428
|
-
if (redirectResponse) {
|
|
429
|
-
playerBaseUrl = redirectResponse.request?.responseURL?.split('/').slice(0, 3).join('/');
|
|
430
|
-
}
|
|
431
|
-
const fileId = iframeUrl.split('/').pop();
|
|
432
|
-
|
|
433
|
-
if (!fileId) {
|
|
434
|
-
throw new Error('No player ID found');
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
const streamRequestData = new FormData();
|
|
438
|
-
streamRequestData.append('sid', fileId);
|
|
439
|
-
|
|
440
|
-
const streamResponse = await fetch(`${playerBaseUrl}/embedhelper.php`, {
|
|
441
|
-
headers: headers,
|
|
442
|
-
body: streamRequestData,
|
|
443
|
-
method: 'POST',
|
|
444
|
-
});
|
|
445
|
-
const streamResponseData = await streamResponse.json();
|
|
446
|
-
if (!streamResponseData) {
|
|
447
|
-
throw new Error('No stream data found');
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
const streamDetails = streamResponseData;
|
|
451
|
-
const mresultKeys = new Set(Object.keys(JSON.parse(atob(streamDetails.mresult))));
|
|
452
|
-
const siteUrlsKeys = new Set(Object.keys(streamDetails.siteUrls));
|
|
453
|
-
|
|
454
|
-
// Find common keys
|
|
455
|
-
const commonKeys = [...mresultKeys].filter((key) => siteUrlsKeys.has(key));
|
|
456
|
-
|
|
457
|
-
// Convert to a Set (if needed)
|
|
458
|
-
const commonStreamSites = new Set(commonKeys);
|
|
459
|
-
const servers = Array.from(commonStreamSites).map((site) => {
|
|
460
|
-
return {
|
|
461
|
-
name:
|
|
462
|
-
streamDetails.siteFriendlyNames[site] === 'StreamHG'
|
|
463
|
-
? 'StreamWish'
|
|
464
|
-
: streamDetails.siteFriendlyNames[site] === 'EarnVids'
|
|
465
|
-
? 'VidHide'
|
|
466
|
-
: streamDetails.siteFriendlyNames[site],
|
|
467
|
-
url: streamDetails.siteUrls[site] + JSON.parse(atob(streamDetails.mresult))[site],
|
|
468
|
-
};
|
|
469
|
-
});
|
|
470
|
-
|
|
471
|
-
return { servers, fileId };
|
|
472
|
-
} else {
|
|
473
|
-
return {
|
|
474
|
-
servers: [{ name: 'StreamWish', url: iframeUrl }],
|
|
475
|
-
fileId: iframeUrl.split('/').pop() ?? '',
|
|
476
|
-
};
|
|
477
|
-
}
|
|
478
|
-
} catch (err) {
|
|
479
|
-
//console.log(err);
|
|
480
|
-
throw new Error((err as Error).message);
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
// (async () => {
|
|
486
|
-
// const movie = new MultiMovies();
|
|
487
|
-
// const search = await movie.search('jujutsu');
|
|
488
|
-
// const movieInfo = await movie.fetchEpisodeSources('movies/pushpa-2-the-rule/');
|
|
489
|
-
// const server = await movie.fetchEpisodeServers('movies/pushpa-2-the-rule/');
|
|
490
|
-
// // const recentTv = await movie.fetchPopular();
|
|
491
|
-
// // const genre = await movie.fetchByGenre('action');
|
|
492
|
-
// console.log(search);
|
|
493
|
-
// })();
|
|
494
|
-
|
|
495
|
-
export default MultiMovies;
|
|
1
|
+
import axios from 'axios';
|
|
2
|
+
import { load } from 'cheerio';
|
|
3
|
+
import {
|
|
4
|
+
MovieParser,
|
|
5
|
+
TvType,
|
|
6
|
+
type IMovieInfo,
|
|
7
|
+
type IEpisodeServer,
|
|
8
|
+
StreamingServers,
|
|
9
|
+
type ISource,
|
|
10
|
+
type IMovieResult,
|
|
11
|
+
type ISearch,
|
|
12
|
+
} from '../../models';
|
|
13
|
+
import { MixDrop, StreamTape, StreamWish, VidHide } from '../../extractors';
|
|
14
|
+
import { USER_AGENT } from '../../utils';
|
|
15
|
+
|
|
16
|
+
class MultiMovies extends MovieParser {
|
|
17
|
+
override readonly name = 'MultiMovies';
|
|
18
|
+
protected override baseUrl = 'https://multimovies.asia';
|
|
19
|
+
protected override logo =
|
|
20
|
+
'https://multimovies.asia/wp-content/uploads/2024/01/cropped-CompressJPEG.online_512x512_image.png';
|
|
21
|
+
protected override classPath = 'MOVIES.MultiMovies';
|
|
22
|
+
override supportedTypes = new Set([TvType.MOVIE, TvType.TVSERIES]);
|
|
23
|
+
constructor(customBaseURL?: string) {
|
|
24
|
+
super();
|
|
25
|
+
if (customBaseURL) {
|
|
26
|
+
if (customBaseURL.startsWith('http://') || customBaseURL.startsWith('https://')) {
|
|
27
|
+
this.baseUrl = customBaseURL;
|
|
28
|
+
} else {
|
|
29
|
+
this.baseUrl = `http://${customBaseURL}`;
|
|
30
|
+
}
|
|
31
|
+
} else {
|
|
32
|
+
this.baseUrl = this.baseUrl;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
private proxiedBaseUrl = 'https://m3u8proxy.durgeshdwivedi81.workers.dev/v2?url=' + encodeURIComponent(this.baseUrl);
|
|
36
|
+
private customProxyUrl = 'https://m3u8proxy.durgeshdwivedi81.workers.dev/v2?url=';
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @param query search query string
|
|
40
|
+
* @param page page number (default 1) (optional)
|
|
41
|
+
*/
|
|
42
|
+
override search = async (query: string, page: number = 1): Promise<ISearch<IMovieResult>> => {
|
|
43
|
+
const searchResult: ISearch<IMovieResult> = {
|
|
44
|
+
currentPage: page,
|
|
45
|
+
hasNextPage: false,
|
|
46
|
+
results: [],
|
|
47
|
+
};
|
|
48
|
+
try {
|
|
49
|
+
let url;
|
|
50
|
+
if (page === 1) {
|
|
51
|
+
url = `${this.proxiedBaseUrl}/?s=${query.replace(/[\W_]+/g, '+')}`;
|
|
52
|
+
} else {
|
|
53
|
+
url = `${this.proxiedBaseUrl}/page/${page}/?s=${query.replace(/[\W_]+/g, '+')}`;
|
|
54
|
+
}
|
|
55
|
+
const { data } = await axios.get(url);
|
|
56
|
+
const $ = load(data);
|
|
57
|
+
|
|
58
|
+
const navSelector = 'div.pagination';
|
|
59
|
+
searchResult.hasNextPage = $(navSelector).find('#nextpagination').length > 0;
|
|
60
|
+
const articles = $('.search-page .result-item article').toArray();
|
|
61
|
+
|
|
62
|
+
await Promise.all(
|
|
63
|
+
articles.map(async (el) => {
|
|
64
|
+
const seasonSet = new Set<number>();
|
|
65
|
+
|
|
66
|
+
const href =
|
|
67
|
+
$(el)
|
|
68
|
+
.find('.thumbnail a')
|
|
69
|
+
.attr('href')
|
|
70
|
+
?.replace(/^https?:\/\/[^/]+\//, '')
|
|
71
|
+
.replace(/^\/|\/$/g, '') ?? '';
|
|
72
|
+
|
|
73
|
+
const episodesInfo = await this.fetchMediaInfo(href);
|
|
74
|
+
const episodes = episodesInfo?.episodes || [];
|
|
75
|
+
|
|
76
|
+
for (const episode of episodes) {
|
|
77
|
+
if (episode.season !== null) {
|
|
78
|
+
seasonSet.add(episode.season!);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
searchResult.results.push({
|
|
82
|
+
id: href,
|
|
83
|
+
title: $(el).find('.details .title a').text().trim(),
|
|
84
|
+
url: $(el).find('.thumbnail a').attr('href') ?? '',
|
|
85
|
+
image: $(el).find('.thumbnail img').attr('src') ?? '',
|
|
86
|
+
rating: parseFloat($(el).find('.meta .rating').text().replace('IMDb ', '')) || 0,
|
|
87
|
+
releaseDate: $(el).find('.meta .year').text().trim(),
|
|
88
|
+
season: seasonSet.size,
|
|
89
|
+
description: $(el).find('.contenido p').text().trim(),
|
|
90
|
+
type: $(el).find('.thumbnail a').attr('href')?.includes('/movies/') ? TvType.MOVIE : TvType.TVSERIES,
|
|
91
|
+
});
|
|
92
|
+
})
|
|
93
|
+
);
|
|
94
|
+
|
|
95
|
+
return searchResult;
|
|
96
|
+
} catch (err) {
|
|
97
|
+
throw new Error((err as Error).message);
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
*
|
|
103
|
+
* @param mediaId media link or id
|
|
104
|
+
*/
|
|
105
|
+
override fetchMediaInfo = async (mediaId: string): Promise<IMovieInfo> => {
|
|
106
|
+
if (!mediaId.startsWith(this.proxiedBaseUrl)) {
|
|
107
|
+
mediaId = `${this.proxiedBaseUrl}/${mediaId}`;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// Extract the clean media ID from the proxied URL
|
|
111
|
+
let cleanId = mediaId;
|
|
112
|
+
if (mediaId.includes('?url=')) {
|
|
113
|
+
// If it's a proxied URL, extract the original URL and then get the path
|
|
114
|
+
const originalUrl = decodeURIComponent(mediaId.split('?url=')[1]!);
|
|
115
|
+
cleanId = originalUrl.replace(/^https?:\/\/[^/]+\//, '').replace(/^\/|\/$/g, '');
|
|
116
|
+
} else {
|
|
117
|
+
// If it's not proxied, clean it normally
|
|
118
|
+
cleanId = mediaId.replace(/^https?:\/\/[^/]+\//, '').replace(/^\/|\/$/g, '');
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
const movieInfo: IMovieInfo = {
|
|
122
|
+
id: cleanId,
|
|
123
|
+
title: '',
|
|
124
|
+
url: mediaId,
|
|
125
|
+
};
|
|
126
|
+
try {
|
|
127
|
+
const { data } = await axios.get(mediaId);
|
|
128
|
+
const $ = load(data);
|
|
129
|
+
const recommendationsArray: IMovieResult[] = [];
|
|
130
|
+
|
|
131
|
+
$('div#single_relacionados article').each((i, el) => {
|
|
132
|
+
recommendationsArray.push({
|
|
133
|
+
id: $(el)
|
|
134
|
+
.find('a')
|
|
135
|
+
.attr('href')
|
|
136
|
+
?.replace(/^https?:\/\/[^/]+\//, '')
|
|
137
|
+
.replace(/^\/|\/$/g, '')!,
|
|
138
|
+
title: $(el).find('a img').attr('alt')!,
|
|
139
|
+
image: $(el).find('a img').attr('data-src') ?? $(el).find('a img').attr('src'),
|
|
140
|
+
type: $(el).find('.thumbnail a').attr('href')?.includes('/movies/')
|
|
141
|
+
? TvType.TVSERIES
|
|
142
|
+
: (TvType.MOVIE ?? null),
|
|
143
|
+
});
|
|
144
|
+
});
|
|
145
|
+
movieInfo.cover = $('div#info .galeria').first().find('.g-item a').attr('href')?.trim() ?? '';
|
|
146
|
+
movieInfo.title = $('.sheader > .data > h1').text();
|
|
147
|
+
movieInfo.image = $('.sheader > .poster > img').attr('src') ?? $('.sheader > .poster > img').attr('data-src');
|
|
148
|
+
movieInfo.description = $('div#info div[itemprop="description"] p').text();
|
|
149
|
+
movieInfo.type = movieInfo.id.split('/')[0] === 'tvshows' ? TvType.TVSERIES : TvType.MOVIE;
|
|
150
|
+
movieInfo.releaseDate = $('.sheader > .data > .extra > span.date').text().trim();
|
|
151
|
+
movieInfo.trailer = {
|
|
152
|
+
id:
|
|
153
|
+
$('div#trailer .embed iframe').attr('data-litespeed-src')?.split('embed/')[1]?.split('?')[0] ??
|
|
154
|
+
$('div#trailer .embed iframe').attr('src')?.split('embed/')[1]?.split('?')[0]!,
|
|
155
|
+
url: $('div#trailer .embed iframe').attr('data-litespeed-src') ?? $('div#trailer .embed iframe').attr('src'),
|
|
156
|
+
};
|
|
157
|
+
movieInfo.genres = $('.sgeneros a')
|
|
158
|
+
.map((i, el) => $(el).text())
|
|
159
|
+
.get()
|
|
160
|
+
.map((v) => v.trim());
|
|
161
|
+
movieInfo.characters = [];
|
|
162
|
+
$('div#cast .persons .person').each((i, el) => {
|
|
163
|
+
const url = $(el).find('.img > a').attr('href');
|
|
164
|
+
const image = $(el).find('.img > a > img').attr('data-src') ?? $(el).find('.img > a > img').attr('src');
|
|
165
|
+
const name = $(el).find('.data > .name > a').text();
|
|
166
|
+
const character = $(el).find('.data > .caracter').text();
|
|
167
|
+
|
|
168
|
+
(movieInfo.characters as any[]).push({
|
|
169
|
+
url,
|
|
170
|
+
image,
|
|
171
|
+
name,
|
|
172
|
+
character,
|
|
173
|
+
});
|
|
174
|
+
});
|
|
175
|
+
movieInfo.country = $('.sheader > .data > .extra > span.country').text();
|
|
176
|
+
movieInfo.duration = $('.sheader > .data > .extra > span.runtime').text();
|
|
177
|
+
movieInfo.rating = parseFloat($('.starstruck-rating span.dt_rating_vgs[itemprop="ratingValue"]').text());
|
|
178
|
+
movieInfo.recommendations = recommendationsArray as any;
|
|
179
|
+
|
|
180
|
+
if (movieInfo.type === TvType.TVSERIES) {
|
|
181
|
+
movieInfo.episodes = [];
|
|
182
|
+
$('#seasons .se-c').each((i, el) => {
|
|
183
|
+
const seasonNumber = parseInt($(el).find('.se-t').text().trim());
|
|
184
|
+
$(el)
|
|
185
|
+
.find('.episodios li')
|
|
186
|
+
.each((j, ep) => {
|
|
187
|
+
const episode = {
|
|
188
|
+
id: $(ep)
|
|
189
|
+
.find('.episodiotitle a')
|
|
190
|
+
.attr('href')
|
|
191
|
+
?.replace(/^https?:\/\/[^/]+\//, '')
|
|
192
|
+
.replace(/^\/|\/$/g, '')!,
|
|
193
|
+
season: seasonNumber,
|
|
194
|
+
number: parseInt($(ep).find('.numerando').text().trim().split('-')[1]!),
|
|
195
|
+
title: $(ep).find('.episodiotitle a').text().trim(),
|
|
196
|
+
url: $(ep).find('.episodiotitle a').attr('href')?.trim() ?? '',
|
|
197
|
+
releaseDate: String(new Date($(ep).find('.episodiotitle .date').text().trim()).getFullYear()),
|
|
198
|
+
image:
|
|
199
|
+
$(ep).find('.imagen img').attr('data-src')?.trim() ?? $(ep).find('.imagen img').attr('src')?.trim(),
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
movieInfo.episodes?.push(episode);
|
|
203
|
+
});
|
|
204
|
+
});
|
|
205
|
+
} else {
|
|
206
|
+
movieInfo.episodes = [
|
|
207
|
+
{
|
|
208
|
+
id: movieInfo.id,
|
|
209
|
+
title: movieInfo.title,
|
|
210
|
+
url: movieInfo.url,
|
|
211
|
+
image: movieInfo.cover || movieInfo.image,
|
|
212
|
+
},
|
|
213
|
+
];
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
return movieInfo;
|
|
217
|
+
} catch (err) {
|
|
218
|
+
throw new Error((err as Error).message);
|
|
219
|
+
}
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
*
|
|
224
|
+
* @param episodeId episode id
|
|
225
|
+
* @param media media id
|
|
226
|
+
* @param server server type (default `StreamWish`) (optional)
|
|
227
|
+
*/
|
|
228
|
+
override fetchEpisodeSources = async (
|
|
229
|
+
episodeId: string,
|
|
230
|
+
mediaId?: string, //just placeholder for compatibility with tmdb
|
|
231
|
+
server: StreamingServers = StreamingServers.StreamWish,
|
|
232
|
+
fileId?: string
|
|
233
|
+
): Promise<ISource> => {
|
|
234
|
+
if (episodeId.startsWith('http')) {
|
|
235
|
+
const serverUrl = new URL(episodeId);
|
|
236
|
+
switch (server) {
|
|
237
|
+
case StreamingServers.MixDrop:
|
|
238
|
+
return {
|
|
239
|
+
headers: { Referer: serverUrl.href },
|
|
240
|
+
sources: await new MixDrop().extract(serverUrl),
|
|
241
|
+
download: fileId ? `https://gdmirrorbot.nl/file/${fileId}` : '',
|
|
242
|
+
};
|
|
243
|
+
case StreamingServers.StreamWish:
|
|
244
|
+
return {
|
|
245
|
+
headers: { Referer: serverUrl.href },
|
|
246
|
+
...(await new StreamWish().extract(serverUrl, this.baseUrl)),
|
|
247
|
+
download: fileId ? `${serverUrl.href.toString().replace('/e/', '/f/')}/${fileId}` : '',
|
|
248
|
+
};
|
|
249
|
+
case StreamingServers.StreamTape:
|
|
250
|
+
return {
|
|
251
|
+
headers: { Referer: serverUrl.href },
|
|
252
|
+
sources: await new StreamTape().extract(serverUrl),
|
|
253
|
+
download: fileId ? `https://gdmirrorbot.nl/file/${fileId}` : '',
|
|
254
|
+
};
|
|
255
|
+
case StreamingServers.VidHide:
|
|
256
|
+
return {
|
|
257
|
+
headers: { Referer: serverUrl.href },
|
|
258
|
+
sources: await new VidHide().extract(serverUrl),
|
|
259
|
+
download: fileId ? `https://gdmirrorbot.nl/file/${fileId}` : '',
|
|
260
|
+
};
|
|
261
|
+
default:
|
|
262
|
+
return {
|
|
263
|
+
headers: { Referer: serverUrl.href },
|
|
264
|
+
...(await new StreamWish().extract(serverUrl)),
|
|
265
|
+
download: fileId ? `https://gdmirrorbot.nl/file/${fileId}` : '',
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
try {
|
|
271
|
+
const servers = await this.fetchEpisodeServers(episodeId);
|
|
272
|
+
const i = servers.findIndex((s) => s.name.toLowerCase() === server.toLowerCase());
|
|
273
|
+
if (i === -1) {
|
|
274
|
+
throw new Error(`Server ${server} not found`);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
const serverUrl: URL = new URL(servers[i]!.url);
|
|
278
|
+
let extractedFileId = '';
|
|
279
|
+
|
|
280
|
+
if (!episodeId.startsWith('http')) {
|
|
281
|
+
const { fileId: id } = await this.getServer(`${this.baseUrl}/${episodeId}`);
|
|
282
|
+
extractedFileId = id ?? '';
|
|
283
|
+
}
|
|
284
|
+
// extractedFileId to be used for download link
|
|
285
|
+
return await this.fetchEpisodeSources(serverUrl.href, mediaId, server, extractedFileId);
|
|
286
|
+
} catch (err) {
|
|
287
|
+
//console.log(err);
|
|
288
|
+
throw new Error((err as Error).message);
|
|
289
|
+
}
|
|
290
|
+
};
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
*
|
|
294
|
+
* @param episodeId takes episode link or movie id
|
|
295
|
+
*/
|
|
296
|
+
override fetchEpisodeServers = async (episodeId: string): Promise<IEpisodeServer[]> => {
|
|
297
|
+
if (!episodeId.startsWith(this.baseUrl)) {
|
|
298
|
+
episodeId = `${this.baseUrl}/${episodeId}`;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
try {
|
|
302
|
+
const { servers } = await this.getServer(episodeId);
|
|
303
|
+
return servers;
|
|
304
|
+
} catch (err) {
|
|
305
|
+
//console.log(err);
|
|
306
|
+
throw new Error((err as Error).message);
|
|
307
|
+
}
|
|
308
|
+
};
|
|
309
|
+
|
|
310
|
+
fetchPopular = async (page: number = 1): Promise<ISearch<IMovieResult>> => {
|
|
311
|
+
const result: ISearch<IMovieResult> = {
|
|
312
|
+
currentPage: page,
|
|
313
|
+
hasNextPage: false,
|
|
314
|
+
results: [],
|
|
315
|
+
};
|
|
316
|
+
try {
|
|
317
|
+
const { data } = await axios.get(`${this.proxiedBaseUrl}/trending/page/${page}/`);
|
|
318
|
+
const $ = load(data);
|
|
319
|
+
const navSelector = 'div.pagination';
|
|
320
|
+
|
|
321
|
+
result.hasNextPage = $(navSelector).find('#nextpagination').length > 0;
|
|
322
|
+
$('.items > article')
|
|
323
|
+
.each((i, el) => {
|
|
324
|
+
const resultItem: IMovieResult = {
|
|
325
|
+
id: $(el).attr('id')!,
|
|
326
|
+
title: $(el).find('div.data > h3').text() ?? '',
|
|
327
|
+
url: $(el).find('div.poster > a').attr('href'),
|
|
328
|
+
image: $(el).find('div.poster > img').attr('data-src') ?? '',
|
|
329
|
+
type: $(el).find('div.poster > a').attr('href')?.includes('/movies/') ? TvType.MOVIE : TvType.TVSERIES,
|
|
330
|
+
rating: $(el).find('div.poster > div.rating').text() ?? '',
|
|
331
|
+
releaseDate: $(el).find('div.data > span').text() ?? '',
|
|
332
|
+
};
|
|
333
|
+
result.results.push(resultItem);
|
|
334
|
+
})
|
|
335
|
+
.get();
|
|
336
|
+
|
|
337
|
+
return result;
|
|
338
|
+
} catch (err) {
|
|
339
|
+
throw new Error((err as Error).message);
|
|
340
|
+
}
|
|
341
|
+
};
|
|
342
|
+
|
|
343
|
+
fetchByGenre = async (genre: string, page: number = 1): Promise<ISearch<IMovieResult>> => {
|
|
344
|
+
const result: ISearch<IMovieResult> = {
|
|
345
|
+
currentPage: page,
|
|
346
|
+
hasNextPage: false,
|
|
347
|
+
results: [],
|
|
348
|
+
};
|
|
349
|
+
try {
|
|
350
|
+
const { data } = await axios.get(`${this.proxiedBaseUrl}/genre/${genre}/page/${page}`);
|
|
351
|
+
|
|
352
|
+
const $ = load(data);
|
|
353
|
+
const navSelector = 'div.pagination';
|
|
354
|
+
|
|
355
|
+
result.hasNextPage = $(navSelector).find('#nextpagination').length > 0;
|
|
356
|
+
$('.items > article')
|
|
357
|
+
.each((i, el) => {
|
|
358
|
+
const resultItem: IMovieResult = {
|
|
359
|
+
id: $(el).attr('id')!,
|
|
360
|
+
title: $(el).find('div.data > h3').text() ?? '',
|
|
361
|
+
url: $(el).find('div.poster > a').attr('href'),
|
|
362
|
+
image: $(el).find('div.poster > img').attr('data-src') ?? '',
|
|
363
|
+
type: $(el).find('div.poster > a').attr('href')?.includes('/movies/') ? TvType.MOVIE : TvType.TVSERIES,
|
|
364
|
+
rating: $(el).find('div.poster > div.rating').text() ?? '',
|
|
365
|
+
releaseDate: $(el).find('div.data > span').text() ?? '',
|
|
366
|
+
};
|
|
367
|
+
result.results.push(resultItem);
|
|
368
|
+
})
|
|
369
|
+
.get();
|
|
370
|
+
|
|
371
|
+
return result;
|
|
372
|
+
} catch (err) {
|
|
373
|
+
throw new Error((err as Error).message);
|
|
374
|
+
}
|
|
375
|
+
};
|
|
376
|
+
|
|
377
|
+
private async getServer(url: string): Promise<{ servers: IEpisodeServer[]; fileId: string }> {
|
|
378
|
+
//console.log(`Fetching server for URL: ${url}`);
|
|
379
|
+
try {
|
|
380
|
+
//console.log('step1');
|
|
381
|
+
const { data } = await axios.get(this.customProxyUrl + url);
|
|
382
|
+
const $ = load(data);
|
|
383
|
+
//console.log('step2');
|
|
384
|
+
// Extract player config
|
|
385
|
+
const playerConfig = {
|
|
386
|
+
postId: $('#player-option-1').attr('data-post'),
|
|
387
|
+
nume: $('#player-option-1').attr('data-nume'),
|
|
388
|
+
type: $('#player-option-1').attr('data-type'),
|
|
389
|
+
};
|
|
390
|
+
|
|
391
|
+
if (!playerConfig.postId || !playerConfig.nume || !playerConfig.type) {
|
|
392
|
+
throw new Error('Missing player configuration');
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
const formData = new FormData();
|
|
396
|
+
formData.append('action', 'doo_player_ajax');
|
|
397
|
+
formData.append('post', playerConfig.postId);
|
|
398
|
+
formData.append('nume', playerConfig.nume);
|
|
399
|
+
formData.append('type', playerConfig.type);
|
|
400
|
+
|
|
401
|
+
const headers = {
|
|
402
|
+
'User-Agent': USER_AGENT,
|
|
403
|
+
};
|
|
404
|
+
//console.log(`${this.baseUrl}/wp-admin/admin-ajax.php`, formData);
|
|
405
|
+
const response = await fetch(this.customProxyUrl + `${this.baseUrl}/wp-admin/admin-ajax.php`, {
|
|
406
|
+
method: 'POST',
|
|
407
|
+
headers: headers,
|
|
408
|
+
body: formData,
|
|
409
|
+
});
|
|
410
|
+
const playerRes = await response.json();
|
|
411
|
+
// console.log('playerRes', playerRes);
|
|
412
|
+
const iframeUrl = playerRes?.embed_url?.match(/<iframe[^>]+src="([^"]+)"[^>]*>/i)?.[1] || playerRes?.embed_url;
|
|
413
|
+
|
|
414
|
+
// Handle non-multimovies case
|
|
415
|
+
if (!iframeUrl.includes('multimovies')) {
|
|
416
|
+
if (iframeUrl.includes('dhcplay')) {
|
|
417
|
+
return {
|
|
418
|
+
servers: [{ name: 'StreamWish', url: iframeUrl }],
|
|
419
|
+
fileId: iframeUrl.split('/').pop() ?? '',
|
|
420
|
+
};
|
|
421
|
+
}
|
|
422
|
+
let playerBaseUrl = iframeUrl.split('/').slice(0, 3).join('/');
|
|
423
|
+
const redirectResponse = await axios.head(playerBaseUrl, {
|
|
424
|
+
headers,
|
|
425
|
+
});
|
|
426
|
+
|
|
427
|
+
// Update base URL if redirect occurred
|
|
428
|
+
if (redirectResponse) {
|
|
429
|
+
playerBaseUrl = redirectResponse.request?.responseURL?.split('/').slice(0, 3).join('/');
|
|
430
|
+
}
|
|
431
|
+
const fileId = iframeUrl.split('/').pop();
|
|
432
|
+
|
|
433
|
+
if (!fileId) {
|
|
434
|
+
throw new Error('No player ID found');
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
const streamRequestData = new FormData();
|
|
438
|
+
streamRequestData.append('sid', fileId);
|
|
439
|
+
|
|
440
|
+
const streamResponse = await fetch(`${playerBaseUrl}/embedhelper.php`, {
|
|
441
|
+
headers: headers,
|
|
442
|
+
body: streamRequestData,
|
|
443
|
+
method: 'POST',
|
|
444
|
+
});
|
|
445
|
+
const streamResponseData = await streamResponse.json();
|
|
446
|
+
if (!streamResponseData) {
|
|
447
|
+
throw new Error('No stream data found');
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
const streamDetails = streamResponseData;
|
|
451
|
+
const mresultKeys = new Set(Object.keys(JSON.parse(atob(streamDetails.mresult))));
|
|
452
|
+
const siteUrlsKeys = new Set(Object.keys(streamDetails.siteUrls));
|
|
453
|
+
|
|
454
|
+
// Find common keys
|
|
455
|
+
const commonKeys = [...mresultKeys].filter((key) => siteUrlsKeys.has(key));
|
|
456
|
+
|
|
457
|
+
// Convert to a Set (if needed)
|
|
458
|
+
const commonStreamSites = new Set(commonKeys);
|
|
459
|
+
const servers = Array.from(commonStreamSites).map((site) => {
|
|
460
|
+
return {
|
|
461
|
+
name:
|
|
462
|
+
streamDetails.siteFriendlyNames[site] === 'StreamHG'
|
|
463
|
+
? 'StreamWish'
|
|
464
|
+
: streamDetails.siteFriendlyNames[site] === 'EarnVids'
|
|
465
|
+
? 'VidHide'
|
|
466
|
+
: streamDetails.siteFriendlyNames[site],
|
|
467
|
+
url: streamDetails.siteUrls[site] + JSON.parse(atob(streamDetails.mresult))[site],
|
|
468
|
+
};
|
|
469
|
+
});
|
|
470
|
+
|
|
471
|
+
return { servers, fileId };
|
|
472
|
+
} else {
|
|
473
|
+
return {
|
|
474
|
+
servers: [{ name: 'StreamWish', url: iframeUrl }],
|
|
475
|
+
fileId: iframeUrl.split('/').pop() ?? '',
|
|
476
|
+
};
|
|
477
|
+
}
|
|
478
|
+
} catch (err) {
|
|
479
|
+
//console.log(err);
|
|
480
|
+
throw new Error((err as Error).message);
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
// (async () => {
|
|
486
|
+
// const movie = new MultiMovies();
|
|
487
|
+
// const search = await movie.search('jujutsu');
|
|
488
|
+
// const movieInfo = await movie.fetchEpisodeSources('movies/pushpa-2-the-rule/');
|
|
489
|
+
// const server = await movie.fetchEpisodeServers('movies/pushpa-2-the-rule/');
|
|
490
|
+
// // const recentTv = await movie.fetchPopular();
|
|
491
|
+
// // const genre = await movie.fetchByGenre('action');
|
|
492
|
+
// console.log(search);
|
|
493
|
+
// })();
|
|
494
|
+
|
|
495
|
+
export default MultiMovies;
|