react-native-consumet 1.1.0 → 1.2.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/README.md +19 -0
- package/android/generated/java/com/consumet/NativeConsumetSpec.java +8 -0
- package/android/generated/jni/RNConsumetSpec-generated.cpp +12 -0
- package/android/generated/jni/react/renderer/components/RNConsumetSpec/RNConsumetSpecJSI-generated.cpp +18 -0
- package/android/generated/jni/react/renderer/components/RNConsumetSpec/RNConsumetSpecJSI.h +18 -0
- package/android/src/main/java/com/consumet/ConsumetModule.kt +12 -1
- package/android/src/main/java/com/consumet/DdosGuardModule.kt +1 -132
- package/android/src/main/java/com/consumet/HttpRequestModule.kt +417 -0
- package/ios/generated/RNConsumetSpec/RNConsumetSpec-generated.mm +14 -0
- package/ios/generated/RNConsumetSpec/RNConsumetSpec.h +10 -0
- package/ios/generated/RNConsumetSpecJSI-generated.cpp +18 -0
- package/ios/generated/RNConsumetSpecJSI.h +18 -0
- package/lib/commonjs/NativeConsumet.ts +22 -0
- package/lib/commonjs/extension-registry.json +75 -2
- package/lib/commonjs/extractors/index.js +6 -6
- package/lib/commonjs/extractors/index.js.map +1 -1
- package/lib/commonjs/extractors/megacloud.js +11 -5
- package/lib/commonjs/extractors/megacloud.js.map +1 -1
- package/lib/commonjs/extractors/megaup.js +97 -85
- package/lib/commonjs/extractors/megaup.js.map +1 -1
- package/lib/commonjs/extractors/{StreamP2P.js → streamp2p.js} +1 -1
- package/lib/commonjs/extractors/{StreamP2P.js.map → streamp2p.js.map} +1 -1
- package/lib/commonjs/extractors/streamwish.js +31 -25
- package/lib/commonjs/extractors/streamwish.js.map +1 -1
- package/lib/commonjs/extractors/vidhide.js +35 -20
- package/lib/commonjs/extractors/vidhide.js.map +1 -1
- package/lib/commonjs/index.js +1 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/providers/anime/animekai/animekai.js +112 -0
- package/lib/commonjs/providers/anime/animekai/animekai.js.map +1 -0
- package/lib/commonjs/providers/anime/animekai/create-animekai.js +499 -0
- package/lib/commonjs/providers/anime/animekai/create-animekai.js.map +1 -0
- package/lib/commonjs/providers/anime/animepahe/animepahe.js +6 -13
- package/lib/commonjs/providers/anime/animepahe/animepahe.js.map +1 -1
- package/lib/commonjs/providers/anime/animepahe/create-animepahe.js +1 -10
- package/lib/commonjs/providers/anime/animepahe/create-animepahe.js.map +1 -1
- package/lib/commonjs/providers/anime/index.js +4 -2
- package/lib/commonjs/providers/anime/index.js.map +1 -1
- package/lib/commonjs/providers/anime/zoro/create-zoro.js +1 -10
- package/lib/commonjs/providers/anime/zoro/create-zoro.js.map +1 -1
- package/lib/commonjs/providers/anime/zoro/zoro.js +6 -13
- package/lib/commonjs/providers/anime/zoro/zoro.js.map +1 -1
- package/lib/commonjs/providers/meta/anilist.js +1 -1
- package/lib/commonjs/providers/movies/dramacool.js +395 -331
- package/lib/commonjs/providers/movies/dramacool.js.map +1 -1
- package/lib/commonjs/providers/movies/himovies/create-himovies.js +1 -12
- package/lib/commonjs/providers/movies/himovies/create-himovies.js.map +1 -1
- package/lib/commonjs/providers/movies/himovies/himovies.js +6 -16
- package/lib/commonjs/providers/movies/himovies/himovies.js.map +1 -1
- package/lib/commonjs/providers/movies/index.js +10 -4
- package/lib/commonjs/providers/movies/index.js.map +1 -1
- package/lib/{module/providers/movies/multimovies.js → commonjs/providers/movies/multimovies/create-multimovies.js} +183 -149
- package/lib/commonjs/providers/movies/multimovies/create-multimovies.js.map +1 -0
- package/lib/commonjs/providers/movies/multimovies/multimovies.js +46 -0
- package/lib/commonjs/providers/movies/multimovies/multimovies.js.map +1 -0
- package/lib/commonjs/providers/movies/multistream/index.js +16 -16
- package/lib/commonjs/providers/movies/multistream/utils.js +252 -26
- package/lib/commonjs/providers/movies/multistream/utils.js.map +1 -1
- package/lib/commonjs/providers/movies/netflixmirror.js +14 -14
- package/lib/commonjs/providers/movies/yflix/create-yflix.js +418 -0
- package/lib/commonjs/providers/movies/yflix/create-yflix.js.map +1 -0
- package/lib/commonjs/providers/movies/yflix/yflix.js +59 -0
- package/lib/commonjs/providers/movies/yflix/yflix.js.map +1 -0
- package/lib/commonjs/providers/movies/yflix.js +561 -0
- package/lib/commonjs/providers/movies/yflix.js.map +1 -0
- package/lib/commonjs/utils/create-extractor-context.js +2 -0
- package/lib/commonjs/utils/create-extractor-context.js.map +1 -1
- package/lib/commonjs/utils/create-provider-context.js +2 -0
- package/lib/commonjs/utils/create-provider-context.js.map +1 -1
- package/lib/commonjs/utils/extension-utils.js +5 -3
- package/lib/commonjs/utils/extension-utils.js.map +1 -1
- package/lib/commonjs/utils/provider-maps.js +7 -1
- package/lib/commonjs/utils/provider-maps.js.map +1 -1
- package/lib/module/NativeConsumet.ts +22 -0
- package/lib/module/extension-registry.json +75 -2
- package/lib/module/extractors/index.js +3 -3
- package/lib/module/extractors/index.js.map +1 -1
- package/lib/module/extractors/megacloud.js +11 -5
- package/lib/module/extractors/megacloud.js.map +1 -1
- package/lib/module/extractors/megaup.js +95 -83
- package/lib/module/extractors/megaup.js.map +1 -1
- package/lib/module/extractors/{StreamP2P.js → streamp2p.js} +1 -1
- package/lib/module/extractors/{StreamP2P.js.map → streamp2p.js.map} +1 -1
- package/lib/module/extractors/streamwish.js +28 -21
- package/lib/module/extractors/streamwish.js.map +1 -1
- package/lib/module/extractors/vidhide.js +33 -17
- package/lib/module/extractors/vidhide.js.map +1 -1
- package/lib/module/index.js +3 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/providers/anime/animekai/animekai.js +106 -0
- package/lib/module/providers/anime/animekai/animekai.js.map +1 -0
- package/lib/module/providers/anime/animekai/create-animekai.js +495 -0
- package/lib/module/providers/anime/animekai/create-animekai.js.map +1 -0
- package/lib/module/providers/anime/animepahe/animepahe.js +6 -13
- package/lib/module/providers/anime/animepahe/animepahe.js.map +1 -1
- package/lib/module/providers/anime/animepahe/create-animepahe.js +1 -10
- package/lib/module/providers/anime/animepahe/create-animepahe.js.map +1 -1
- package/lib/module/providers/anime/index.js +4 -2
- package/lib/module/providers/anime/index.js.map +1 -1
- package/lib/module/providers/anime/zoro/create-zoro.js +1 -10
- package/lib/module/providers/anime/zoro/create-zoro.js.map +1 -1
- package/lib/module/providers/anime/zoro/zoro.js +6 -13
- package/lib/module/providers/anime/zoro/zoro.js.map +1 -1
- package/lib/module/providers/meta/anilist.js +1 -1
- package/lib/module/providers/meta/anilist.js.map +1 -1
- package/lib/module/providers/movies/dramacool.js +395 -327
- package/lib/module/providers/movies/dramacool.js.map +1 -1
- package/lib/module/providers/movies/himovies/create-himovies.js +1 -11
- package/lib/module/providers/movies/himovies/create-himovies.js.map +1 -1
- package/lib/module/providers/movies/himovies/himovies.js +6 -16
- package/lib/module/providers/movies/himovies/himovies.js.map +1 -1
- package/lib/module/providers/movies/index.js +10 -4
- package/lib/module/providers/movies/index.js.map +1 -1
- package/lib/{commonjs/providers/movies/multimovies.js → module/providers/movies/multimovies/create-multimovies.js} +187 -161
- package/lib/module/providers/movies/multimovies/create-multimovies.js.map +1 -0
- package/lib/module/providers/movies/multimovies/multimovies.js +43 -0
- package/lib/module/providers/movies/multimovies/multimovies.js.map +1 -0
- package/lib/module/providers/movies/multistream/index.js +16 -16
- package/lib/module/providers/movies/multistream/utils.js +249 -26
- package/lib/module/providers/movies/multistream/utils.js.map +1 -1
- package/lib/module/providers/movies/netflixmirror.js +14 -14
- package/lib/module/providers/movies/yflix/create-yflix.js +414 -0
- package/lib/module/providers/movies/yflix/create-yflix.js.map +1 -0
- package/lib/module/providers/movies/yflix/yflix.js +55 -0
- package/lib/module/providers/movies/yflix/yflix.js.map +1 -0
- package/lib/module/providers/movies/yflix.js +561 -0
- package/lib/module/providers/movies/yflix.js.map +1 -0
- package/lib/module/utils/create-extractor-context.js +3 -1
- package/lib/module/utils/create-extractor-context.js.map +1 -1
- package/lib/module/utils/create-provider-context.js +3 -1
- package/lib/module/utils/create-provider-context.js.map +1 -1
- package/lib/module/utils/extension-utils.js +6 -4
- package/lib/module/utils/extension-utils.js.map +1 -1
- package/lib/module/utils/provider-maps.js +7 -1
- package/lib/module/utils/provider-maps.js.map +1 -1
- package/lib/typescript/commonjs/src/NativeConsumet.d.ts +36 -0
- package/lib/typescript/commonjs/src/NativeConsumet.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/extractors/index.d.ts +3 -3
- package/lib/typescript/commonjs/src/extractors/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/extractors/megacloud.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/extractors/megaup.d.ts +5 -15
- package/lib/typescript/commonjs/src/extractors/megaup.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/extractors/{StreamP2P.d.ts → streamp2p.d.ts} +1 -1
- package/lib/typescript/commonjs/src/extractors/{StreamP2P.d.ts.map → streamp2p.d.ts.map} +1 -1
- package/lib/typescript/commonjs/src/extractors/streamwish.d.ts +7 -11
- package/lib/typescript/commonjs/src/extractors/streamwish.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/extractors/vidhide.d.ts +7 -7
- package/lib/typescript/commonjs/src/extractors/vidhide.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +3 -2
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/models/extractor-context.d.ts +3 -1
- package/lib/typescript/commonjs/src/models/extractor-context.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/models/provider-context.d.ts +9 -7
- package/lib/typescript/commonjs/src/models/provider-context.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/anime/animekai/animekai.d.ts +85 -0
- package/lib/typescript/commonjs/src/providers/anime/animekai/animekai.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/providers/anime/animekai/create-animekai.d.ts +32 -0
- package/lib/typescript/commonjs/src/providers/anime/animekai/create-animekai.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/providers/anime/animepahe/animepahe.d.ts +6 -4
- 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 +8 -4
- 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 +3 -1
- 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 +8 -4
- 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 +6 -4
- package/lib/typescript/commonjs/src/providers/anime/zoro/zoro.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/movies/dramacool.d.ts +0 -21
- package/lib/typescript/commonjs/src/providers/movies/dramacool.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/movies/himovies/create-himovies.d.ts +8 -5
- package/lib/typescript/commonjs/src/providers/movies/himovies/create-himovies.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/movies/himovies/himovies.d.ts +6 -5
- package/lib/typescript/commonjs/src/providers/movies/himovies/himovies.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/movies/index.d.ts +7 -3
- package/lib/typescript/commonjs/src/providers/movies/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/movies/multimovies/create-multimovies.d.ts +20 -0
- package/lib/typescript/commonjs/src/providers/movies/multimovies/create-multimovies.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/providers/movies/multimovies/multimovies.d.ts +21 -0
- package/lib/typescript/commonjs/src/providers/movies/multimovies/multimovies.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/providers/movies/multistream/utils.d.ts +9 -0
- package/lib/typescript/commonjs/src/providers/movies/multistream/utils.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/movies/yflix/create-yflix.d.ts +25 -0
- package/lib/typescript/commonjs/src/providers/movies/yflix/create-yflix.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/providers/movies/yflix/yflix.d.ts +44 -0
- package/lib/typescript/commonjs/src/providers/movies/yflix/yflix.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/providers/movies/yflix.d.ts +1 -0
- package/lib/typescript/commonjs/src/providers/movies/yflix.d.ts.map +1 -0
- 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 +5 -5
- package/lib/typescript/commonjs/src/utils/extension-utils.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/provider-maps.d.ts +2 -0
- package/lib/typescript/commonjs/src/utils/provider-maps.d.ts.map +1 -1
- package/lib/typescript/module/src/NativeConsumet.d.ts +36 -0
- package/lib/typescript/module/src/NativeConsumet.d.ts.map +1 -1
- package/lib/typescript/module/src/extractors/index.d.ts +3 -3
- package/lib/typescript/module/src/extractors/index.d.ts.map +1 -1
- package/lib/typescript/module/src/extractors/megacloud.d.ts.map +1 -1
- package/lib/typescript/module/src/extractors/megaup.d.ts +5 -15
- package/lib/typescript/module/src/extractors/megaup.d.ts.map +1 -1
- package/lib/typescript/module/src/extractors/{StreamP2P.d.ts → streamp2p.d.ts} +1 -1
- package/lib/typescript/module/src/extractors/{StreamP2P.d.ts.map → streamp2p.d.ts.map} +1 -1
- package/lib/typescript/module/src/extractors/streamwish.d.ts +7 -11
- package/lib/typescript/module/src/extractors/streamwish.d.ts.map +1 -1
- package/lib/typescript/module/src/extractors/vidhide.d.ts +7 -7
- package/lib/typescript/module/src/extractors/vidhide.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +3 -2
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/models/extractor-context.d.ts +3 -1
- package/lib/typescript/module/src/models/extractor-context.d.ts.map +1 -1
- package/lib/typescript/module/src/models/provider-context.d.ts +9 -7
- package/lib/typescript/module/src/models/provider-context.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/anime/animekai/animekai.d.ts +85 -0
- package/lib/typescript/module/src/providers/anime/animekai/animekai.d.ts.map +1 -0
- package/lib/typescript/module/src/providers/anime/animekai/create-animekai.d.ts +32 -0
- package/lib/typescript/module/src/providers/anime/animekai/create-animekai.d.ts.map +1 -0
- package/lib/typescript/module/src/providers/anime/animepahe/animepahe.d.ts +6 -4
- 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 +8 -4
- 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 +3 -1
- 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 +8 -4
- 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 +6 -4
- package/lib/typescript/module/src/providers/anime/zoro/zoro.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/movies/dramacool.d.ts +0 -21
- package/lib/typescript/module/src/providers/movies/dramacool.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/movies/himovies/create-himovies.d.ts +8 -5
- package/lib/typescript/module/src/providers/movies/himovies/create-himovies.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/movies/himovies/himovies.d.ts +6 -5
- package/lib/typescript/module/src/providers/movies/himovies/himovies.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/movies/index.d.ts +7 -3
- package/lib/typescript/module/src/providers/movies/index.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/movies/multimovies/create-multimovies.d.ts +20 -0
- package/lib/typescript/module/src/providers/movies/multimovies/create-multimovies.d.ts.map +1 -0
- package/lib/typescript/module/src/providers/movies/multimovies/multimovies.d.ts +21 -0
- package/lib/typescript/module/src/providers/movies/multimovies/multimovies.d.ts.map +1 -0
- package/lib/typescript/module/src/providers/movies/multistream/utils.d.ts +9 -0
- package/lib/typescript/module/src/providers/movies/multistream/utils.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/movies/yflix/create-yflix.d.ts +25 -0
- package/lib/typescript/module/src/providers/movies/yflix/create-yflix.d.ts.map +1 -0
- package/lib/typescript/module/src/providers/movies/yflix/yflix.d.ts +44 -0
- package/lib/typescript/module/src/providers/movies/yflix/yflix.d.ts.map +1 -0
- package/lib/typescript/module/src/providers/movies/yflix.d.ts +1 -0
- package/lib/typescript/module/src/providers/movies/yflix.d.ts.map +1 -0
- 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 +5 -5
- package/lib/typescript/module/src/utils/extension-utils.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/provider-maps.d.ts +2 -0
- package/lib/typescript/module/src/utils/provider-maps.d.ts.map +1 -1
- package/package.json +18 -9
- package/src/NativeConsumet.ts +22 -0
- package/src/extension-registry.json +75 -2
- package/src/extractors/index.ts +3 -3
- package/src/extractors/megacloud.ts +11 -5
- package/src/extractors/megaup.ts +110 -89
- package/src/extractors/streamwish.ts +36 -27
- package/src/extractors/vidhide.ts +42 -23
- package/src/index.tsx +3 -2
- package/src/models/extractor-context.ts +4 -0
- package/src/models/provider-context.ts +10 -12
- package/src/providers/anime/animekai/animekai.ts +121 -0
- package/src/providers/anime/animekai/create-animekai.ts +570 -0
- package/src/providers/anime/animepahe/animepahe.ts +14 -14
- package/src/providers/anime/animepahe/create-animepahe.ts +1 -11
- package/src/providers/anime/index.ts +3 -1
- package/src/providers/anime/zoro/create-zoro.ts +1 -11
- package/src/providers/anime/zoro/zoro.ts +14 -14
- package/src/providers/meta/anilist.ts +1 -1
- package/src/providers/movies/dramacool.ts +395 -394
- package/src/providers/movies/himovies/create-himovies.ts +1 -12
- package/src/providers/movies/himovies/himovies.ts +14 -17
- package/src/providers/movies/index.ts +9 -3
- package/src/providers/movies/{multimovies.ts → multimovies/create-multimovies.ts} +181 -156
- package/src/providers/movies/multimovies/multimovies.ts +57 -0
- package/src/providers/movies/multistream/index.ts +232 -232
- package/src/providers/movies/multistream/utils.ts +213 -16
- package/src/providers/movies/netflixmirror.ts +288 -288
- package/src/providers/movies/yflix/create-yflix.ts +496 -0
- package/src/providers/movies/yflix/yflix.ts +82 -0
- package/src/providers/movies/yflix.ts +559 -0
- package/src/utils/create-extractor-context.ts +4 -0
- package/src/utils/create-provider-context.ts +4 -0
- package/src/utils/extension-utils.ts +7 -3
- package/src/utils/provider-maps.ts +7 -1
- package/lib/commonjs/providers/anime/animekai.js +0 -587
- package/lib/commonjs/providers/anime/animekai.js.map +0 -1
- package/lib/commonjs/providers/movies/multimovies.js.map +0 -1
- package/lib/module/providers/anime/animekai.js +0 -583
- package/lib/module/providers/anime/animekai.js.map +0 -1
- package/lib/module/providers/movies/multimovies.js.map +0 -1
- package/lib/typescript/commonjs/src/providers/anime/animekai.d.ts +0 -89
- package/lib/typescript/commonjs/src/providers/anime/animekai.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/providers/movies/multimovies.d.ts +0 -40
- package/lib/typescript/commonjs/src/providers/movies/multimovies.d.ts.map +0 -1
- package/lib/typescript/module/src/providers/anime/animekai.d.ts +0 -89
- package/lib/typescript/module/src/providers/anime/animekai.d.ts.map +0 -1
- package/lib/typescript/module/src/providers/movies/multimovies.d.ts +0 -40
- package/lib/typescript/module/src/providers/movies/multimovies.d.ts.map +0 -1
- package/src/providers/anime/animekai.ts +0 -627
- /package/src/extractors/{StreamP2P.ts → streamp2p.ts} +0 -0
package/src/extractors/megaup.ts
CHANGED
|
@@ -1,108 +1,129 @@
|
|
|
1
1
|
import axios from 'axios';
|
|
2
|
-
//extractor for https://animekai.to
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import { type ExtractorContext, type ISource, type IVideo, type IVideoExtractor } from '../models';
|
|
4
|
+
import type { PolyURL } from '../utils/url-polyfill';
|
|
6
5
|
|
|
7
|
-
|
|
6
|
+
/**
|
|
7
|
+
* MegaUp extractor factory that relies on the shared extractor context
|
|
8
|
+
*/
|
|
9
|
+
export function MegaUp(ctx: ExtractorContext): IVideoExtractor {
|
|
10
|
+
const serverName = 'MegaUp';
|
|
11
|
+
const sources: IVideo[] = [];
|
|
12
|
+
const apiBase = 'https://enc-dec.app/api';
|
|
13
|
+
const client = ctx.axios ?? axios;
|
|
14
|
+
const userAgent =
|
|
15
|
+
ctx.USER_AGENT ||
|
|
16
|
+
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36';
|
|
8
17
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
this.homeKeys.push(atob(keys.kai[i]));
|
|
29
|
-
}
|
|
30
|
-
for (var i = 0; i < keys.mega.length; i++) {
|
|
31
|
-
this.megaKeys.push(atob(keys.mega[i]));
|
|
18
|
+
const decodeSources = async (
|
|
19
|
+
payload: string
|
|
20
|
+
): Promise<{
|
|
21
|
+
sources: { file: string }[];
|
|
22
|
+
tracks: { kind: string; file: string; label?: string }[];
|
|
23
|
+
download: string;
|
|
24
|
+
}> => {
|
|
25
|
+
try {
|
|
26
|
+
const { data } = await client.post(
|
|
27
|
+
`${apiBase}/dec-mega`,
|
|
28
|
+
{
|
|
29
|
+
text: payload,
|
|
30
|
+
agent: userAgent,
|
|
31
|
+
},
|
|
32
|
+
{ headers: { 'Content-Type': 'application/json' } }
|
|
33
|
+
);
|
|
34
|
+
return data.result;
|
|
35
|
+
} catch (error) {
|
|
36
|
+
throw new Error((error as Error).message);
|
|
32
37
|
}
|
|
33
|
-
}
|
|
38
|
+
};
|
|
34
39
|
|
|
35
|
-
|
|
40
|
+
const extract = async (videoUrl: PolyURL): Promise<ISource> => {
|
|
41
|
+
try {
|
|
42
|
+
const mediaUrl = videoUrl.href.replace('/e/', '/media/');
|
|
43
|
+
const subsUrl = videoUrl.searchParams.get('sub.list');
|
|
44
|
+
let externalSubs: { kind: string; url: string; lang: string }[] = [];
|
|
45
|
+
if (subsUrl) {
|
|
46
|
+
externalSubs = await axios.get(subsUrl).then((res) =>
|
|
47
|
+
res.data.map((sub: { kind: string; file: string; label: string }) => ({
|
|
48
|
+
kind: sub.kind,
|
|
49
|
+
url: sub.file,
|
|
50
|
+
lang: sub.label,
|
|
51
|
+
}))
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
const { data } = await client.get(mediaUrl, {
|
|
55
|
+
headers: {
|
|
56
|
+
'Connection': 'keep-alive',
|
|
57
|
+
'User-Agent': userAgent,
|
|
58
|
+
},
|
|
59
|
+
});
|
|
36
60
|
|
|
37
|
-
|
|
38
|
-
n = encodeURIComponent(n);
|
|
39
|
-
const l = n.length;
|
|
40
|
-
let o = [];
|
|
41
|
-
for (var i = 0; i < l; i++) {
|
|
42
|
-
const kc = this.homeKeys[this.keysChar.indexOf(n.charAt(i))];
|
|
43
|
-
const c = kc?.charAt(i % kc.length!);
|
|
44
|
-
o.push(c);
|
|
45
|
-
}
|
|
46
|
-
return btoa(o.join('')).replace(/\//g, '_').replace(/\+/g, '-').replace(/\=/g, '');
|
|
47
|
-
};
|
|
61
|
+
const decrypted = await decodeSources(data.result);
|
|
48
62
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
63
|
+
const defaultSource: IVideo = {
|
|
64
|
+
url: decrypted.sources[0]?.file!,
|
|
65
|
+
isM3U8: decrypted.sources[0]?.file.includes('.m3u8'),
|
|
66
|
+
quality: 'auto',
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
//split sources into multiple qualities if available
|
|
70
|
+
const { data: sourceRes } = await client.get(decrypted.sources[0]?.file!, {
|
|
71
|
+
headers: {
|
|
72
|
+
'Connection': 'keep-alive',
|
|
73
|
+
'User-Agent': userAgent,
|
|
74
|
+
},
|
|
75
|
+
});
|
|
60
76
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
77
|
+
if (sourceRes.includes('#EXT-X-STREAM-INF')) {
|
|
78
|
+
const lines = sourceRes.split('\n');
|
|
79
|
+
const qualitySources: ISource['sources'] = [];
|
|
80
|
+
for (let i = 0; i < lines.length; i++) {
|
|
81
|
+
if (lines[i].startsWith('#EXT-X-STREAM-INF')) {
|
|
82
|
+
const resolutionMatch = lines[i].match(/RESOLUTION=\d+x(\d+)/);
|
|
83
|
+
const quality = resolutionMatch ? `${resolutionMatch[1]}p` : `quality${qualitySources.length + 1}`;
|
|
84
|
+
const url = decrypted.sources[0]?.file!.split('/list')[0] + '/' + lines[i + 1];
|
|
85
|
+
qualitySources.push({
|
|
86
|
+
url,
|
|
87
|
+
isM3U8: true,
|
|
88
|
+
quality,
|
|
89
|
+
});
|
|
90
|
+
}
|
|
73
91
|
}
|
|
92
|
+
return {
|
|
93
|
+
sources: [qualitySources, defaultSource].flat(),
|
|
94
|
+
subtitles: [
|
|
95
|
+
...decrypted.tracks.map((track) => ({
|
|
96
|
+
kind: track.kind,
|
|
97
|
+
url: track.file,
|
|
98
|
+
lang: track.label || 'English',
|
|
99
|
+
})),
|
|
100
|
+
...(externalSubs.length > 0 ? externalSubs : []),
|
|
101
|
+
],
|
|
102
|
+
download: decrypted.download,
|
|
103
|
+
};
|
|
74
104
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
try {
|
|
86
|
-
await this.kaiKeysReady;
|
|
87
|
-
|
|
88
|
-
const url = videoUrl.href.replace(/\/(e|e2)\//, '/media/');
|
|
89
|
-
const res = await axios.get(url);
|
|
90
|
-
const decrypted = JSON.parse(this.DecodeIframeData(res.data.result).replace(/\\/g, ''));
|
|
91
|
-
const data: ISource = {
|
|
92
|
-
sources: decrypted.sources.map((s: { file: string }) => ({
|
|
93
|
-
url: s.file,
|
|
94
|
-
isM3U8: s.file.includes('.m3u8') || s.file.endsWith('m3u8'),
|
|
95
|
-
})),
|
|
96
|
-
subtitles: decrypted.tracks.map((t: { kind: any; file: any }) => ({
|
|
97
|
-
kind: t.kind,
|
|
98
|
-
url: t.file,
|
|
99
|
-
})),
|
|
105
|
+
return {
|
|
106
|
+
sources: [defaultSource],
|
|
107
|
+
subtitles: [
|
|
108
|
+
...decrypted.tracks.map((track) => ({
|
|
109
|
+
kind: track.kind,
|
|
110
|
+
url: track.file,
|
|
111
|
+
lang: track.label || track.kind,
|
|
112
|
+
})),
|
|
113
|
+
...(externalSubs.length > 0 ? externalSubs : []),
|
|
114
|
+
],
|
|
100
115
|
download: decrypted.download,
|
|
101
116
|
};
|
|
102
|
-
return data;
|
|
103
117
|
} catch (error) {
|
|
104
118
|
throw new Error((error as Error).message);
|
|
105
119
|
}
|
|
106
120
|
};
|
|
121
|
+
|
|
122
|
+
return {
|
|
123
|
+
serverName,
|
|
124
|
+
sources,
|
|
125
|
+
extract,
|
|
126
|
+
};
|
|
107
127
|
}
|
|
128
|
+
|
|
108
129
|
export default MegaUp;
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { USER_AGENT } from '../utils/constants';
|
|
1
|
+
import { type ExtractorContext, type IVideo, type ISource, type IVideoExtractor, type ISubtitle } from '../models';
|
|
2
|
+
import type { PolyURL } from '../utils/url-polyfill';
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
/**
|
|
5
|
+
* StreamWish extractor function
|
|
6
|
+
* @param ctx ExtractorContext containing axios, load, USER_AGENT
|
|
7
|
+
* @returns Object with extract method implementing IVideoExtractor interface
|
|
8
|
+
*/
|
|
9
|
+
export function StreamWish(ctx: ExtractorContext): IVideoExtractor {
|
|
10
|
+
const serverName = 'StreamWish';
|
|
11
|
+
const sources: IVideo[] = [];
|
|
12
|
+
const { axios, USER_AGENT, PolyURL } = ctx;
|
|
8
13
|
|
|
9
|
-
|
|
10
|
-
videoUrl: URL,
|
|
11
|
-
referer?: string
|
|
12
|
-
): Promise<{ sources: IVideo[] } & { subtitles: ISubtitle[] }> => {
|
|
14
|
+
const extract = async (videoUrl: PolyURL, referer?: string): Promise<ISource> => {
|
|
13
15
|
try {
|
|
14
16
|
const options = {
|
|
15
17
|
headers: {
|
|
@@ -53,15 +55,10 @@ class StreamWish extends VideoExtractor {
|
|
|
53
55
|
p = p.replace(regex, k[c]!);
|
|
54
56
|
}
|
|
55
57
|
}
|
|
56
|
-
|
|
57
|
-
// console.log('Decoded String:', p);
|
|
58
|
-
} else {
|
|
59
|
-
//console.log('No match found');
|
|
60
58
|
}
|
|
59
|
+
|
|
61
60
|
let link = p.match(/https?:\/\/[^"]+?\.m3u8[^"]*/)![0];
|
|
62
|
-
// console.log('Decoded Links:', link);
|
|
63
61
|
const subtitleMatches = p?.match(/{file:"([^"]+)",(label:"([^"]+)",)?kind:"(thumbnails|captions)"/g) ?? [];
|
|
64
|
-
// console.log(subtitleMatches, 'subtitleMatches');
|
|
65
62
|
const subtitles: ISubtitle[] = subtitleMatches.map((sub) => {
|
|
66
63
|
const lang = sub?.match(/label:"([^"]+)"/)?.[1] ?? '';
|
|
67
64
|
const url = sub?.match(/file:"([^"]+)"/)?.[1] ?? '';
|
|
@@ -77,19 +74,24 @@ class StreamWish extends VideoExtractor {
|
|
|
77
74
|
url: url,
|
|
78
75
|
};
|
|
79
76
|
});
|
|
77
|
+
|
|
80
78
|
if (link.includes('hls2"')) {
|
|
81
79
|
link = link.replace('hls2"', '').replace(new RegExp('"', 'g'), '');
|
|
82
80
|
}
|
|
83
|
-
|
|
81
|
+
|
|
82
|
+
const linkParser = new PolyURL(link);
|
|
84
83
|
linkParser.searchParams.set('i', '0.4');
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
84
|
+
|
|
85
|
+
const videoSources: IVideo[] = [
|
|
86
|
+
{
|
|
87
|
+
quality: 'default',
|
|
88
|
+
url: linkParser.href,
|
|
89
|
+
isM3U8: link.includes('.m3u8'),
|
|
90
|
+
},
|
|
91
|
+
];
|
|
90
92
|
|
|
91
93
|
try {
|
|
92
|
-
const m3u8Content = await axios.get(
|
|
94
|
+
const m3u8Content = await axios.get(videoSources[0]!.url, options);
|
|
93
95
|
|
|
94
96
|
if (m3u8Content.data.includes('EXTM3U')) {
|
|
95
97
|
const videoList = m3u8Content.data.split('#EXT-X-STREAM-INF:');
|
|
@@ -99,22 +101,29 @@ class StreamWish extends VideoExtractor {
|
|
|
99
101
|
const url = link.split('master.m3u8')[0] + video.split('\n')[1];
|
|
100
102
|
const quality = video.split('RESOLUTION=')[1].split(',')[0].split('x')[1];
|
|
101
103
|
|
|
102
|
-
|
|
104
|
+
videoSources.push({
|
|
103
105
|
url: url,
|
|
104
106
|
quality: `${quality}p`,
|
|
105
107
|
isM3U8: url.includes('.m3u8'),
|
|
106
108
|
});
|
|
107
109
|
}
|
|
108
110
|
}
|
|
109
|
-
} catch (e) {
|
|
111
|
+
} catch (e) {
|
|
112
|
+
// M3U8 parsing failed, continue with default source
|
|
113
|
+
}
|
|
110
114
|
|
|
111
115
|
return {
|
|
112
|
-
sources:
|
|
116
|
+
sources: videoSources,
|
|
113
117
|
subtitles: subtitles,
|
|
114
118
|
};
|
|
115
119
|
} catch (err) {
|
|
116
120
|
throw new Error((err as Error).message);
|
|
117
121
|
}
|
|
118
122
|
};
|
|
123
|
+
|
|
124
|
+
return {
|
|
125
|
+
serverName,
|
|
126
|
+
sources,
|
|
127
|
+
extract,
|
|
128
|
+
};
|
|
119
129
|
}
|
|
120
|
-
export default StreamWish;
|
|
@@ -1,20 +1,28 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { type ExtractorContext, type IVideo, type ISource, type IVideoExtractor } from '../models';
|
|
2
|
+
import type { PolyURL } from '../utils/url-polyfill';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
/**
|
|
5
|
+
* VidHide extractor function
|
|
6
|
+
* @param ctx ExtractorContext containing axios, load, USER_AGENT
|
|
7
|
+
* @returns Object with extract method implementing IVideoExtractor interface
|
|
8
|
+
*/
|
|
9
|
+
export function VidHide(ctx: ExtractorContext): IVideoExtractor {
|
|
10
|
+
const serverName = 'VidHide';
|
|
11
|
+
const sources: IVideo[] = [];
|
|
12
|
+
const { axios, USER_AGENT } = ctx;
|
|
7
13
|
|
|
8
|
-
|
|
14
|
+
const extract = async (videoUrl: PolyURL): Promise<ISource> => {
|
|
9
15
|
try {
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
const { data } = await axios
|
|
17
|
+
.get(videoUrl.href, {
|
|
18
|
+
headers: {
|
|
19
|
+
'User-Agent': USER_AGENT,
|
|
20
|
+
'Referer': videoUrl.origin,
|
|
21
|
+
},
|
|
22
|
+
})
|
|
23
|
+
.catch(() => {
|
|
24
|
+
throw new Error('Video not found');
|
|
25
|
+
});
|
|
18
26
|
|
|
19
27
|
const unpackedData = eval(
|
|
20
28
|
/(eval)(\(f.*?)(\n<\/script>)/m.exec(data.replace(/\n/g, ' '))![2]!.replace('eval', '')
|
|
@@ -23,15 +31,18 @@ class VidHide extends VideoExtractor {
|
|
|
23
31
|
const m3u8Link = links[0];
|
|
24
32
|
const m3u8Content = await axios.get(m3u8Link, {
|
|
25
33
|
headers: {
|
|
26
|
-
Referer: m3u8Link,
|
|
34
|
+
'Referer': m3u8Link,
|
|
35
|
+
'User-Agent': USER_AGENT,
|
|
27
36
|
},
|
|
28
37
|
});
|
|
29
38
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
39
|
+
const videoSources: IVideo[] = [
|
|
40
|
+
{
|
|
41
|
+
quality: 'auto',
|
|
42
|
+
url: m3u8Link,
|
|
43
|
+
isM3U8: m3u8Link.includes('.m3u8'),
|
|
44
|
+
},
|
|
45
|
+
];
|
|
35
46
|
|
|
36
47
|
if (m3u8Content.data.includes('EXTM3U')) {
|
|
37
48
|
const pathWithoutMaster = m3u8Link.split('/master.m3u8')[0];
|
|
@@ -42,7 +53,7 @@ class VidHide extends VideoExtractor {
|
|
|
42
53
|
const url = video.split('\n')[1];
|
|
43
54
|
const quality = video.split('RESOLUTION=')[1]?.split(',')[0].split('x')[1];
|
|
44
55
|
|
|
45
|
-
|
|
56
|
+
videoSources.push({
|
|
46
57
|
url: `${pathWithoutMaster}/${url}`,
|
|
47
58
|
quality: `${quality}p`,
|
|
48
59
|
isM3U8: url.includes('.m3u8'),
|
|
@@ -50,10 +61,18 @@ class VidHide extends VideoExtractor {
|
|
|
50
61
|
}
|
|
51
62
|
}
|
|
52
63
|
|
|
53
|
-
return
|
|
64
|
+
return {
|
|
65
|
+
sources: videoSources,
|
|
66
|
+
subtitles: [],
|
|
67
|
+
};
|
|
54
68
|
} catch (err) {
|
|
55
69
|
throw new Error((err as Error).message);
|
|
56
70
|
}
|
|
57
71
|
};
|
|
72
|
+
|
|
73
|
+
return {
|
|
74
|
+
serverName,
|
|
75
|
+
sources,
|
|
76
|
+
extract,
|
|
77
|
+
};
|
|
58
78
|
}
|
|
59
|
-
export default VidHide;
|
package/src/index.tsx
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import 'react-native-get-random-values';
|
|
1
2
|
import { URL as PolyURL, URLSearchParams as PolyURLSearchParams } from './utils/url-polyfill';
|
|
2
3
|
|
|
3
4
|
// Polyfill global scope if they don't exist
|
|
@@ -17,7 +18,7 @@ import { ANIME, LIGHT_NOVELS, MANGA, MOVIES, META } from './providers';
|
|
|
17
18
|
// Provider metadata (catalog of built-in providers)
|
|
18
19
|
import type { AnimeProvider, MovieProvider, animeProviders, movieProviders } from './utils';
|
|
19
20
|
|
|
20
|
-
import
|
|
21
|
+
import extensionRegistry from './extension-registry.json';
|
|
21
22
|
// Utils (contexts, and provider management)
|
|
22
23
|
import {
|
|
23
24
|
createProviderContext,
|
|
@@ -161,7 +162,7 @@ export type {
|
|
|
161
162
|
ExtensionManifest,
|
|
162
163
|
ExtractorInfo,
|
|
163
164
|
};
|
|
164
|
-
export { ExtensionRegistry };
|
|
165
|
+
export { extensionRegistry as ExtensionRegistry };
|
|
165
166
|
// Utils: context creation and provider management
|
|
166
167
|
export {
|
|
167
168
|
createProviderContext,
|
|
@@ -5,6 +5,8 @@ import type {
|
|
|
5
5
|
bypassDdosGuard,
|
|
6
6
|
getDdosGuardCookiesWithWebView,
|
|
7
7
|
makeGetRequestWithWebView,
|
|
8
|
+
makePostRequestWithWebView,
|
|
9
|
+
makePostRequest,
|
|
8
10
|
multiply,
|
|
9
11
|
deobfuscateScript,
|
|
10
12
|
} from '../NativeConsumet';
|
|
@@ -22,6 +24,8 @@ export interface ExtractorContext {
|
|
|
22
24
|
NativeConsumet: {
|
|
23
25
|
getDdosGuardCookiesWithWebView: typeof getDdosGuardCookiesWithWebView;
|
|
24
26
|
makeGetRequestWithWebView: typeof makeGetRequestWithWebView;
|
|
27
|
+
makePostRequestWithWebView: typeof makePostRequestWithWebView;
|
|
28
|
+
makePostRequest: typeof makePostRequest;
|
|
25
29
|
multiply: typeof multiply;
|
|
26
30
|
bypassDdosGuard: typeof bypassDdosGuard;
|
|
27
31
|
deobfuscateScript: typeof deobfuscateScript;
|
|
@@ -11,6 +11,8 @@ import type {
|
|
|
11
11
|
bypassDdosGuard,
|
|
12
12
|
getDdosGuardCookiesWithWebView,
|
|
13
13
|
makeGetRequestWithWebView,
|
|
14
|
+
makePostRequestWithWebView,
|
|
15
|
+
makePostRequest,
|
|
14
16
|
multiply,
|
|
15
17
|
deobfuscateScript,
|
|
16
18
|
} from '../NativeConsumet';
|
|
@@ -90,11 +92,8 @@ export interface ExtractorRegistry {
|
|
|
90
92
|
) => {
|
|
91
93
|
extract: (url: URL) => Promise<any>;
|
|
92
94
|
};
|
|
93
|
-
StreamWish:
|
|
94
|
-
|
|
95
|
-
adapter?: any
|
|
96
|
-
) => {
|
|
97
|
-
extract: (url: URL) => Promise<any>;
|
|
95
|
+
StreamWish: (ctx?: ExtractorContext) => {
|
|
96
|
+
extract: (url: PolyURL, referer?: string) => Promise<any>;
|
|
98
97
|
};
|
|
99
98
|
VidMoly: new (
|
|
100
99
|
proxyConfig?: any,
|
|
@@ -108,11 +107,8 @@ export interface ExtractorRegistry {
|
|
|
108
107
|
) => {
|
|
109
108
|
extract: (url: URL) => Promise<any>;
|
|
110
109
|
};
|
|
111
|
-
VidHide:
|
|
112
|
-
|
|
113
|
-
adapter?: any
|
|
114
|
-
) => {
|
|
115
|
-
extract: (url: URL) => Promise<any>;
|
|
110
|
+
VidHide: (ctx?: ExtractorContext) => {
|
|
111
|
+
extract: (url: PolyURL, referer?: string) => Promise<any>;
|
|
116
112
|
};
|
|
117
113
|
Voe: new (
|
|
118
114
|
proxyConfig?: any,
|
|
@@ -120,8 +116,8 @@ export interface ExtractorRegistry {
|
|
|
120
116
|
) => {
|
|
121
117
|
extract: (url: URL) => Promise<any>;
|
|
122
118
|
};
|
|
123
|
-
MegaUp:
|
|
124
|
-
extract: (url:
|
|
119
|
+
MegaUp: (ctx?: ExtractorContext) => {
|
|
120
|
+
extract: (url: PolyURL) => Promise<any>;
|
|
125
121
|
};
|
|
126
122
|
}
|
|
127
123
|
|
|
@@ -165,6 +161,8 @@ export interface ProviderContext {
|
|
|
165
161
|
NativeConsumet: {
|
|
166
162
|
getDdosGuardCookiesWithWebView: typeof getDdosGuardCookiesWithWebView;
|
|
167
163
|
makeGetRequestWithWebView: typeof makeGetRequestWithWebView;
|
|
164
|
+
makePostRequestWithWebView: typeof makePostRequestWithWebView;
|
|
165
|
+
makePostRequest: typeof makePostRequest;
|
|
168
166
|
multiply: typeof multiply;
|
|
169
167
|
bypassDdosGuard: typeof bypassDdosGuard;
|
|
170
168
|
deobfuscateScript: typeof deobfuscateScript;
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { AnimeParser } from '../../../models';
|
|
2
|
+
import { createProviderContext } from '../../../utils/create-provider-context';
|
|
3
|
+
import createAnimeKai, { type AnimeKaiProviderInstance } from './create-animekai';
|
|
4
|
+
|
|
5
|
+
export class AnimeKai extends AnimeParser {
|
|
6
|
+
private instance: AnimeKaiProviderInstance;
|
|
7
|
+
override logo: string;
|
|
8
|
+
override name: string;
|
|
9
|
+
override baseUrl: string;
|
|
10
|
+
override classPath: string;
|
|
11
|
+
override isNSFW: boolean;
|
|
12
|
+
override isWorking: boolean;
|
|
13
|
+
override isDubAvailableSeparately: boolean;
|
|
14
|
+
|
|
15
|
+
constructor(customBaseURL?: string) {
|
|
16
|
+
super();
|
|
17
|
+
|
|
18
|
+
const defaultContext = createProviderContext();
|
|
19
|
+
this.instance = createAnimeKai(defaultContext, customBaseURL);
|
|
20
|
+
|
|
21
|
+
this.logo = this.instance.logo;
|
|
22
|
+
this.name = this.instance.name;
|
|
23
|
+
this.baseUrl = this.instance.baseUrl;
|
|
24
|
+
this.classPath = this.instance.classPath;
|
|
25
|
+
this.isNSFW = this.instance.isNSFW ?? false;
|
|
26
|
+
this.isWorking = this.instance.isWorking ?? true;
|
|
27
|
+
this.isDubAvailableSeparately = this.instance.isDubAvailableSeparately ?? false;
|
|
28
|
+
|
|
29
|
+
this.search = this.instance.search;
|
|
30
|
+
this.fetchLatestCompleted = this.instance.fetchLatestCompleted;
|
|
31
|
+
this.fetchRecentlyAdded = this.instance.fetchRecentlyAdded;
|
|
32
|
+
this.fetchRecentlyUpdated = this.instance.fetchRecentlyUpdated;
|
|
33
|
+
this.fetchNewReleases = this.instance.fetchNewReleases;
|
|
34
|
+
this.fetchMovie = this.instance.fetchMovie;
|
|
35
|
+
this.fetchTV = this.instance.fetchTV;
|
|
36
|
+
this.fetchOVA = this.instance.fetchOVA;
|
|
37
|
+
this.fetchONA = this.instance.fetchONA;
|
|
38
|
+
this.fetchSpecial = this.instance.fetchSpecial;
|
|
39
|
+
this.fetchGenres = this.instance.fetchGenres;
|
|
40
|
+
this.genreSearch = this.instance.genreSearch;
|
|
41
|
+
this.fetchSchedule = this.instance.fetchSchedule;
|
|
42
|
+
this.fetchSpotlight = this.instance.fetchSpotlight;
|
|
43
|
+
this.fetchSearchSuggestions = this.instance.fetchSearchSuggestions;
|
|
44
|
+
this.fetchAnimeInfo = this.instance.fetchAnimeInfo;
|
|
45
|
+
this.fetchEpisodeSources = this.instance.fetchEpisodeSources;
|
|
46
|
+
this.fetchEpisodeServers = this.instance.fetchEpisodeServers;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @param query Search query
|
|
51
|
+
* @param page Page number (optional)
|
|
52
|
+
*/
|
|
53
|
+
search!: AnimeKaiProviderInstance['search'];
|
|
54
|
+
/**
|
|
55
|
+
* @param page number
|
|
56
|
+
*/
|
|
57
|
+
fetchLatestCompleted!: AnimeKaiProviderInstance['fetchLatestCompleted'];
|
|
58
|
+
/**
|
|
59
|
+
* @param page number
|
|
60
|
+
*/
|
|
61
|
+
fetchRecentlyAdded!: AnimeKaiProviderInstance['fetchRecentlyAdded'];
|
|
62
|
+
/**
|
|
63
|
+
* @param page number
|
|
64
|
+
*/
|
|
65
|
+
fetchRecentlyUpdated!: AnimeKaiProviderInstance['fetchRecentlyUpdated'];
|
|
66
|
+
/**
|
|
67
|
+
* @param page number
|
|
68
|
+
*/
|
|
69
|
+
fetchNewReleases!: AnimeKaiProviderInstance['fetchNewReleases'];
|
|
70
|
+
/**
|
|
71
|
+
* @param page number
|
|
72
|
+
*/
|
|
73
|
+
fetchMovie!: AnimeKaiProviderInstance['fetchMovie'];
|
|
74
|
+
/**
|
|
75
|
+
* @param page number
|
|
76
|
+
*/
|
|
77
|
+
fetchTV!: AnimeKaiProviderInstance['fetchTV'];
|
|
78
|
+
/**
|
|
79
|
+
* @param page number
|
|
80
|
+
*/
|
|
81
|
+
fetchOVA!: AnimeKaiProviderInstance['fetchOVA'];
|
|
82
|
+
/**
|
|
83
|
+
* @param page number
|
|
84
|
+
*/
|
|
85
|
+
fetchONA!: AnimeKaiProviderInstance['fetchONA'];
|
|
86
|
+
/**
|
|
87
|
+
* @param page number
|
|
88
|
+
*/
|
|
89
|
+
fetchSpecial!: AnimeKaiProviderInstance['fetchSpecial'];
|
|
90
|
+
fetchGenres!: AnimeKaiProviderInstance['fetchGenres'];
|
|
91
|
+
/**
|
|
92
|
+
* @param page number
|
|
93
|
+
*/
|
|
94
|
+
genreSearch!: AnimeKaiProviderInstance['genreSearch'];
|
|
95
|
+
/**
|
|
96
|
+
* Fetches the schedule for a given date.
|
|
97
|
+
* @param date The date in format 'YYYY-MM-DD'. Defaults to the current date.
|
|
98
|
+
* @returns A promise that resolves to an object containing the search results.
|
|
99
|
+
*/
|
|
100
|
+
fetchSchedule!: AnimeKaiProviderInstance['fetchSchedule'];
|
|
101
|
+
fetchSpotlight!: AnimeKaiProviderInstance['fetchSpotlight'];
|
|
102
|
+
fetchSearchSuggestions!: AnimeKaiProviderInstance['fetchSearchSuggestions'];
|
|
103
|
+
/**
|
|
104
|
+
* @param id Anime id
|
|
105
|
+
*/
|
|
106
|
+
fetchAnimeInfo!: AnimeKaiProviderInstance['fetchAnimeInfo'];
|
|
107
|
+
/**
|
|
108
|
+
*
|
|
109
|
+
* @param episodeId Episode id
|
|
110
|
+
* @param server server type (default `MegaUp`) (optional)
|
|
111
|
+
* @param subOrDub sub or dub (default `SubOrDub.SUB`) (optional)
|
|
112
|
+
*/
|
|
113
|
+
fetchEpisodeSources!: AnimeKaiProviderInstance['fetchEpisodeSources'];
|
|
114
|
+
/**
|
|
115
|
+
* @param episodeId Episode id
|
|
116
|
+
* @param subOrDub sub or dub (default `sub`) (optional)
|
|
117
|
+
*/
|
|
118
|
+
fetchEpisodeServers!: AnimeKaiProviderInstance['fetchEpisodeServers'];
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export default AnimeKai;
|