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
package/src/index.tsx
CHANGED
|
@@ -1,175 +1,176 @@
|
|
|
1
|
-
import { URL as PolyURL, URLSearchParams as PolyURLSearchParams } from './utils/url-polyfill';
|
|
2
|
-
|
|
3
|
-
// Polyfill global scope if they don't exist
|
|
4
|
-
if (typeof globalThis !== 'undefined') {
|
|
5
|
-
// @ts-ignore
|
|
6
|
-
if (!globalThis.URL) {
|
|
7
|
-
(globalThis as any).URL = PolyURL;
|
|
8
|
-
}
|
|
9
|
-
// @ts-ignore
|
|
10
|
-
if (!globalThis.URLSearchParams) {
|
|
11
|
-
(globalThis as any).URLSearchParams = PolyURLSearchParams;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
// Providers (namespaced provider groups)
|
|
15
|
-
import { ANIME, LIGHT_NOVELS, MANGA, MOVIES, META } from './providers';
|
|
16
|
-
|
|
17
|
-
// Provider metadata (catalog of built-in providers)
|
|
18
|
-
import {
|
|
19
|
-
|
|
20
|
-
import ExtensionRegistry from './extension-registry.json';
|
|
21
|
-
// Utils (contexts, and provider management)
|
|
22
|
-
import {
|
|
23
|
-
createProviderContext,
|
|
24
|
-
ProviderManager,
|
|
25
|
-
ExtractorManager,
|
|
26
|
-
createExtractorContext,
|
|
27
|
-
defaultAxios,
|
|
28
|
-
defaultExtractorContext,
|
|
29
|
-
|
|
30
|
-
} from './utils';
|
|
31
|
-
|
|
32
|
-
// Extractors (video/file hosters and scrapers)
|
|
33
|
-
import {
|
|
34
|
-
AsianLoad,
|
|
35
|
-
Filemoon,
|
|
36
|
-
GogoCDN,
|
|
37
|
-
Kwik,
|
|
38
|
-
MixDrop,
|
|
39
|
-
Mp4Upload,
|
|
40
|
-
RapidCloud,
|
|
41
|
-
StreamHub,
|
|
42
|
-
StreamLare,
|
|
43
|
-
StreamSB,
|
|
44
|
-
StreamTape,
|
|
45
|
-
StreamWish,
|
|
46
|
-
VidMoly,
|
|
47
|
-
VizCloud,
|
|
48
|
-
Mp4Player,
|
|
49
|
-
MegaCloud,
|
|
50
|
-
VidHide,
|
|
51
|
-
Voe,
|
|
52
|
-
MegaUp,
|
|
53
|
-
} from './extractors';
|
|
54
|
-
|
|
55
|
-
// Models (domain types, enums, and constants)
|
|
56
|
-
import {
|
|
57
|
-
type IProviderStats,
|
|
58
|
-
type ISearch,
|
|
59
|
-
type IAnimeEpisode,
|
|
60
|
-
type IAnimeInfo,
|
|
61
|
-
type IAnimeResult,
|
|
62
|
-
type IEpisodeServer,
|
|
63
|
-
type IVideo,
|
|
64
|
-
StreamingServers,
|
|
65
|
-
MediaStatus,
|
|
66
|
-
SubOrDub,
|
|
67
|
-
type IMangaResult,
|
|
68
|
-
type IMangaChapter,
|
|
69
|
-
type IMangaInfo,
|
|
70
|
-
type ILightNovelResult,
|
|
71
|
-
type ILightNovelInfo,
|
|
72
|
-
type ILightNovelChapter,
|
|
73
|
-
type ILightNovelChapterContent,
|
|
74
|
-
type IMangaChapterPage,
|
|
75
|
-
TvType,
|
|
76
|
-
type IMovieEpisode,
|
|
77
|
-
type IMovieInfo,
|
|
78
|
-
type ISource,
|
|
79
|
-
type ISubtitle,
|
|
80
|
-
type IMovieResult,
|
|
81
|
-
type Intro,
|
|
82
|
-
Genres,
|
|
83
|
-
type INewsFeed,
|
|
84
|
-
Topics,
|
|
85
|
-
type INewsInfo,
|
|
86
|
-
type FuzzyDate,
|
|
87
|
-
type ITitle,
|
|
88
|
-
MediaFormat,
|
|
89
|
-
type ProxyConfig,
|
|
90
|
-
type AniZipEpisode,
|
|
91
|
-
type IMovieSeason,
|
|
92
|
-
type ExtensionManifest,
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
//
|
|
97
|
-
//
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
export {
|
|
104
|
-
|
|
105
|
-
// Models: runtime enums/constants
|
|
106
|
-
export { Topics, Genres, SubOrDub, StreamingServers, MediaStatus, TvType, MediaFormat };
|
|
107
|
-
|
|
108
|
-
// Extractors
|
|
109
|
-
export {
|
|
110
|
-
GogoCDN,
|
|
111
|
-
StreamSB,
|
|
112
|
-
MixDrop,
|
|
113
|
-
Kwik,
|
|
114
|
-
RapidCloud,
|
|
115
|
-
StreamTape,
|
|
116
|
-
StreamLare,
|
|
117
|
-
StreamHub,
|
|
118
|
-
VizCloud,
|
|
119
|
-
AsianLoad,
|
|
120
|
-
Filemoon,
|
|
121
|
-
Mp4Upload,
|
|
122
|
-
StreamWish,
|
|
123
|
-
VidMoly,
|
|
124
|
-
MegaUp,
|
|
125
|
-
Mp4Player,
|
|
126
|
-
MegaCloud,
|
|
127
|
-
VidHide,
|
|
128
|
-
Voe,
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
// Models: TypeScript types
|
|
132
|
-
export type {
|
|
133
|
-
IProviderStats,
|
|
134
|
-
IAnimeEpisode,
|
|
135
|
-
IAnimeInfo,
|
|
136
|
-
IAnimeResult,
|
|
137
|
-
IEpisodeServer,
|
|
138
|
-
IVideo,
|
|
139
|
-
IMangaResult,
|
|
140
|
-
IMangaChapter,
|
|
141
|
-
IMangaInfo,
|
|
142
|
-
ILightNovelResult,
|
|
143
|
-
ILightNovelInfo,
|
|
144
|
-
ILightNovelChapter,
|
|
145
|
-
ILightNovelChapterContent,
|
|
146
|
-
ISearch,
|
|
147
|
-
IMangaChapterPage,
|
|
148
|
-
IMovieEpisode,
|
|
149
|
-
IMovieInfo,
|
|
150
|
-
ISource,
|
|
151
|
-
ISubtitle,
|
|
152
|
-
IMovieResult,
|
|
153
|
-
Intro,
|
|
154
|
-
INewsFeed,
|
|
155
|
-
INewsInfo,
|
|
156
|
-
FuzzyDate,
|
|
157
|
-
ITitle,
|
|
158
|
-
ProxyConfig,
|
|
159
|
-
AniZipEpisode,
|
|
160
|
-
IMovieSeason,
|
|
161
|
-
ExtensionManifest,
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
1
|
+
import { URL as PolyURL, URLSearchParams as PolyURLSearchParams } from './utils/url-polyfill';
|
|
2
|
+
|
|
3
|
+
// Polyfill global scope if they don't exist
|
|
4
|
+
if (typeof globalThis !== 'undefined') {
|
|
5
|
+
// @ts-ignore
|
|
6
|
+
if (!globalThis.URL) {
|
|
7
|
+
(globalThis as any).URL = PolyURL;
|
|
8
|
+
}
|
|
9
|
+
// @ts-ignore
|
|
10
|
+
if (!globalThis.URLSearchParams) {
|
|
11
|
+
(globalThis as any).URLSearchParams = PolyURLSearchParams;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
// Providers (namespaced provider groups)
|
|
15
|
+
import { ANIME, LIGHT_NOVELS, MANGA, MOVIES, META } from './providers';
|
|
16
|
+
|
|
17
|
+
// Provider metadata (catalog of built-in providers)
|
|
18
|
+
import type { AnimeProvider, MovieProvider, animeProviders, movieProviders } from './utils';
|
|
19
|
+
|
|
20
|
+
import ExtensionRegistry from './extension-registry.json';
|
|
21
|
+
// Utils (contexts, and provider management)
|
|
22
|
+
import {
|
|
23
|
+
createProviderContext,
|
|
24
|
+
ProviderManager,
|
|
25
|
+
ExtractorManager,
|
|
26
|
+
createExtractorContext,
|
|
27
|
+
defaultAxios,
|
|
28
|
+
defaultExtractorContext,
|
|
29
|
+
defaultExtractors,
|
|
30
|
+
} from './utils';
|
|
31
|
+
|
|
32
|
+
// Extractors (video/file hosters and scrapers)
|
|
33
|
+
import {
|
|
34
|
+
AsianLoad,
|
|
35
|
+
Filemoon,
|
|
36
|
+
GogoCDN,
|
|
37
|
+
Kwik,
|
|
38
|
+
MixDrop,
|
|
39
|
+
Mp4Upload,
|
|
40
|
+
RapidCloud,
|
|
41
|
+
StreamHub,
|
|
42
|
+
StreamLare,
|
|
43
|
+
StreamSB,
|
|
44
|
+
StreamTape,
|
|
45
|
+
StreamWish,
|
|
46
|
+
VidMoly,
|
|
47
|
+
VizCloud,
|
|
48
|
+
Mp4Player,
|
|
49
|
+
MegaCloud,
|
|
50
|
+
VidHide,
|
|
51
|
+
Voe,
|
|
52
|
+
MegaUp,
|
|
53
|
+
} from './extractors';
|
|
54
|
+
|
|
55
|
+
// Models (domain types, enums, and constants)
|
|
56
|
+
import {
|
|
57
|
+
type IProviderStats,
|
|
58
|
+
type ISearch,
|
|
59
|
+
type IAnimeEpisode,
|
|
60
|
+
type IAnimeInfo,
|
|
61
|
+
type IAnimeResult,
|
|
62
|
+
type IEpisodeServer,
|
|
63
|
+
type IVideo,
|
|
64
|
+
StreamingServers,
|
|
65
|
+
MediaStatus,
|
|
66
|
+
SubOrDub,
|
|
67
|
+
type IMangaResult,
|
|
68
|
+
type IMangaChapter,
|
|
69
|
+
type IMangaInfo,
|
|
70
|
+
type ILightNovelResult,
|
|
71
|
+
type ILightNovelInfo,
|
|
72
|
+
type ILightNovelChapter,
|
|
73
|
+
type ILightNovelChapterContent,
|
|
74
|
+
type IMangaChapterPage,
|
|
75
|
+
TvType,
|
|
76
|
+
type IMovieEpisode,
|
|
77
|
+
type IMovieInfo,
|
|
78
|
+
type ISource,
|
|
79
|
+
type ISubtitle,
|
|
80
|
+
type IMovieResult,
|
|
81
|
+
type Intro,
|
|
82
|
+
Genres,
|
|
83
|
+
type INewsFeed,
|
|
84
|
+
Topics,
|
|
85
|
+
type INewsInfo,
|
|
86
|
+
type FuzzyDate,
|
|
87
|
+
type ITitle,
|
|
88
|
+
MediaFormat,
|
|
89
|
+
type ProxyConfig,
|
|
90
|
+
type AniZipEpisode,
|
|
91
|
+
type IMovieSeason,
|
|
92
|
+
type ExtensionManifest,
|
|
93
|
+
type ExtractorInfo,
|
|
94
|
+
} from './models';
|
|
95
|
+
|
|
96
|
+
// ---------------------------------------------------------------------------
|
|
97
|
+
// Exports
|
|
98
|
+
// ---------------------------------------------------------------------------
|
|
99
|
+
|
|
100
|
+
// Providers (namespaced)
|
|
101
|
+
export { ANIME, MANGA, LIGHT_NOVELS, MOVIES, META };
|
|
102
|
+
|
|
103
|
+
export type { AnimeProvider, MovieProvider, animeProviders, movieProviders };
|
|
104
|
+
|
|
105
|
+
// Models: runtime enums/constants
|
|
106
|
+
export { Topics, Genres, SubOrDub, StreamingServers, MediaStatus, TvType, MediaFormat };
|
|
107
|
+
|
|
108
|
+
// Extractors
|
|
109
|
+
export {
|
|
110
|
+
GogoCDN,
|
|
111
|
+
StreamSB,
|
|
112
|
+
MixDrop,
|
|
113
|
+
Kwik,
|
|
114
|
+
RapidCloud,
|
|
115
|
+
StreamTape,
|
|
116
|
+
StreamLare,
|
|
117
|
+
StreamHub,
|
|
118
|
+
VizCloud,
|
|
119
|
+
AsianLoad,
|
|
120
|
+
Filemoon,
|
|
121
|
+
Mp4Upload,
|
|
122
|
+
StreamWish,
|
|
123
|
+
VidMoly,
|
|
124
|
+
MegaUp,
|
|
125
|
+
Mp4Player,
|
|
126
|
+
MegaCloud,
|
|
127
|
+
VidHide,
|
|
128
|
+
Voe,
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
// Models: TypeScript types
|
|
132
|
+
export type {
|
|
133
|
+
IProviderStats,
|
|
134
|
+
IAnimeEpisode,
|
|
135
|
+
IAnimeInfo,
|
|
136
|
+
IAnimeResult,
|
|
137
|
+
IEpisodeServer,
|
|
138
|
+
IVideo,
|
|
139
|
+
IMangaResult,
|
|
140
|
+
IMangaChapter,
|
|
141
|
+
IMangaInfo,
|
|
142
|
+
ILightNovelResult,
|
|
143
|
+
ILightNovelInfo,
|
|
144
|
+
ILightNovelChapter,
|
|
145
|
+
ILightNovelChapterContent,
|
|
146
|
+
ISearch,
|
|
147
|
+
IMangaChapterPage,
|
|
148
|
+
IMovieEpisode,
|
|
149
|
+
IMovieInfo,
|
|
150
|
+
ISource,
|
|
151
|
+
ISubtitle,
|
|
152
|
+
IMovieResult,
|
|
153
|
+
Intro,
|
|
154
|
+
INewsFeed,
|
|
155
|
+
INewsInfo,
|
|
156
|
+
FuzzyDate,
|
|
157
|
+
ITitle,
|
|
158
|
+
ProxyConfig,
|
|
159
|
+
AniZipEpisode,
|
|
160
|
+
IMovieSeason,
|
|
161
|
+
ExtensionManifest,
|
|
162
|
+
ExtractorInfo,
|
|
163
|
+
};
|
|
164
|
+
export { ExtensionRegistry };
|
|
165
|
+
// Utils: context creation and provider management
|
|
166
|
+
export {
|
|
167
|
+
createProviderContext,
|
|
168
|
+
ProviderManager,
|
|
169
|
+
ExtractorManager,
|
|
170
|
+
createExtractorContext,
|
|
171
|
+
PolyURL,
|
|
172
|
+
PolyURLSearchParams,
|
|
173
|
+
defaultAxios,
|
|
174
|
+
defaultExtractorContext,
|
|
175
|
+
defaultExtractors,
|
|
176
|
+
};
|
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
import type { StreamingServers } from './types';
|
|
2
|
-
|
|
3
|
-
export type ProviderType = 'anime' | 'movies' | 'manga' | 'light-novels' | 'meta';
|
|
4
|
-
|
|
5
|
-
export interface ExtractorInfo {
|
|
6
|
-
/** name of the extractor like MegaCloud */
|
|
7
|
-
name: StreamingServers;
|
|
8
|
-
/** version of the extractor */
|
|
9
|
-
version: string;
|
|
10
|
-
/**github url path */
|
|
11
|
-
main: string;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Extension manifest interface for defining extension metadata
|
|
15
|
-
*/
|
|
16
|
-
export interface ExtensionManifest {
|
|
17
|
-
/** Unique identifier for the extension */
|
|
18
|
-
id: string;
|
|
19
|
-
|
|
20
|
-
/** Human-readable name */
|
|
21
|
-
name: string;
|
|
22
|
-
|
|
23
|
-
/** Brief description of what the extension provides */
|
|
24
|
-
description: string;
|
|
25
|
-
|
|
26
|
-
/** Extension version (semver format) */
|
|
27
|
-
version: string;
|
|
28
|
-
|
|
29
|
-
/** Author information */
|
|
30
|
-
author: {
|
|
31
|
-
name: string;
|
|
32
|
-
email?: string;
|
|
33
|
-
url?: string;
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
/** Extension category */
|
|
37
|
-
category: ProviderType;
|
|
38
|
-
|
|
39
|
-
/** Main entry point URL or file path */
|
|
40
|
-
main: string;
|
|
41
|
-
|
|
42
|
-
/** Factory function names exported by this extension */
|
|
43
|
-
factoryName: string;
|
|
44
|
-
|
|
45
|
-
/** Homepage URL */
|
|
46
|
-
baseUrl: string;
|
|
47
|
-
|
|
48
|
-
/** Extension icon URL */
|
|
49
|
-
logo: string;
|
|
50
|
-
|
|
51
|
-
/** Supported languages/regions */
|
|
52
|
-
languages?: string[];
|
|
53
|
-
|
|
54
|
-
/** Whether this extension requires adult content warnings */
|
|
55
|
-
nsfw?: boolean;
|
|
56
|
-
|
|
57
|
-
/** Extension status */
|
|
58
|
-
status: 'stable' | 'beta' | 'alpha' | 'deprecated';
|
|
59
|
-
|
|
60
|
-
/** Last updated timestamp */
|
|
61
|
-
lastUpdated: string;
|
|
62
|
-
|
|
63
|
-
/** extractors name used in the provider */
|
|
64
|
-
extractors: string[];
|
|
65
|
-
|
|
66
|
-
/** subbed for anime's */
|
|
67
|
-
subbed?: boolean;
|
|
68
|
-
|
|
69
|
-
/** dubbed for anime's */
|
|
70
|
-
dubbed?: boolean;
|
|
71
|
-
|
|
72
|
-
/** isSourceEmbed (boolean value to represent if a provider needs extractors) */
|
|
73
|
-
isSourceEmbed?: boolean;
|
|
74
|
-
|
|
75
|
-
/** isSourceDirect (boolean value to represent if a provider has direct sources)*/
|
|
76
|
-
isSourceDirect?: boolean;
|
|
77
|
-
}
|
|
1
|
+
import type { StreamingServers } from './types';
|
|
2
|
+
|
|
3
|
+
export type ProviderType = 'anime' | 'movies' | 'manga' | 'light-novels' | 'meta';
|
|
4
|
+
|
|
5
|
+
export interface ExtractorInfo {
|
|
6
|
+
/** name of the extractor like MegaCloud */
|
|
7
|
+
name: StreamingServers;
|
|
8
|
+
/** version of the extractor */
|
|
9
|
+
version: string;
|
|
10
|
+
/**github url path */
|
|
11
|
+
main: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Extension manifest interface for defining extension metadata
|
|
15
|
+
*/
|
|
16
|
+
export interface ExtensionManifest {
|
|
17
|
+
/** Unique identifier for the extension */
|
|
18
|
+
id: string;
|
|
19
|
+
|
|
20
|
+
/** Human-readable name */
|
|
21
|
+
name: string;
|
|
22
|
+
|
|
23
|
+
/** Brief description of what the extension provides */
|
|
24
|
+
description: string;
|
|
25
|
+
|
|
26
|
+
/** Extension version (semver format) */
|
|
27
|
+
version: string;
|
|
28
|
+
|
|
29
|
+
/** Author information */
|
|
30
|
+
author: {
|
|
31
|
+
name: string;
|
|
32
|
+
email?: string;
|
|
33
|
+
url?: string;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/** Extension category */
|
|
37
|
+
category: ProviderType;
|
|
38
|
+
|
|
39
|
+
/** Main entry point URL or file path */
|
|
40
|
+
main: string;
|
|
41
|
+
|
|
42
|
+
/** Factory function names exported by this extension */
|
|
43
|
+
factoryName: string;
|
|
44
|
+
|
|
45
|
+
/** Homepage URL */
|
|
46
|
+
baseUrl: string;
|
|
47
|
+
|
|
48
|
+
/** Extension icon URL */
|
|
49
|
+
logo: string;
|
|
50
|
+
|
|
51
|
+
/** Supported languages/regions */
|
|
52
|
+
languages?: string[];
|
|
53
|
+
|
|
54
|
+
/** Whether this extension requires adult content warnings */
|
|
55
|
+
nsfw?: boolean;
|
|
56
|
+
|
|
57
|
+
/** Extension status */
|
|
58
|
+
status: 'stable' | 'beta' | 'alpha' | 'deprecated';
|
|
59
|
+
|
|
60
|
+
/** Last updated timestamp */
|
|
61
|
+
lastUpdated: string;
|
|
62
|
+
|
|
63
|
+
/** extractors name used in the provider */
|
|
64
|
+
extractors: string[];
|
|
65
|
+
|
|
66
|
+
/** subbed for anime's */
|
|
67
|
+
subbed?: boolean;
|
|
68
|
+
|
|
69
|
+
/** dubbed for anime's */
|
|
70
|
+
dubbed?: boolean;
|
|
71
|
+
|
|
72
|
+
/** isSourceEmbed (boolean value to represent if a provider needs extractors) */
|
|
73
|
+
isSourceEmbed?: boolean;
|
|
74
|
+
|
|
75
|
+
/** isSourceDirect (boolean value to represent if a provider has direct sources)*/
|
|
76
|
+
isSourceDirect?: boolean;
|
|
77
|
+
}
|
|
@@ -1,41 +1,55 @@
|
|
|
1
|
-
import type { AxiosInstance } from 'axios';
|
|
2
|
-
import type { CheerioAPI } from 'cheerio';
|
|
3
|
-
import type { PolyURL, PolyURLSearchParams } from '../utils/url-polyfill';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
1
|
+
import type { AxiosInstance } from 'axios';
|
|
2
|
+
import type { CheerioAPI } from 'cheerio';
|
|
3
|
+
import type { PolyURL, PolyURLSearchParams } from '../utils/url-polyfill';
|
|
4
|
+
import type {
|
|
5
|
+
bypassDdosGuard,
|
|
6
|
+
getDdosGuardCookiesWithWebView,
|
|
7
|
+
makeGetRequestWithWebView,
|
|
8
|
+
multiply,
|
|
9
|
+
deobfuscateScript,
|
|
10
|
+
} from '../NativeConsumet';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* ExtractorContext:
|
|
14
|
+
* This context is injected into each extractor to provide core utilities.
|
|
15
|
+
*/
|
|
16
|
+
export interface ExtractorContext {
|
|
17
|
+
axios: AxiosInstance;
|
|
18
|
+
load: (html: string) => CheerioAPI;
|
|
19
|
+
USER_AGENT?: string;
|
|
20
|
+
PolyURL: typeof PolyURL;
|
|
21
|
+
PolyURLSearchParams: typeof PolyURLSearchParams;
|
|
22
|
+
NativeConsumet: {
|
|
23
|
+
getDdosGuardCookiesWithWebView: typeof getDdosGuardCookiesWithWebView;
|
|
24
|
+
makeGetRequestWithWebView: typeof makeGetRequestWithWebView;
|
|
25
|
+
multiply: typeof multiply;
|
|
26
|
+
bypassDdosGuard: typeof bypassDdosGuard;
|
|
27
|
+
deobfuscateScript: typeof deobfuscateScript;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Configuration options for creating a extractor context
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
export interface ExtractorContextConfig {
|
|
36
|
+
/**
|
|
37
|
+
* Custom axios instance (optional) - if not provided, a default one is created
|
|
38
|
+
*/
|
|
39
|
+
axios?: AxiosInstance;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Custom cheerio load function (optional) - defaults to cheerio.load
|
|
43
|
+
*/
|
|
44
|
+
load?: (html: string) => CheerioAPI;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Custom user agent (optional) - defaults to a standard browser user agent
|
|
48
|
+
*/
|
|
49
|
+
userAgent?: string;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Custom extractors (optional) - defaults to dynamic extractors
|
|
53
|
+
*/
|
|
54
|
+
extractors?: any;
|
|
55
|
+
}
|