react-native-consumet 1.0.0-rc.0 → 1.0.0-rc.1
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 +81 -81
- package/lib/commonjs/extractors/filemoon.js +2 -2
- package/lib/commonjs/extractors/kwik.js +4 -4
- 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 +0 -1
- package/lib/commonjs/providers/anime/animepahe/create-animepahe.js.map +1 -1
- 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 +0 -1
- package/lib/commonjs/providers/anime/zoro/create-zoro.js.map +1 -1
- package/lib/commonjs/providers/anime/zoro/zoro.js +72 -71
- 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 +16 -16
- package/lib/commonjs/utils/ExtractorManager.js +15 -15
- package/lib/commonjs/utils/ExtractorManager.js.map +1 -1
- package/lib/commonjs/utils/ProviderManager.js +28 -28
- package/lib/commonjs/utils/create-extractor-context.js +2 -2
- package/lib/commonjs/utils/create-provider-context.js +6 -6
- package/lib/commonjs/utils/create-provider-context.js.map +1 -1
- package/lib/commonjs/utils/extension-utils.js +35 -53
- 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/extension-registry.json +81 -81
- package/lib/module/extractors/filemoon.js +2 -2
- package/lib/module/extractors/kwik.js +4 -4
- 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 +1 -1
- package/lib/module/providers/anime/animepahe/create-animepahe.js.map +1 -1
- 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 +1 -1
- package/lib/module/providers/anime/zoro/create-zoro.js.map +1 -1
- package/lib/module/providers/anime/zoro/zoro.js +70 -70
- 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 +16 -16
- package/lib/module/utils/ExtractorManager.js +16 -16
- package/lib/module/utils/ExtractorManager.js.map +1 -1
- package/lib/module/utils/ProviderManager.js +28 -28
- package/lib/module/utils/create-extractor-context.js +2 -2
- package/lib/module/utils/create-provider-context.js +7 -7
- package/lib/module/utils/create-provider-context.js.map +1 -1
- package/lib/module/utils/extension-utils.js +14 -32
- 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/index.d.ts +4 -4
- package/lib/typescript/commonjs/src/index.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/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/utils/ProviderManager.d.ts +1 -1
- package/lib/typescript/commonjs/src/utils/ProviderManager.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/index.d.ts +4 -4
- package/lib/typescript/module/src/index.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/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/utils/ProviderManager.d.ts +1 -1
- package/lib/typescript/module/src/utils/ProviderManager.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 +206 -203
- 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 +50 -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 +174 -175
- package/src/models/extension-manifest.ts +77 -77
- package/src/models/extractor-context.ts +41 -41
- package/src/models/index.ts +106 -106
- package/src/models/provider-context.ts +182 -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 +348 -348
- 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 +655 -655
- package/src/providers/anime/zoro/zoro.ts +197 -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 +231 -231
- package/src/utils/ExtractorManager.ts +311 -311
- package/src/utils/ProviderManager.ts +424 -424
- package/src/utils/create-extractor-context.ts +22 -22
- package/src/utils/create-provider-context.ts +107 -107
- package/src/utils/extension-utils.ts +91 -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,529 +1,529 @@
|
|
|
1
|
-
import {
|
|
2
|
-
type IMovieInfo,
|
|
3
|
-
type IEpisodeServer,
|
|
4
|
-
type StreamingServers,
|
|
5
|
-
type ISource,
|
|
6
|
-
type IMovieResult,
|
|
7
|
-
type ISearch,
|
|
8
|
-
type ProviderContext,
|
|
9
|
-
type ProviderConfig,
|
|
10
|
-
} from '../../../models';
|
|
11
|
-
|
|
12
|
-
export function createHiMovies(ctx: ProviderContext, customBaseURL?: string) {
|
|
13
|
-
const { load, extractors, enums, axios, createCustomBaseUrl, PolyURL } = ctx;
|
|
14
|
-
const { MegaCloud } = extractors;
|
|
15
|
-
const { StreamingServers: StreamingServersEnum, TvType: TvTypeEnum } = enums;
|
|
16
|
-
|
|
17
|
-
const baseUrl = createCustomBaseUrl('https://himovies.sx', customBaseURL);
|
|
18
|
-
|
|
19
|
-
const config: ProviderConfig = {
|
|
20
|
-
name: 'HiMovies',
|
|
21
|
-
languages: 'all',
|
|
22
|
-
classPath: 'MOVIES.HiMovies',
|
|
23
|
-
logo: 'https://himovies.sx/images/group_1/theme_1/favicon.png',
|
|
24
|
-
baseUrl,
|
|
25
|
-
isNSFW: false,
|
|
26
|
-
isWorking: true,
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
const supportedTypes = new Set([TvTypeEnum.MOVIE, TvTypeEnum.TVSERIES]);
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Search for movies/TV shows
|
|
33
|
-
* @param query search query string
|
|
34
|
-
* @param page page number (default 1) (optional)
|
|
35
|
-
*/
|
|
36
|
-
const search = async (query: string, page: number = 1): Promise<ISearch<IMovieResult>> => {
|
|
37
|
-
const searchResult: ISearch<IMovieResult> = {
|
|
38
|
-
currentPage: page,
|
|
39
|
-
hasNextPage: false,
|
|
40
|
-
results: [],
|
|
41
|
-
};
|
|
42
|
-
try {
|
|
43
|
-
const { data } = await axios.get(`${config.baseUrl}/search/${query.replace(/[\W_]+/g, '-')}?page=${page}`);
|
|
44
|
-
|
|
45
|
-
const $ = load(data);
|
|
46
|
-
|
|
47
|
-
const navSelector = 'div.pre-pagination > nav:nth-child(1) > ul:nth-child(1)';
|
|
48
|
-
searchResult.hasNextPage =
|
|
49
|
-
$(navSelector).length > 0 ? !$(navSelector).children().last().hasClass('active') : false;
|
|
50
|
-
|
|
51
|
-
const initialResults: IMovieResult[] = [];
|
|
52
|
-
$('.film_list-wrap > div.flw-item').each((i, el) => {
|
|
53
|
-
const releaseDate = $(el).find('div.film-detail > div.fd-infor > span:nth-child(1)').text();
|
|
54
|
-
initialResults.push({
|
|
55
|
-
id: $(el).find('div.film-poster > a').attr('href')?.slice(1)!,
|
|
56
|
-
title: $(el).find('div.film-detail > h2 > a').attr('title')!,
|
|
57
|
-
url: `${config.baseUrl}${$(el).find('div.film-poster > a').attr('href')}`,
|
|
58
|
-
image: $(el).find('div.film-poster > img').attr('data-src'),
|
|
59
|
-
releaseDate: isNaN(parseInt(releaseDate)) ? undefined : releaseDate,
|
|
60
|
-
seasons: releaseDate.includes('SS') ? parseInt(releaseDate.split('SS')[1]!) : undefined,
|
|
61
|
-
type:
|
|
62
|
-
$(el).find('div.film-detail > div.fd-infor > span.float-right').text() === 'Movie'
|
|
63
|
-
? TvTypeEnum.MOVIE
|
|
64
|
-
: TvTypeEnum.TVSERIES,
|
|
65
|
-
});
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
// Fetch media info for all results in parallel
|
|
69
|
-
const mediaInfoPromises = initialResults.map(async (result) => {
|
|
70
|
-
try {
|
|
71
|
-
const mediaInfo = await fetchMediaInfo(result.id);
|
|
72
|
-
if (mediaInfo.releaseDate) {
|
|
73
|
-
const year = new Date(mediaInfo.releaseDate).getFullYear();
|
|
74
|
-
result.releaseDate = year.toString();
|
|
75
|
-
}
|
|
76
|
-
return result;
|
|
77
|
-
} catch (err) {
|
|
78
|
-
// Return original result if fetchMediaInfo fails
|
|
79
|
-
return result;
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
searchResult.results = await Promise.all(mediaInfoPromises);
|
|
84
|
-
|
|
85
|
-
return searchResult;
|
|
86
|
-
} catch (err) {
|
|
87
|
-
throw new Error((err as Error).message);
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Fetch media info
|
|
93
|
-
* @param mediaId media link or id
|
|
94
|
-
*/
|
|
95
|
-
const fetchMediaInfo = async (mediaId: string): Promise<IMovieInfo> => {
|
|
96
|
-
if (!mediaId.startsWith(config.baseUrl)) {
|
|
97
|
-
mediaId = `${config.baseUrl}/${mediaId}`;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
const movieInfo: IMovieInfo = {
|
|
101
|
-
id: mediaId.split('sx/').pop()!,
|
|
102
|
-
title: '',
|
|
103
|
-
url: mediaId,
|
|
104
|
-
};
|
|
105
|
-
try {
|
|
106
|
-
const { data } = await axios.get(mediaId);
|
|
107
|
-
const $ = load(data);
|
|
108
|
-
const recommendationsArray: IMovieResult[] = [];
|
|
109
|
-
|
|
110
|
-
$('section.block_area > div.block_area-content > div.film_list-wrap > div.flw-item').each((i, el) => {
|
|
111
|
-
recommendationsArray.push({
|
|
112
|
-
id: $(el).find('div.film-poster > a').attr('href')?.slice(1)!,
|
|
113
|
-
title: $(el).find('div.film-detail > h3.film-name > a').text(),
|
|
114
|
-
image: $(el).find('div.film-poster > img').attr('data-src'),
|
|
115
|
-
duration: $(el).find('div.film-detail > div.fd-infor > span.fdi-duration').text().replace('m', '') ?? null,
|
|
116
|
-
type:
|
|
117
|
-
$(el).find('div.film-detail > div.fd-infor > span.fdi-type').text() === 'TV'
|
|
118
|
-
? TvTypeEnum.TVSERIES
|
|
119
|
-
: (TvTypeEnum.MOVIE ?? null),
|
|
120
|
-
});
|
|
121
|
-
});
|
|
122
|
-
|
|
123
|
-
const uid = $('.detail_page-watch').attr('data-id')!;
|
|
124
|
-
movieInfo.cover = $('div.cover_follow').attr('style')?.slice(22).replace(')', '').replace(';', '');
|
|
125
|
-
movieInfo.title = $('.heading-name > a:nth-child(1)').text();
|
|
126
|
-
movieInfo.image = $('.film-poster > img:nth-child(1)').attr('src');
|
|
127
|
-
movieInfo.description = $('.description').text().trim();
|
|
128
|
-
movieInfo.type = movieInfo.id.includes('tv/') ? TvTypeEnum.TVSERIES : TvTypeEnum.MOVIE;
|
|
129
|
-
movieInfo.releaseDate = $('div.row-line:contains(Released:)').text().replace('Released:', '').trim();
|
|
130
|
-
movieInfo.genres = $('div.row-line:contains(Genre:) a')
|
|
131
|
-
.map((i, el) => $(el).text().split('&'))
|
|
132
|
-
.get()
|
|
133
|
-
.map((v) => v.trim());
|
|
134
|
-
movieInfo.casts = $('.row-line:contains(Casts:) a')
|
|
135
|
-
.map((i, el) => $(el).text())
|
|
136
|
-
.get();
|
|
137
|
-
movieInfo.production = $('.row-line:contains(Production:) a').text().trim();
|
|
138
|
-
movieInfo.country = $('.row-line:contains(Country:) a').text().trim();
|
|
139
|
-
movieInfo.duration = $('.row-line:contains(Duration:)')
|
|
140
|
-
.text()
|
|
141
|
-
.replace('Duration:', '')
|
|
142
|
-
.replace(/\s+/g, ' ')
|
|
143
|
-
.trim();
|
|
144
|
-
movieInfo.rating = parseFloat($('.dp-i-stats > span.item:nth-child(3)').text().replace('IMDB:', '').trim());
|
|
145
|
-
movieInfo.recommendations = recommendationsArray as any;
|
|
146
|
-
const ajaxReqUrl = (id: string, type: string, isSeasons: boolean = false) =>
|
|
147
|
-
`${config.baseUrl}/ajax/${type === 'movie' ? type : ``}${isSeasons ? 'season/list' : 'season/episodes'}/${id}`;
|
|
148
|
-
|
|
149
|
-
if (movieInfo.type === TvTypeEnum.TVSERIES) {
|
|
150
|
-
const { data } = await axios.get(ajaxReqUrl(uid, 'tv', true));
|
|
151
|
-
const $$ = load(data);
|
|
152
|
-
const seasonsIds = $$('.dropdown-menu > a')
|
|
153
|
-
.map((i, el) => $(el).attr('data-id'))
|
|
154
|
-
.get();
|
|
155
|
-
|
|
156
|
-
movieInfo.episodes = [];
|
|
157
|
-
let season = 1;
|
|
158
|
-
for (const id of seasonsIds) {
|
|
159
|
-
const { data } = await axios.get(ajaxReqUrl(id, 'season'));
|
|
160
|
-
const $$$ = load(data);
|
|
161
|
-
|
|
162
|
-
$$$('.nav > li')
|
|
163
|
-
.map((i, el) => {
|
|
164
|
-
const episode = {
|
|
165
|
-
id: $$$(el).find('a').attr('id')!.split('-')[1]!,
|
|
166
|
-
title: $$$(el).find('a').attr('title')!,
|
|
167
|
-
number: parseInt($$$(el).find('a').attr('title')!.split(':')[0]!.slice(3).trim()),
|
|
168
|
-
season: season,
|
|
169
|
-
url: `${config.baseUrl}/ajax/episode/servers/${$$$(el).find('a').attr('id')!.split('-')[1]}`,
|
|
170
|
-
};
|
|
171
|
-
movieInfo.episodes?.push(episode);
|
|
172
|
-
})
|
|
173
|
-
.get();
|
|
174
|
-
season++;
|
|
175
|
-
}
|
|
176
|
-
} else {
|
|
177
|
-
movieInfo.episodes = [
|
|
178
|
-
{
|
|
179
|
-
id: uid,
|
|
180
|
-
title: movieInfo.title,
|
|
181
|
-
url: `${config.baseUrl}/ajax/episode/list/${uid}`,
|
|
182
|
-
},
|
|
183
|
-
];
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
return movieInfo;
|
|
187
|
-
} catch (err) {
|
|
188
|
-
//console.log(err);
|
|
189
|
-
throw new Error((err as Error).message);
|
|
190
|
-
}
|
|
191
|
-
};
|
|
192
|
-
|
|
193
|
-
/**
|
|
194
|
-
* Fetch episode sources
|
|
195
|
-
* @param episodeId episode id
|
|
196
|
-
* @param mediaId media id
|
|
197
|
-
* @param server server type (default `MegaCloud`) (optional)
|
|
198
|
-
*/
|
|
199
|
-
const fetchEpisodeSources = async (
|
|
200
|
-
episodeId: string,
|
|
201
|
-
mediaId: string,
|
|
202
|
-
server: StreamingServers = StreamingServersEnum.MegaCloud
|
|
203
|
-
): Promise<ISource> => {
|
|
204
|
-
if (episodeId.startsWith('http')) {
|
|
205
|
-
const serverUrl = new PolyURL(episodeId);
|
|
206
|
-
switch (server) {
|
|
207
|
-
case StreamingServersEnum.MegaCloud:
|
|
208
|
-
return {
|
|
209
|
-
headers: { Referer: serverUrl.href },
|
|
210
|
-
...(await MegaCloud().extract(serverUrl, config.baseUrl)),
|
|
211
|
-
};
|
|
212
|
-
case StreamingServersEnum.UpCloud:
|
|
213
|
-
return {
|
|
214
|
-
headers: { Referer: serverUrl.href },
|
|
215
|
-
...(await MegaCloud().extract(serverUrl, config.baseUrl)),
|
|
216
|
-
};
|
|
217
|
-
default:
|
|
218
|
-
return {
|
|
219
|
-
headers: { Referer: serverUrl.href },
|
|
220
|
-
...(await MegaCloud().extract(serverUrl, config.baseUrl)),
|
|
221
|
-
};
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
try {
|
|
226
|
-
const servers = await fetchEpisodeServers(episodeId, mediaId);
|
|
227
|
-
|
|
228
|
-
const i = servers.findIndex((s) => s.name === server);
|
|
229
|
-
|
|
230
|
-
if (i === -1) {
|
|
231
|
-
throw new Error(`Server ${server} not found`);
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
const serverUrl: URL = new URL(servers[i]!.url);
|
|
235
|
-
|
|
236
|
-
return await fetchEpisodeSources(serverUrl.href, mediaId, server);
|
|
237
|
-
} catch (err) {
|
|
238
|
-
throw new Error((err as Error).message);
|
|
239
|
-
}
|
|
240
|
-
};
|
|
241
|
-
|
|
242
|
-
/**
|
|
243
|
-
* Fetch episode servers
|
|
244
|
-
* @param episodeId takes episode link or movie id
|
|
245
|
-
* @param mediaId takes movie link or id (found on movie info object)
|
|
246
|
-
*/
|
|
247
|
-
const fetchEpisodeServers = async (episodeId: string, mediaId: string): Promise<IEpisodeServer[]> => {
|
|
248
|
-
if (!episodeId.startsWith(config.baseUrl + '/ajax') && !mediaId.includes('movie')) {
|
|
249
|
-
episodeId = `${config.baseUrl}/ajax/episode/servers/${episodeId}`;
|
|
250
|
-
} else {
|
|
251
|
-
episodeId = `${config.baseUrl}/ajax/episode/list/${episodeId}`;
|
|
252
|
-
}
|
|
253
|
-
try {
|
|
254
|
-
const { data } = await axios.get(episodeId);
|
|
255
|
-
const $ = load(data);
|
|
256
|
-
const servers = $('ul.nav > li')
|
|
257
|
-
.map((i, el) => ({
|
|
258
|
-
name: $(el).find('a').attr('title')!.slice(6).toLowerCase().replace('server', '').trim(),
|
|
259
|
-
url: `${config.baseUrl}/ajax/episode/sources/${$(el).find('a').attr('data-id')}`,
|
|
260
|
-
}))
|
|
261
|
-
.get();
|
|
262
|
-
|
|
263
|
-
const finalServers: IEpisodeServer[] = await Promise.all(
|
|
264
|
-
servers.map(async (server) => {
|
|
265
|
-
const { data } = await axios.get(server.url);
|
|
266
|
-
return {
|
|
267
|
-
name: server.name,
|
|
268
|
-
url: data.link,
|
|
269
|
-
};
|
|
270
|
-
})
|
|
271
|
-
);
|
|
272
|
-
|
|
273
|
-
return finalServers;
|
|
274
|
-
} catch (err) {
|
|
275
|
-
throw new Error((err as Error).message);
|
|
276
|
-
}
|
|
277
|
-
};
|
|
278
|
-
|
|
279
|
-
const fetchRecentMovies = async (): Promise<IMovieResult[]> => {
|
|
280
|
-
try {
|
|
281
|
-
const { data } = await axios.get(`${config.baseUrl}/home`);
|
|
282
|
-
const $ = load(data);
|
|
283
|
-
|
|
284
|
-
const movies = $(
|
|
285
|
-
'section.block_area:contains("Latest Movies") > div:nth-child(2) > div:nth-child(1) > div.flw-item'
|
|
286
|
-
)
|
|
287
|
-
.map((i, el) => {
|
|
288
|
-
const releaseDate = $(el).find('div.film-detail > div.fd-infor > span:nth-child(1)').text();
|
|
289
|
-
const movie: any = {
|
|
290
|
-
id: $(el).find('div.film-poster > a').attr('href')?.slice(1)!,
|
|
291
|
-
title: $(el).find('div.film-detail > h3.film-name > a').attr('title')!,
|
|
292
|
-
url: `${config.baseUrl}${$(el).find('div.film-poster > a').attr('href')}`,
|
|
293
|
-
image: $(el).find('div.film-poster > img').attr('data-src'),
|
|
294
|
-
releaseDate: isNaN(parseInt(releaseDate)) ? undefined : releaseDate,
|
|
295
|
-
duration: $(el).find('div.film-detail > div.fd-infor > span.fdi-duration').text() || null,
|
|
296
|
-
type:
|
|
297
|
-
$(el).find('div.film-detail > div.fd-infor > span.float-right').text() === 'Movie'
|
|
298
|
-
? TvTypeEnum.MOVIE
|
|
299
|
-
: TvTypeEnum.TVSERIES,
|
|
300
|
-
};
|
|
301
|
-
return movie;
|
|
302
|
-
})
|
|
303
|
-
.get();
|
|
304
|
-
return movies;
|
|
305
|
-
} catch (err) {
|
|
306
|
-
throw new Error((err as Error).message);
|
|
307
|
-
}
|
|
308
|
-
};
|
|
309
|
-
|
|
310
|
-
const fetchRecentTvShows = async (): Promise<IMovieResult[]> => {
|
|
311
|
-
try {
|
|
312
|
-
const { data } = await axios.get(`${config.baseUrl}/home`);
|
|
313
|
-
const $ = load(data);
|
|
314
|
-
|
|
315
|
-
const tvshows = $(
|
|
316
|
-
'section.block_area:contains("Latest TV Shows") > div:nth-child(2) > div:nth-child(1) > div.flw-item'
|
|
317
|
-
)
|
|
318
|
-
.map((i, el) => {
|
|
319
|
-
const tvshow = {
|
|
320
|
-
id: $(el).find('div.film-poster > a').attr('href')?.slice(1)!,
|
|
321
|
-
title: $(el).find('div.film-detail > h3.film-name > a').attr('title')!,
|
|
322
|
-
url: `${config.baseUrl}${$(el).find('div.film-poster > a').attr('href')}`,
|
|
323
|
-
image: $(el).find('div.film-poster > img').attr('data-src'),
|
|
324
|
-
season: $(el).find('div.film-detail > div.fd-infor > span:nth-child(1)').text().replace('SS', '').trim(),
|
|
325
|
-
latestEpisode:
|
|
326
|
-
$(el).find('div.film-detail > div.fd-infor > span:nth-child(3)').text().replace('EPS', '').trim() || null,
|
|
327
|
-
type:
|
|
328
|
-
$(el).find('div.film-detail > div.fd-infor > span.float-right').text() === 'Movie'
|
|
329
|
-
? TvTypeEnum.MOVIE
|
|
330
|
-
: TvTypeEnum.TVSERIES,
|
|
331
|
-
};
|
|
332
|
-
return tvshow;
|
|
333
|
-
})
|
|
334
|
-
.get();
|
|
335
|
-
return tvshows;
|
|
336
|
-
} catch (err) {
|
|
337
|
-
throw new Error((err as Error).message);
|
|
338
|
-
}
|
|
339
|
-
};
|
|
340
|
-
|
|
341
|
-
const fetchTrendingMovies = async (): Promise<IMovieResult[]> => {
|
|
342
|
-
try {
|
|
343
|
-
const { data } = await axios.get(`${config.baseUrl}/home`);
|
|
344
|
-
const $ = load(data);
|
|
345
|
-
|
|
346
|
-
const movies = $('div#trending-movies div.film_list-wrap div.flw-item')
|
|
347
|
-
.map((i, el) => {
|
|
348
|
-
const releaseDate = $(el).find('div.film-detail > div.fd-infor > span:nth-child(1)').text();
|
|
349
|
-
const movie: any = {
|
|
350
|
-
id: $(el).find('div.film-poster > a').attr('href')?.slice(1)!,
|
|
351
|
-
title: $(el).find('div.film-detail > h3.film-name > a').attr('title')!,
|
|
352
|
-
url: `${config.baseUrl}${$(el).find('div.film-poster > a').attr('href')}`,
|
|
353
|
-
image: $(el).find('div.film-poster > img').attr('data-src'),
|
|
354
|
-
releaseDate: isNaN(parseInt(releaseDate)) ? undefined : releaseDate,
|
|
355
|
-
duration: $(el).find('div.film-detail > div.fd-infor > span.fdi-duration').text() || null,
|
|
356
|
-
type:
|
|
357
|
-
$(el).find('div.film-detail > div.fd-infor > span.float-right').text() === 'Movie'
|
|
358
|
-
? TvTypeEnum.MOVIE
|
|
359
|
-
: TvTypeEnum.TVSERIES,
|
|
360
|
-
};
|
|
361
|
-
return movie;
|
|
362
|
-
})
|
|
363
|
-
.get();
|
|
364
|
-
return movies;
|
|
365
|
-
} catch (err) {
|
|
366
|
-
throw new Error((err as Error).message);
|
|
367
|
-
}
|
|
368
|
-
};
|
|
369
|
-
|
|
370
|
-
const fetchTrendingTvShows = async (): Promise<IMovieResult[]> => {
|
|
371
|
-
try {
|
|
372
|
-
const { data } = await axios.get(`${config.baseUrl}/home`);
|
|
373
|
-
const $ = load(data);
|
|
374
|
-
|
|
375
|
-
const tvshows = $('div#trending-tv div.film_list-wrap div.flw-item')
|
|
376
|
-
.map((i, el) => {
|
|
377
|
-
const tvshow = {
|
|
378
|
-
id: $(el).find('div.film-poster > a').attr('href')?.slice(1)!,
|
|
379
|
-
title: $(el).find('div.film-detail > h3.film-name > a').attr('title')!,
|
|
380
|
-
url: `${config.baseUrl}${$(el).find('div.film-poster > a').attr('href')}`,
|
|
381
|
-
image: $(el).find('div.film-poster > img').attr('data-src'),
|
|
382
|
-
season: $(el).find('div.film-detail > div.fd-infor > span:nth-child(1)').text().replace('SS', '').trim(),
|
|
383
|
-
latestEpisode:
|
|
384
|
-
$(el).find('div.film-detail > div.fd-infor > span:nth-child(3)').text().replace('EPS', '').trim() || null,
|
|
385
|
-
type:
|
|
386
|
-
$(el).find('div.film-detail > div.fd-infor > span.float-right').text() === 'Movie'
|
|
387
|
-
? TvTypeEnum.MOVIE
|
|
388
|
-
: TvTypeEnum.TVSERIES,
|
|
389
|
-
};
|
|
390
|
-
return tvshow;
|
|
391
|
-
})
|
|
392
|
-
.get();
|
|
393
|
-
return tvshows;
|
|
394
|
-
} catch (err) {
|
|
395
|
-
throw new Error((err as Error).message);
|
|
396
|
-
}
|
|
397
|
-
};
|
|
398
|
-
|
|
399
|
-
const fetchByCountry = async (country: string, page: number = 1): Promise<ISearch<IMovieResult>> => {
|
|
400
|
-
const result: ISearch<IMovieResult> = {
|
|
401
|
-
currentPage: page,
|
|
402
|
-
hasNextPage: false,
|
|
403
|
-
results: [],
|
|
404
|
-
};
|
|
405
|
-
const navSelector = 'div.pre-pagination > nav:nth-child(1) > ul:nth-child(1)';
|
|
406
|
-
|
|
407
|
-
try {
|
|
408
|
-
const { data } = await axios.get(`${config.baseUrl}/country/${country}/?page=${page}`);
|
|
409
|
-
const $ = load(data);
|
|
410
|
-
|
|
411
|
-
result.hasNextPage = $(navSelector).length > 0 ? !$(navSelector).children().last().hasClass('active') : false;
|
|
412
|
-
|
|
413
|
-
$('div.container > section.block_area > div.block_area-content > div.film_list-wrap > div.flw-item')
|
|
414
|
-
.each((i, el) => {
|
|
415
|
-
const resultItem: IMovieResult = {
|
|
416
|
-
id: $(el).find('div.film-poster > a').attr('href')?.slice(1) ?? '',
|
|
417
|
-
title: $(el).find('div.film-detail > h2.film-name > a').attr('title') ?? '',
|
|
418
|
-
url: `${config.baseUrl}${$(el).find('div.film-poster > a').attr('href')}`,
|
|
419
|
-
image: $(el).find('div.film-poster > img').attr('data-src'),
|
|
420
|
-
type:
|
|
421
|
-
$(el).find('div.film-detail > div.fd-infor > span.float-right').text() === 'Movie'
|
|
422
|
-
? TvTypeEnum.MOVIE
|
|
423
|
-
: TvTypeEnum.TVSERIES,
|
|
424
|
-
};
|
|
425
|
-
const season = $(el)
|
|
426
|
-
.find('div.film-detail > div.fd-infor > span:nth-child(1)')
|
|
427
|
-
.text()
|
|
428
|
-
.replace('SS', '')
|
|
429
|
-
.trim();
|
|
430
|
-
const latestEpisode =
|
|
431
|
-
$(el).find('div.film-detail > div.fd-infor > span:nth-child(3)').text().replace('EPS', '').trim() ?? null;
|
|
432
|
-
if (resultItem.type === TvTypeEnum.TVSERIES) {
|
|
433
|
-
resultItem.season = season;
|
|
434
|
-
resultItem.latestEpisode = latestEpisode;
|
|
435
|
-
} else {
|
|
436
|
-
resultItem.releaseDate = season;
|
|
437
|
-
resultItem.duration = latestEpisode;
|
|
438
|
-
}
|
|
439
|
-
result.results.push(resultItem);
|
|
440
|
-
})
|
|
441
|
-
.get();
|
|
442
|
-
return result;
|
|
443
|
-
} catch (err) {
|
|
444
|
-
throw new Error((err as Error).message);
|
|
445
|
-
}
|
|
446
|
-
};
|
|
447
|
-
|
|
448
|
-
const fetchByGenre = async (genre: string, page: number = 1): Promise<ISearch<IMovieResult>> => {
|
|
449
|
-
const result: ISearch<IMovieResult> = {
|
|
450
|
-
currentPage: page,
|
|
451
|
-
hasNextPage: false,
|
|
452
|
-
results: [],
|
|
453
|
-
};
|
|
454
|
-
try {
|
|
455
|
-
const { data } = await axios.get(`${config.baseUrl}/genre/${genre}?page=${page}`);
|
|
456
|
-
|
|
457
|
-
const $ = load(data);
|
|
458
|
-
|
|
459
|
-
const navSelector = 'div.pre-pagination > nav:nth-child(1) > ul:nth-child(1)';
|
|
460
|
-
|
|
461
|
-
result.hasNextPage = $(navSelector).length > 0 ? !$(navSelector).children().last().hasClass('active') : false;
|
|
462
|
-
|
|
463
|
-
$('.film_list-wrap > div.flw-item')
|
|
464
|
-
.each((i, el) => {
|
|
465
|
-
const resultItem: IMovieResult = {
|
|
466
|
-
id: $(el).find('div.film-poster > a').attr('href')?.slice(1) ?? '',
|
|
467
|
-
title: $(el).find('div.film-detail > h2 > a').attr('title') ?? '',
|
|
468
|
-
url: `${config.baseUrl}${$(el).find('div.film-poster > a').attr('href')}`,
|
|
469
|
-
image: $(el).find('div.film-poster > img').attr('data-src'),
|
|
470
|
-
type:
|
|
471
|
-
$(el).find('div.film-detail > div.fd-infor > span.float-right').text() === 'Movie'
|
|
472
|
-
? TvTypeEnum.MOVIE
|
|
473
|
-
: TvTypeEnum.TVSERIES,
|
|
474
|
-
};
|
|
475
|
-
const season = $(el)
|
|
476
|
-
.find('div.film-detail > div.fd-infor > span:nth-child(1)')
|
|
477
|
-
.text()
|
|
478
|
-
.replace('SS', '')
|
|
479
|
-
.trim();
|
|
480
|
-
const latestEpisode =
|
|
481
|
-
$(el).find('div.film-detail > div.fd-infor > span:nth-child(3)').text().replace('EPS', '').trim() ?? null;
|
|
482
|
-
if (resultItem.type === TvTypeEnum.TVSERIES) {
|
|
483
|
-
resultItem.season = season;
|
|
484
|
-
resultItem.latestEpisode = latestEpisode;
|
|
485
|
-
} else {
|
|
486
|
-
resultItem.releaseDate = season;
|
|
487
|
-
resultItem.duration = latestEpisode;
|
|
488
|
-
}
|
|
489
|
-
result.results.push(resultItem);
|
|
490
|
-
})
|
|
491
|
-
.get();
|
|
492
|
-
|
|
493
|
-
return result;
|
|
494
|
-
} catch (err) {
|
|
495
|
-
throw new Error((err as Error).message);
|
|
496
|
-
}
|
|
497
|
-
};
|
|
498
|
-
|
|
499
|
-
// Return the functional provider object
|
|
500
|
-
return {
|
|
501
|
-
// Configuration
|
|
502
|
-
name: config.name,
|
|
503
|
-
get baseUrl() {
|
|
504
|
-
return config.baseUrl;
|
|
505
|
-
},
|
|
506
|
-
set baseUrl(value: string) {
|
|
507
|
-
config.baseUrl = value.startsWith('http') ? value : `http://${value}`;
|
|
508
|
-
},
|
|
509
|
-
logo: config.logo,
|
|
510
|
-
classPath: config.classPath,
|
|
511
|
-
supportedTypes,
|
|
512
|
-
|
|
513
|
-
// Core methods, pass only the necessary methods, dont pass helpers or unused methods
|
|
514
|
-
search,
|
|
515
|
-
fetchMediaInfo,
|
|
516
|
-
fetchEpisodeSources,
|
|
517
|
-
fetchEpisodeServers,
|
|
518
|
-
fetchRecentMovies,
|
|
519
|
-
fetchRecentTvShows,
|
|
520
|
-
fetchTrendingMovies,
|
|
521
|
-
fetchTrendingTvShows,
|
|
522
|
-
fetchByCountry,
|
|
523
|
-
fetchByGenre,
|
|
524
|
-
};
|
|
525
|
-
}
|
|
526
|
-
|
|
527
|
-
export type HiMoviesProviderInstance = ReturnType<typeof createHiMovies>;
|
|
528
|
-
|
|
529
|
-
export default createHiMovies;
|
|
1
|
+
import {
|
|
2
|
+
type IMovieInfo,
|
|
3
|
+
type IEpisodeServer,
|
|
4
|
+
type StreamingServers,
|
|
5
|
+
type ISource,
|
|
6
|
+
type IMovieResult,
|
|
7
|
+
type ISearch,
|
|
8
|
+
type ProviderContext,
|
|
9
|
+
type ProviderConfig,
|
|
10
|
+
} from '../../../models';
|
|
11
|
+
|
|
12
|
+
export function createHiMovies(ctx: ProviderContext, customBaseURL?: string) {
|
|
13
|
+
const { load, extractors, enums, axios, createCustomBaseUrl, PolyURL } = ctx;
|
|
14
|
+
const { MegaCloud } = extractors;
|
|
15
|
+
const { StreamingServers: StreamingServersEnum, TvType: TvTypeEnum } = enums;
|
|
16
|
+
|
|
17
|
+
const baseUrl = createCustomBaseUrl('https://himovies.sx', customBaseURL);
|
|
18
|
+
|
|
19
|
+
const config: ProviderConfig = {
|
|
20
|
+
name: 'HiMovies',
|
|
21
|
+
languages: 'all',
|
|
22
|
+
classPath: 'MOVIES.HiMovies',
|
|
23
|
+
logo: 'https://himovies.sx/images/group_1/theme_1/favicon.png',
|
|
24
|
+
baseUrl,
|
|
25
|
+
isNSFW: false,
|
|
26
|
+
isWorking: true,
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const supportedTypes = new Set([TvTypeEnum.MOVIE, TvTypeEnum.TVSERIES]);
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Search for movies/TV shows
|
|
33
|
+
* @param query search query string
|
|
34
|
+
* @param page page number (default 1) (optional)
|
|
35
|
+
*/
|
|
36
|
+
const search = async (query: string, page: number = 1): Promise<ISearch<IMovieResult>> => {
|
|
37
|
+
const searchResult: ISearch<IMovieResult> = {
|
|
38
|
+
currentPage: page,
|
|
39
|
+
hasNextPage: false,
|
|
40
|
+
results: [],
|
|
41
|
+
};
|
|
42
|
+
try {
|
|
43
|
+
const { data } = await axios.get(`${config.baseUrl}/search/${query.replace(/[\W_]+/g, '-')}?page=${page}`);
|
|
44
|
+
|
|
45
|
+
const $ = load(data);
|
|
46
|
+
|
|
47
|
+
const navSelector = 'div.pre-pagination > nav:nth-child(1) > ul:nth-child(1)';
|
|
48
|
+
searchResult.hasNextPage =
|
|
49
|
+
$(navSelector).length > 0 ? !$(navSelector).children().last().hasClass('active') : false;
|
|
50
|
+
|
|
51
|
+
const initialResults: IMovieResult[] = [];
|
|
52
|
+
$('.film_list-wrap > div.flw-item').each((i, el) => {
|
|
53
|
+
const releaseDate = $(el).find('div.film-detail > div.fd-infor > span:nth-child(1)').text();
|
|
54
|
+
initialResults.push({
|
|
55
|
+
id: $(el).find('div.film-poster > a').attr('href')?.slice(1)!,
|
|
56
|
+
title: $(el).find('div.film-detail > h2 > a').attr('title')!,
|
|
57
|
+
url: `${config.baseUrl}${$(el).find('div.film-poster > a').attr('href')}`,
|
|
58
|
+
image: $(el).find('div.film-poster > img').attr('data-src'),
|
|
59
|
+
releaseDate: isNaN(parseInt(releaseDate)) ? undefined : releaseDate,
|
|
60
|
+
seasons: releaseDate.includes('SS') ? parseInt(releaseDate.split('SS')[1]!) : undefined,
|
|
61
|
+
type:
|
|
62
|
+
$(el).find('div.film-detail > div.fd-infor > span.float-right').text() === 'Movie'
|
|
63
|
+
? TvTypeEnum.MOVIE
|
|
64
|
+
: TvTypeEnum.TVSERIES,
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
// Fetch media info for all results in parallel
|
|
69
|
+
const mediaInfoPromises = initialResults.map(async (result) => {
|
|
70
|
+
try {
|
|
71
|
+
const mediaInfo = await fetchMediaInfo(result.id);
|
|
72
|
+
if (mediaInfo.releaseDate) {
|
|
73
|
+
const year = new Date(mediaInfo.releaseDate).getFullYear();
|
|
74
|
+
result.releaseDate = year.toString();
|
|
75
|
+
}
|
|
76
|
+
return result;
|
|
77
|
+
} catch (err) {
|
|
78
|
+
// Return original result if fetchMediaInfo fails
|
|
79
|
+
return result;
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
searchResult.results = await Promise.all(mediaInfoPromises);
|
|
84
|
+
|
|
85
|
+
return searchResult;
|
|
86
|
+
} catch (err) {
|
|
87
|
+
throw new Error((err as Error).message);
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Fetch media info
|
|
93
|
+
* @param mediaId media link or id
|
|
94
|
+
*/
|
|
95
|
+
const fetchMediaInfo = async (mediaId: string): Promise<IMovieInfo> => {
|
|
96
|
+
if (!mediaId.startsWith(config.baseUrl)) {
|
|
97
|
+
mediaId = `${config.baseUrl}/${mediaId}`;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
const movieInfo: IMovieInfo = {
|
|
101
|
+
id: mediaId.split('sx/').pop()!,
|
|
102
|
+
title: '',
|
|
103
|
+
url: mediaId,
|
|
104
|
+
};
|
|
105
|
+
try {
|
|
106
|
+
const { data } = await axios.get(mediaId);
|
|
107
|
+
const $ = load(data);
|
|
108
|
+
const recommendationsArray: IMovieResult[] = [];
|
|
109
|
+
|
|
110
|
+
$('section.block_area > div.block_area-content > div.film_list-wrap > div.flw-item').each((i, el) => {
|
|
111
|
+
recommendationsArray.push({
|
|
112
|
+
id: $(el).find('div.film-poster > a').attr('href')?.slice(1)!,
|
|
113
|
+
title: $(el).find('div.film-detail > h3.film-name > a').text(),
|
|
114
|
+
image: $(el).find('div.film-poster > img').attr('data-src'),
|
|
115
|
+
duration: $(el).find('div.film-detail > div.fd-infor > span.fdi-duration').text().replace('m', '') ?? null,
|
|
116
|
+
type:
|
|
117
|
+
$(el).find('div.film-detail > div.fd-infor > span.fdi-type').text() === 'TV'
|
|
118
|
+
? TvTypeEnum.TVSERIES
|
|
119
|
+
: (TvTypeEnum.MOVIE ?? null),
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
const uid = $('.detail_page-watch').attr('data-id')!;
|
|
124
|
+
movieInfo.cover = $('div.cover_follow').attr('style')?.slice(22).replace(')', '').replace(';', '');
|
|
125
|
+
movieInfo.title = $('.heading-name > a:nth-child(1)').text();
|
|
126
|
+
movieInfo.image = $('.film-poster > img:nth-child(1)').attr('src');
|
|
127
|
+
movieInfo.description = $('.description').text().trim();
|
|
128
|
+
movieInfo.type = movieInfo.id.includes('tv/') ? TvTypeEnum.TVSERIES : TvTypeEnum.MOVIE;
|
|
129
|
+
movieInfo.releaseDate = $('div.row-line:contains(Released:)').text().replace('Released:', '').trim();
|
|
130
|
+
movieInfo.genres = $('div.row-line:contains(Genre:) a')
|
|
131
|
+
.map((i, el) => $(el).text().split('&'))
|
|
132
|
+
.get()
|
|
133
|
+
.map((v) => v.trim());
|
|
134
|
+
movieInfo.casts = $('.row-line:contains(Casts:) a')
|
|
135
|
+
.map((i, el) => $(el).text())
|
|
136
|
+
.get();
|
|
137
|
+
movieInfo.production = $('.row-line:contains(Production:) a').text().trim();
|
|
138
|
+
movieInfo.country = $('.row-line:contains(Country:) a').text().trim();
|
|
139
|
+
movieInfo.duration = $('.row-line:contains(Duration:)')
|
|
140
|
+
.text()
|
|
141
|
+
.replace('Duration:', '')
|
|
142
|
+
.replace(/\s+/g, ' ')
|
|
143
|
+
.trim();
|
|
144
|
+
movieInfo.rating = parseFloat($('.dp-i-stats > span.item:nth-child(3)').text().replace('IMDB:', '').trim());
|
|
145
|
+
movieInfo.recommendations = recommendationsArray as any;
|
|
146
|
+
const ajaxReqUrl = (id: string, type: string, isSeasons: boolean = false) =>
|
|
147
|
+
`${config.baseUrl}/ajax/${type === 'movie' ? type : ``}${isSeasons ? 'season/list' : 'season/episodes'}/${id}`;
|
|
148
|
+
|
|
149
|
+
if (movieInfo.type === TvTypeEnum.TVSERIES) {
|
|
150
|
+
const { data } = await axios.get(ajaxReqUrl(uid, 'tv', true));
|
|
151
|
+
const $$ = load(data);
|
|
152
|
+
const seasonsIds = $$('.dropdown-menu > a')
|
|
153
|
+
.map((i, el) => $(el).attr('data-id'))
|
|
154
|
+
.get();
|
|
155
|
+
|
|
156
|
+
movieInfo.episodes = [];
|
|
157
|
+
let season = 1;
|
|
158
|
+
for (const id of seasonsIds) {
|
|
159
|
+
const { data } = await axios.get(ajaxReqUrl(id, 'season'));
|
|
160
|
+
const $$$ = load(data);
|
|
161
|
+
|
|
162
|
+
$$$('.nav > li')
|
|
163
|
+
.map((i, el) => {
|
|
164
|
+
const episode = {
|
|
165
|
+
id: $$$(el).find('a').attr('id')!.split('-')[1]!,
|
|
166
|
+
title: $$$(el).find('a').attr('title')!,
|
|
167
|
+
number: parseInt($$$(el).find('a').attr('title')!.split(':')[0]!.slice(3).trim()),
|
|
168
|
+
season: season,
|
|
169
|
+
url: `${config.baseUrl}/ajax/episode/servers/${$$$(el).find('a').attr('id')!.split('-')[1]}`,
|
|
170
|
+
};
|
|
171
|
+
movieInfo.episodes?.push(episode);
|
|
172
|
+
})
|
|
173
|
+
.get();
|
|
174
|
+
season++;
|
|
175
|
+
}
|
|
176
|
+
} else {
|
|
177
|
+
movieInfo.episodes = [
|
|
178
|
+
{
|
|
179
|
+
id: uid,
|
|
180
|
+
title: movieInfo.title,
|
|
181
|
+
url: `${config.baseUrl}/ajax/episode/list/${uid}`,
|
|
182
|
+
},
|
|
183
|
+
];
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
return movieInfo;
|
|
187
|
+
} catch (err) {
|
|
188
|
+
//console.log(err);
|
|
189
|
+
throw new Error((err as Error).message);
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Fetch episode sources
|
|
195
|
+
* @param episodeId episode id
|
|
196
|
+
* @param mediaId media id
|
|
197
|
+
* @param server server type (default `MegaCloud`) (optional)
|
|
198
|
+
*/
|
|
199
|
+
const fetchEpisodeSources = async (
|
|
200
|
+
episodeId: string,
|
|
201
|
+
mediaId: string,
|
|
202
|
+
server: StreamingServers = StreamingServersEnum.MegaCloud
|
|
203
|
+
): Promise<ISource> => {
|
|
204
|
+
if (episodeId.startsWith('http')) {
|
|
205
|
+
const serverUrl = new PolyURL(episodeId);
|
|
206
|
+
switch (server) {
|
|
207
|
+
case StreamingServersEnum.MegaCloud:
|
|
208
|
+
return {
|
|
209
|
+
headers: { Referer: serverUrl.href },
|
|
210
|
+
...(await MegaCloud().extract(serverUrl, config.baseUrl)),
|
|
211
|
+
};
|
|
212
|
+
case StreamingServersEnum.UpCloud:
|
|
213
|
+
return {
|
|
214
|
+
headers: { Referer: serverUrl.href },
|
|
215
|
+
...(await MegaCloud().extract(serverUrl, config.baseUrl)),
|
|
216
|
+
};
|
|
217
|
+
default:
|
|
218
|
+
return {
|
|
219
|
+
headers: { Referer: serverUrl.href },
|
|
220
|
+
...(await MegaCloud().extract(serverUrl, config.baseUrl)),
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
try {
|
|
226
|
+
const servers = await fetchEpisodeServers(episodeId, mediaId);
|
|
227
|
+
|
|
228
|
+
const i = servers.findIndex((s) => s.name === server);
|
|
229
|
+
|
|
230
|
+
if (i === -1) {
|
|
231
|
+
throw new Error(`Server ${server} not found`);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
const serverUrl: URL = new URL(servers[i]!.url);
|
|
235
|
+
|
|
236
|
+
return await fetchEpisodeSources(serverUrl.href, mediaId, server);
|
|
237
|
+
} catch (err) {
|
|
238
|
+
throw new Error((err as Error).message);
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Fetch episode servers
|
|
244
|
+
* @param episodeId takes episode link or movie id
|
|
245
|
+
* @param mediaId takes movie link or id (found on movie info object)
|
|
246
|
+
*/
|
|
247
|
+
const fetchEpisodeServers = async (episodeId: string, mediaId: string): Promise<IEpisodeServer[]> => {
|
|
248
|
+
if (!episodeId.startsWith(config.baseUrl + '/ajax') && !mediaId.includes('movie')) {
|
|
249
|
+
episodeId = `${config.baseUrl}/ajax/episode/servers/${episodeId}`;
|
|
250
|
+
} else {
|
|
251
|
+
episodeId = `${config.baseUrl}/ajax/episode/list/${episodeId}`;
|
|
252
|
+
}
|
|
253
|
+
try {
|
|
254
|
+
const { data } = await axios.get(episodeId);
|
|
255
|
+
const $ = load(data);
|
|
256
|
+
const servers = $('ul.nav > li')
|
|
257
|
+
.map((i, el) => ({
|
|
258
|
+
name: $(el).find('a').attr('title')!.slice(6).toLowerCase().replace('server', '').trim(),
|
|
259
|
+
url: `${config.baseUrl}/ajax/episode/sources/${$(el).find('a').attr('data-id')}`,
|
|
260
|
+
}))
|
|
261
|
+
.get();
|
|
262
|
+
|
|
263
|
+
const finalServers: IEpisodeServer[] = await Promise.all(
|
|
264
|
+
servers.map(async (server) => {
|
|
265
|
+
const { data } = await axios.get(server.url);
|
|
266
|
+
return {
|
|
267
|
+
name: server.name,
|
|
268
|
+
url: data.link,
|
|
269
|
+
};
|
|
270
|
+
})
|
|
271
|
+
);
|
|
272
|
+
|
|
273
|
+
return finalServers;
|
|
274
|
+
} catch (err) {
|
|
275
|
+
throw new Error((err as Error).message);
|
|
276
|
+
}
|
|
277
|
+
};
|
|
278
|
+
|
|
279
|
+
const fetchRecentMovies = async (): Promise<IMovieResult[]> => {
|
|
280
|
+
try {
|
|
281
|
+
const { data } = await axios.get(`${config.baseUrl}/home`);
|
|
282
|
+
const $ = load(data);
|
|
283
|
+
|
|
284
|
+
const movies = $(
|
|
285
|
+
'section.block_area:contains("Latest Movies") > div:nth-child(2) > div:nth-child(1) > div.flw-item'
|
|
286
|
+
)
|
|
287
|
+
.map((i, el) => {
|
|
288
|
+
const releaseDate = $(el).find('div.film-detail > div.fd-infor > span:nth-child(1)').text();
|
|
289
|
+
const movie: any = {
|
|
290
|
+
id: $(el).find('div.film-poster > a').attr('href')?.slice(1)!,
|
|
291
|
+
title: $(el).find('div.film-detail > h3.film-name > a').attr('title')!,
|
|
292
|
+
url: `${config.baseUrl}${$(el).find('div.film-poster > a').attr('href')}`,
|
|
293
|
+
image: $(el).find('div.film-poster > img').attr('data-src'),
|
|
294
|
+
releaseDate: isNaN(parseInt(releaseDate)) ? undefined : releaseDate,
|
|
295
|
+
duration: $(el).find('div.film-detail > div.fd-infor > span.fdi-duration').text() || null,
|
|
296
|
+
type:
|
|
297
|
+
$(el).find('div.film-detail > div.fd-infor > span.float-right').text() === 'Movie'
|
|
298
|
+
? TvTypeEnum.MOVIE
|
|
299
|
+
: TvTypeEnum.TVSERIES,
|
|
300
|
+
};
|
|
301
|
+
return movie;
|
|
302
|
+
})
|
|
303
|
+
.get();
|
|
304
|
+
return movies;
|
|
305
|
+
} catch (err) {
|
|
306
|
+
throw new Error((err as Error).message);
|
|
307
|
+
}
|
|
308
|
+
};
|
|
309
|
+
|
|
310
|
+
const fetchRecentTvShows = async (): Promise<IMovieResult[]> => {
|
|
311
|
+
try {
|
|
312
|
+
const { data } = await axios.get(`${config.baseUrl}/home`);
|
|
313
|
+
const $ = load(data);
|
|
314
|
+
|
|
315
|
+
const tvshows = $(
|
|
316
|
+
'section.block_area:contains("Latest TV Shows") > div:nth-child(2) > div:nth-child(1) > div.flw-item'
|
|
317
|
+
)
|
|
318
|
+
.map((i, el) => {
|
|
319
|
+
const tvshow = {
|
|
320
|
+
id: $(el).find('div.film-poster > a').attr('href')?.slice(1)!,
|
|
321
|
+
title: $(el).find('div.film-detail > h3.film-name > a').attr('title')!,
|
|
322
|
+
url: `${config.baseUrl}${$(el).find('div.film-poster > a').attr('href')}`,
|
|
323
|
+
image: $(el).find('div.film-poster > img').attr('data-src'),
|
|
324
|
+
season: $(el).find('div.film-detail > div.fd-infor > span:nth-child(1)').text().replace('SS', '').trim(),
|
|
325
|
+
latestEpisode:
|
|
326
|
+
$(el).find('div.film-detail > div.fd-infor > span:nth-child(3)').text().replace('EPS', '').trim() || null,
|
|
327
|
+
type:
|
|
328
|
+
$(el).find('div.film-detail > div.fd-infor > span.float-right').text() === 'Movie'
|
|
329
|
+
? TvTypeEnum.MOVIE
|
|
330
|
+
: TvTypeEnum.TVSERIES,
|
|
331
|
+
};
|
|
332
|
+
return tvshow;
|
|
333
|
+
})
|
|
334
|
+
.get();
|
|
335
|
+
return tvshows;
|
|
336
|
+
} catch (err) {
|
|
337
|
+
throw new Error((err as Error).message);
|
|
338
|
+
}
|
|
339
|
+
};
|
|
340
|
+
|
|
341
|
+
const fetchTrendingMovies = async (): Promise<IMovieResult[]> => {
|
|
342
|
+
try {
|
|
343
|
+
const { data } = await axios.get(`${config.baseUrl}/home`);
|
|
344
|
+
const $ = load(data);
|
|
345
|
+
|
|
346
|
+
const movies = $('div#trending-movies div.film_list-wrap div.flw-item')
|
|
347
|
+
.map((i, el) => {
|
|
348
|
+
const releaseDate = $(el).find('div.film-detail > div.fd-infor > span:nth-child(1)').text();
|
|
349
|
+
const movie: any = {
|
|
350
|
+
id: $(el).find('div.film-poster > a').attr('href')?.slice(1)!,
|
|
351
|
+
title: $(el).find('div.film-detail > h3.film-name > a').attr('title')!,
|
|
352
|
+
url: `${config.baseUrl}${$(el).find('div.film-poster > a').attr('href')}`,
|
|
353
|
+
image: $(el).find('div.film-poster > img').attr('data-src'),
|
|
354
|
+
releaseDate: isNaN(parseInt(releaseDate)) ? undefined : releaseDate,
|
|
355
|
+
duration: $(el).find('div.film-detail > div.fd-infor > span.fdi-duration').text() || null,
|
|
356
|
+
type:
|
|
357
|
+
$(el).find('div.film-detail > div.fd-infor > span.float-right').text() === 'Movie'
|
|
358
|
+
? TvTypeEnum.MOVIE
|
|
359
|
+
: TvTypeEnum.TVSERIES,
|
|
360
|
+
};
|
|
361
|
+
return movie;
|
|
362
|
+
})
|
|
363
|
+
.get();
|
|
364
|
+
return movies;
|
|
365
|
+
} catch (err) {
|
|
366
|
+
throw new Error((err as Error).message);
|
|
367
|
+
}
|
|
368
|
+
};
|
|
369
|
+
|
|
370
|
+
const fetchTrendingTvShows = async (): Promise<IMovieResult[]> => {
|
|
371
|
+
try {
|
|
372
|
+
const { data } = await axios.get(`${config.baseUrl}/home`);
|
|
373
|
+
const $ = load(data);
|
|
374
|
+
|
|
375
|
+
const tvshows = $('div#trending-tv div.film_list-wrap div.flw-item')
|
|
376
|
+
.map((i, el) => {
|
|
377
|
+
const tvshow = {
|
|
378
|
+
id: $(el).find('div.film-poster > a').attr('href')?.slice(1)!,
|
|
379
|
+
title: $(el).find('div.film-detail > h3.film-name > a').attr('title')!,
|
|
380
|
+
url: `${config.baseUrl}${$(el).find('div.film-poster > a').attr('href')}`,
|
|
381
|
+
image: $(el).find('div.film-poster > img').attr('data-src'),
|
|
382
|
+
season: $(el).find('div.film-detail > div.fd-infor > span:nth-child(1)').text().replace('SS', '').trim(),
|
|
383
|
+
latestEpisode:
|
|
384
|
+
$(el).find('div.film-detail > div.fd-infor > span:nth-child(3)').text().replace('EPS', '').trim() || null,
|
|
385
|
+
type:
|
|
386
|
+
$(el).find('div.film-detail > div.fd-infor > span.float-right').text() === 'Movie'
|
|
387
|
+
? TvTypeEnum.MOVIE
|
|
388
|
+
: TvTypeEnum.TVSERIES,
|
|
389
|
+
};
|
|
390
|
+
return tvshow;
|
|
391
|
+
})
|
|
392
|
+
.get();
|
|
393
|
+
return tvshows;
|
|
394
|
+
} catch (err) {
|
|
395
|
+
throw new Error((err as Error).message);
|
|
396
|
+
}
|
|
397
|
+
};
|
|
398
|
+
|
|
399
|
+
const fetchByCountry = async (country: string, page: number = 1): Promise<ISearch<IMovieResult>> => {
|
|
400
|
+
const result: ISearch<IMovieResult> = {
|
|
401
|
+
currentPage: page,
|
|
402
|
+
hasNextPage: false,
|
|
403
|
+
results: [],
|
|
404
|
+
};
|
|
405
|
+
const navSelector = 'div.pre-pagination > nav:nth-child(1) > ul:nth-child(1)';
|
|
406
|
+
|
|
407
|
+
try {
|
|
408
|
+
const { data } = await axios.get(`${config.baseUrl}/country/${country}/?page=${page}`);
|
|
409
|
+
const $ = load(data);
|
|
410
|
+
|
|
411
|
+
result.hasNextPage = $(navSelector).length > 0 ? !$(navSelector).children().last().hasClass('active') : false;
|
|
412
|
+
|
|
413
|
+
$('div.container > section.block_area > div.block_area-content > div.film_list-wrap > div.flw-item')
|
|
414
|
+
.each((i, el) => {
|
|
415
|
+
const resultItem: IMovieResult = {
|
|
416
|
+
id: $(el).find('div.film-poster > a').attr('href')?.slice(1) ?? '',
|
|
417
|
+
title: $(el).find('div.film-detail > h2.film-name > a').attr('title') ?? '',
|
|
418
|
+
url: `${config.baseUrl}${$(el).find('div.film-poster > a').attr('href')}`,
|
|
419
|
+
image: $(el).find('div.film-poster > img').attr('data-src'),
|
|
420
|
+
type:
|
|
421
|
+
$(el).find('div.film-detail > div.fd-infor > span.float-right').text() === 'Movie'
|
|
422
|
+
? TvTypeEnum.MOVIE
|
|
423
|
+
: TvTypeEnum.TVSERIES,
|
|
424
|
+
};
|
|
425
|
+
const season = $(el)
|
|
426
|
+
.find('div.film-detail > div.fd-infor > span:nth-child(1)')
|
|
427
|
+
.text()
|
|
428
|
+
.replace('SS', '')
|
|
429
|
+
.trim();
|
|
430
|
+
const latestEpisode =
|
|
431
|
+
$(el).find('div.film-detail > div.fd-infor > span:nth-child(3)').text().replace('EPS', '').trim() ?? null;
|
|
432
|
+
if (resultItem.type === TvTypeEnum.TVSERIES) {
|
|
433
|
+
resultItem.season = season;
|
|
434
|
+
resultItem.latestEpisode = latestEpisode;
|
|
435
|
+
} else {
|
|
436
|
+
resultItem.releaseDate = season;
|
|
437
|
+
resultItem.duration = latestEpisode;
|
|
438
|
+
}
|
|
439
|
+
result.results.push(resultItem);
|
|
440
|
+
})
|
|
441
|
+
.get();
|
|
442
|
+
return result;
|
|
443
|
+
} catch (err) {
|
|
444
|
+
throw new Error((err as Error).message);
|
|
445
|
+
}
|
|
446
|
+
};
|
|
447
|
+
|
|
448
|
+
const fetchByGenre = async (genre: string, page: number = 1): Promise<ISearch<IMovieResult>> => {
|
|
449
|
+
const result: ISearch<IMovieResult> = {
|
|
450
|
+
currentPage: page,
|
|
451
|
+
hasNextPage: false,
|
|
452
|
+
results: [],
|
|
453
|
+
};
|
|
454
|
+
try {
|
|
455
|
+
const { data } = await axios.get(`${config.baseUrl}/genre/${genre}?page=${page}`);
|
|
456
|
+
|
|
457
|
+
const $ = load(data);
|
|
458
|
+
|
|
459
|
+
const navSelector = 'div.pre-pagination > nav:nth-child(1) > ul:nth-child(1)';
|
|
460
|
+
|
|
461
|
+
result.hasNextPage = $(navSelector).length > 0 ? !$(navSelector).children().last().hasClass('active') : false;
|
|
462
|
+
|
|
463
|
+
$('.film_list-wrap > div.flw-item')
|
|
464
|
+
.each((i, el) => {
|
|
465
|
+
const resultItem: IMovieResult = {
|
|
466
|
+
id: $(el).find('div.film-poster > a').attr('href')?.slice(1) ?? '',
|
|
467
|
+
title: $(el).find('div.film-detail > h2 > a').attr('title') ?? '',
|
|
468
|
+
url: `${config.baseUrl}${$(el).find('div.film-poster > a').attr('href')}`,
|
|
469
|
+
image: $(el).find('div.film-poster > img').attr('data-src'),
|
|
470
|
+
type:
|
|
471
|
+
$(el).find('div.film-detail > div.fd-infor > span.float-right').text() === 'Movie'
|
|
472
|
+
? TvTypeEnum.MOVIE
|
|
473
|
+
: TvTypeEnum.TVSERIES,
|
|
474
|
+
};
|
|
475
|
+
const season = $(el)
|
|
476
|
+
.find('div.film-detail > div.fd-infor > span:nth-child(1)')
|
|
477
|
+
.text()
|
|
478
|
+
.replace('SS', '')
|
|
479
|
+
.trim();
|
|
480
|
+
const latestEpisode =
|
|
481
|
+
$(el).find('div.film-detail > div.fd-infor > span:nth-child(3)').text().replace('EPS', '').trim() ?? null;
|
|
482
|
+
if (resultItem.type === TvTypeEnum.TVSERIES) {
|
|
483
|
+
resultItem.season = season;
|
|
484
|
+
resultItem.latestEpisode = latestEpisode;
|
|
485
|
+
} else {
|
|
486
|
+
resultItem.releaseDate = season;
|
|
487
|
+
resultItem.duration = latestEpisode;
|
|
488
|
+
}
|
|
489
|
+
result.results.push(resultItem);
|
|
490
|
+
})
|
|
491
|
+
.get();
|
|
492
|
+
|
|
493
|
+
return result;
|
|
494
|
+
} catch (err) {
|
|
495
|
+
throw new Error((err as Error).message);
|
|
496
|
+
}
|
|
497
|
+
};
|
|
498
|
+
|
|
499
|
+
// Return the functional provider object
|
|
500
|
+
return {
|
|
501
|
+
// Configuration
|
|
502
|
+
name: config.name,
|
|
503
|
+
get baseUrl() {
|
|
504
|
+
return config.baseUrl;
|
|
505
|
+
},
|
|
506
|
+
set baseUrl(value: string) {
|
|
507
|
+
config.baseUrl = value.startsWith('http') ? value : `http://${value}`;
|
|
508
|
+
},
|
|
509
|
+
logo: config.logo,
|
|
510
|
+
classPath: config.classPath,
|
|
511
|
+
supportedTypes,
|
|
512
|
+
|
|
513
|
+
// Core methods, pass only the necessary methods, dont pass helpers or unused methods
|
|
514
|
+
search,
|
|
515
|
+
fetchMediaInfo,
|
|
516
|
+
fetchEpisodeSources,
|
|
517
|
+
fetchEpisodeServers,
|
|
518
|
+
fetchRecentMovies,
|
|
519
|
+
fetchRecentTvShows,
|
|
520
|
+
fetchTrendingMovies,
|
|
521
|
+
fetchTrendingTvShows,
|
|
522
|
+
fetchByCountry,
|
|
523
|
+
fetchByGenre,
|
|
524
|
+
};
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
export type HiMoviesProviderInstance = ReturnType<typeof createHiMovies>;
|
|
528
|
+
|
|
529
|
+
export default createHiMovies;
|