react-native-consumet 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Consumet.podspec +26 -26
- package/LICENSE +673 -673
- package/README.md +102 -102
- package/android/build.gradle +106 -106
- package/android/gradle.properties +5 -5
- package/android/src/main/AndroidManifest.xml +4 -4
- package/android/src/main/AndroidManifestNew.xml +3 -3
- package/android/src/main/java/com/consumet/ConsumetModule.kt +63 -63
- package/android/src/main/java/com/consumet/ConsumetPackage.kt +33 -33
- package/android/src/main/java/com/consumet/DdosGuardModule.kt +213 -213
- package/android/src/main/java/com/consumet/DeobfuscatorModule.kt +89 -89
- package/android/src/main/java/com/consumet/HttpRequestModule.kt +417 -417
- package/ios/Consumet.h +6 -6
- package/ios/Consumet.mm +18 -18
- package/lib/commonjs/extension-registry.json +60 -64
- package/lib/commonjs/extractors/{streamp2p.js → StreamP2P.js} +1 -1
- package/lib/commonjs/extractors/StreamP2P.js.map +1 -0
- package/lib/commonjs/extractors/asianload.js.map +1 -1
- package/lib/commonjs/extractors/filemoon.js.map +1 -1
- package/lib/commonjs/extractors/gdflix.js +167 -0
- package/lib/commonjs/extractors/gdflix.js.map +1 -0
- package/lib/commonjs/extractors/gofile.js +152 -0
- package/lib/commonjs/extractors/gofile.js.map +1 -0
- package/lib/commonjs/extractors/gogocdn.js.map +1 -1
- package/lib/commonjs/extractors/hubcloud.js +320 -0
- package/lib/commonjs/extractors/hubcloud.js.map +1 -0
- package/lib/commonjs/extractors/index.js +28 -0
- package/lib/commonjs/extractors/index.js.map +1 -1
- package/lib/commonjs/extractors/kisskh/kkey.js.map +1 -1
- package/lib/commonjs/extractors/kisskh/staticdata.js.map +1 -1
- package/lib/commonjs/extractors/kwik.js +1 -1
- package/lib/commonjs/extractors/kwik.js.map +1 -1
- package/lib/commonjs/extractors/megacloud.js.map +1 -1
- package/lib/commonjs/extractors/megaplay.js +169 -0
- package/lib/commonjs/extractors/megaplay.js.map +1 -0
- package/lib/commonjs/extractors/megaup.js.map +1 -1
- package/lib/commonjs/extractors/mixdrop.js.map +1 -1
- package/lib/commonjs/extractors/mp4player.js.map +1 -1
- package/lib/commonjs/extractors/mp4upload.js.map +1 -1
- package/lib/commonjs/extractors/rapidcloud.js.map +1 -1
- package/lib/commonjs/extractors/streamhub.js.map +1 -1
- package/lib/commonjs/extractors/streamlare.js.map +1 -1
- package/lib/commonjs/extractors/streamsb.js.map +1 -1
- package/lib/commonjs/extractors/streamtape.js.map +1 -1
- package/lib/commonjs/extractors/streamwish.js.map +1 -1
- package/lib/commonjs/extractors/vidhide.js.map +1 -1
- package/lib/commonjs/extractors/vidmoly.js.map +1 -1
- package/lib/commonjs/extractors/vizcloud.js.map +1 -1
- package/lib/commonjs/extractors/voe.js.map +1 -1
- package/lib/commonjs/index.js +24 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/models/anime-parser.js.map +1 -1
- package/lib/commonjs/models/base-parser.js.map +1 -1
- package/lib/commonjs/models/base-provider.js.map +1 -1
- package/lib/commonjs/models/base-types.js.map +1 -1
- package/lib/commonjs/models/extension-manifest.js.map +1 -1
- package/lib/commonjs/models/extractor-context.js.map +1 -1
- package/lib/commonjs/models/index.js.map +1 -1
- package/lib/commonjs/models/lightnovel-parser.js.map +1 -1
- package/lib/commonjs/models/manga-parser.js.map +1 -1
- package/lib/commonjs/models/movie-parser.js.map +1 -1
- package/lib/commonjs/models/provider-context.js.map +1 -1
- package/lib/commonjs/models/types.js +4 -0
- package/lib/commonjs/models/types.js.map +1 -1
- package/lib/commonjs/models/video-extractor.js.map +1 -1
- package/lib/commonjs/providers/anime/anify.js.map +1 -1
- package/lib/commonjs/providers/anime/anikoto/anikoto.js +186 -0
- package/lib/commonjs/providers/anime/anikoto/anikoto.js.map +1 -0
- package/lib/commonjs/providers/anime/anikoto/create-anikoto.js +533 -0
- package/lib/commonjs/providers/anime/anikoto/create-anikoto.js.map +1 -0
- package/lib/commonjs/providers/anime/animedrive.js.map +1 -1
- package/lib/commonjs/providers/anime/animekai/animekai.js.map +1 -1
- package/lib/commonjs/providers/anime/animekai/create-animekai.js.map +1 -1
- package/lib/commonjs/providers/anime/animepahe/animepahe.js.map +1 -1
- package/lib/commonjs/providers/anime/animepahe/create-animepahe.js +2 -2
- package/lib/commonjs/providers/anime/animepahe/create-animepahe.js.map +1 -1
- package/lib/commonjs/providers/anime/animesuge/animesuge.js.map +1 -1
- package/lib/commonjs/providers/anime/animesuge/create-animesuge.js.map +1 -1
- package/lib/commonjs/providers/anime/animeunity.js.map +1 -1
- package/lib/commonjs/providers/anime/index.js +4 -4
- package/lib/commonjs/providers/anime/index.js.map +1 -1
- package/lib/commonjs/providers/anime/kickassanime.js.map +1 -1
- package/lib/commonjs/providers/anime/marin.js.map +1 -1
- package/lib/commonjs/providers/anime/zoro/create-zoro.js.map +1 -1
- package/lib/commonjs/providers/anime/zoro/zoro.js.map +1 -1
- package/lib/commonjs/providers/index.js.map +1 -1
- package/lib/commonjs/providers/light-novels/index.js.map +1 -1
- package/lib/commonjs/providers/light-novels/novelupdates.js.map +1 -1
- package/lib/commonjs/providers/light-novels/readlightnovels.js.map +1 -1
- package/lib/commonjs/providers/manga/asurascans.js.map +1 -1
- package/lib/commonjs/providers/manga/brmangas.js.map +1 -1
- package/lib/commonjs/providers/manga/comick.js.map +1 -1
- package/lib/commonjs/providers/manga/flamescans.js.map +1 -1
- package/lib/commonjs/providers/manga/index.js.map +1 -1
- package/lib/commonjs/providers/manga/mangadex.js.map +1 -1
- package/lib/commonjs/providers/manga/mangahere.js.map +1 -1
- package/lib/commonjs/providers/manga/mangahost.js.map +1 -1
- package/lib/commonjs/providers/manga/mangakakalot.js.map +1 -1
- package/lib/commonjs/providers/manga/mangapark.js.map +1 -1
- package/lib/commonjs/providers/manga/mangapill.js.map +1 -1
- package/lib/commonjs/providers/manga/mangareader.js.map +1 -1
- package/lib/commonjs/providers/manga/mangasee123.js.map +1 -1
- package/lib/commonjs/providers/manga/readmanga.js.map +1 -1
- package/lib/commonjs/providers/manga/vyvymanga.js.map +1 -1
- package/lib/commonjs/providers/meta/anilist.js +2 -2
- package/lib/commonjs/providers/meta/anilist.js.map +1 -1
- package/lib/commonjs/providers/meta/index.js.map +1 -1
- package/lib/commonjs/providers/meta/mal.js.map +1 -1
- package/lib/commonjs/providers/meta/tmdb.js.map +1 -1
- package/lib/commonjs/providers/movies/dramacool.js.map +1 -1
- package/lib/commonjs/providers/movies/himovies/create-himovies.js.map +1 -1
- package/lib/commonjs/providers/movies/himovies/himovies.js.map +1 -1
- package/lib/commonjs/providers/movies/index.js +18 -1
- package/lib/commonjs/providers/movies/index.js.map +1 -1
- package/lib/commonjs/providers/movies/multimovies/create-multimovies.js.map +1 -1
- package/lib/commonjs/providers/movies/multimovies/multimovies.js.map +1 -1
- package/lib/commonjs/providers/movies/multistream/index.js.map +1 -1
- package/lib/commonjs/providers/movies/multistream/utils.js.map +1 -1
- package/lib/commonjs/providers/movies/netflixmirror/create-netflixmirror.js.map +1 -1
- package/lib/commonjs/providers/movies/netflixmirror/netflixmirror.js.map +1 -1
- package/lib/commonjs/providers/movies/vegamovies/create-vegamovies.js +812 -0
- package/lib/commonjs/providers/movies/vegamovies/create-vegamovies.js.map +1 -0
- package/lib/commonjs/providers/movies/vegamovies/vegamovies.js +56 -0
- package/lib/commonjs/providers/movies/vegamovies/vegamovies.js.map +1 -0
- package/lib/commonjs/providers/movies/yflix/create-yflix.js.map +1 -1
- package/lib/commonjs/providers/movies/yflix/yflix.js.map +1 -1
- package/lib/commonjs/providers/movies/yflix.js.map +1 -1
- package/lib/commonjs/utils/ExtractorManager.js +10 -2
- package/lib/commonjs/utils/ExtractorManager.js.map +1 -1
- package/lib/commonjs/utils/ProviderManager.js.map +1 -1
- package/lib/commonjs/utils/constants.js.map +1 -1
- package/lib/commonjs/utils/create-extractor-context.js.map +1 -1
- package/lib/commonjs/utils/create-provider-context.js.map +1 -1
- package/lib/commonjs/utils/extension-utils.js +11 -2
- package/lib/commonjs/utils/extension-utils.js.map +1 -1
- package/lib/commonjs/utils/index.js.map +1 -1
- package/lib/commonjs/utils/provider-maps.js +5 -2
- package/lib/commonjs/utils/provider-maps.js.map +1 -1
- package/lib/commonjs/utils/queries.js.map +1 -1
- package/lib/commonjs/utils/url-polyfill.js.map +1 -1
- package/lib/commonjs/utils/utils.js.map +1 -1
- package/lib/module/extension-registry.json +60 -64
- package/lib/module/extractors/{streamp2p.js → StreamP2P.js} +1 -1
- package/lib/module/extractors/StreamP2P.js.map +1 -0
- package/lib/module/extractors/asianload.js.map +1 -1
- package/lib/module/extractors/filemoon.js.map +1 -1
- package/lib/module/extractors/gdflix.js +162 -0
- package/lib/module/extractors/gdflix.js.map +1 -0
- package/lib/module/extractors/gofile.js +147 -0
- package/lib/module/extractors/gofile.js.map +1 -0
- package/lib/module/extractors/gogocdn.js.map +1 -1
- package/lib/module/extractors/hubcloud.js +315 -0
- package/lib/module/extractors/hubcloud.js.map +1 -0
- package/lib/module/extractors/index.js +5 -1
- package/lib/module/extractors/index.js.map +1 -1
- package/lib/module/extractors/kisskh/kkey.js.map +1 -1
- package/lib/module/extractors/kisskh/staticdata.js.map +1 -1
- package/lib/module/extractors/kwik.js +1 -1
- package/lib/module/extractors/kwik.js.map +1 -1
- package/lib/module/extractors/megacloud.js.map +1 -1
- package/lib/module/extractors/megaplay.js +163 -0
- package/lib/module/extractors/megaplay.js.map +1 -0
- package/lib/module/extractors/megaup.js.map +1 -1
- package/lib/module/extractors/mixdrop.js.map +1 -1
- package/lib/module/extractors/mp4player.js.map +1 -1
- package/lib/module/extractors/mp4upload.js.map +1 -1
- package/lib/module/extractors/rapidcloud.js.map +1 -1
- package/lib/module/extractors/streamhub.js.map +1 -1
- package/lib/module/extractors/streamlare.js.map +1 -1
- package/lib/module/extractors/streamsb.js.map +1 -1
- package/lib/module/extractors/streamtape.js.map +1 -1
- package/lib/module/extractors/streamwish.js.map +1 -1
- package/lib/module/extractors/vidhide.js.map +1 -1
- package/lib/module/extractors/vidmoly.js.map +1 -1
- package/lib/module/extractors/vizcloud.js.map +1 -1
- package/lib/module/extractors/voe.js.map +1 -1
- package/lib/module/index.js +2 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/models/anime-parser.js.map +1 -1
- package/lib/module/models/base-parser.js.map +1 -1
- package/lib/module/models/base-provider.js.map +1 -1
- package/lib/module/models/base-types.js.map +1 -1
- package/lib/module/models/extension-manifest.js.map +1 -1
- package/lib/module/models/extractor-context.js.map +1 -1
- package/lib/module/models/index.js.map +1 -1
- package/lib/module/models/lightnovel-parser.js.map +1 -1
- package/lib/module/models/manga-parser.js.map +1 -1
- package/lib/module/models/movie-parser.js.map +1 -1
- package/lib/module/models/provider-context.js.map +1 -1
- package/lib/module/models/types.js +4 -0
- package/lib/module/models/types.js.map +1 -1
- package/lib/module/models/video-extractor.js.map +1 -1
- package/lib/module/providers/anime/anify.js.map +1 -1
- package/lib/module/providers/anime/anikoto/anikoto.js +181 -0
- package/lib/module/providers/anime/anikoto/anikoto.js.map +1 -0
- package/lib/module/providers/anime/anikoto/create-anikoto.js +529 -0
- package/lib/module/providers/anime/anikoto/create-anikoto.js.map +1 -0
- package/lib/module/providers/anime/animedrive.js.map +1 -1
- package/lib/module/providers/anime/animekai/animekai.js.map +1 -1
- package/lib/module/providers/anime/animekai/create-animekai.js.map +1 -1
- package/lib/module/providers/anime/animepahe/animepahe.js.map +1 -1
- package/lib/module/providers/anime/animepahe/create-animepahe.js +2 -2
- package/lib/module/providers/anime/animepahe/create-animepahe.js.map +1 -1
- package/lib/module/providers/anime/animesuge/animesuge.js.map +1 -1
- package/lib/module/providers/anime/animesuge/create-animesuge.js.map +1 -1
- package/lib/module/providers/anime/animeunity.js.map +1 -1
- package/lib/module/providers/anime/index.js +4 -4
- package/lib/module/providers/anime/index.js.map +1 -1
- package/lib/module/providers/anime/kickassanime.js.map +1 -1
- package/lib/module/providers/anime/marin.js.map +1 -1
- package/lib/module/providers/anime/zoro/create-zoro.js.map +1 -1
- package/lib/module/providers/anime/zoro/zoro.js.map +1 -1
- package/lib/module/providers/index.js.map +1 -1
- package/lib/module/providers/light-novels/index.js.map +1 -1
- package/lib/module/providers/light-novels/novelupdates.js.map +1 -1
- package/lib/module/providers/light-novels/readlightnovels.js.map +1 -1
- package/lib/module/providers/manga/asurascans.js.map +1 -1
- package/lib/module/providers/manga/brmangas.js.map +1 -1
- package/lib/module/providers/manga/comick.js.map +1 -1
- package/lib/module/providers/manga/flamescans.js.map +1 -1
- package/lib/module/providers/manga/index.js.map +1 -1
- package/lib/module/providers/manga/mangadex.js.map +1 -1
- package/lib/module/providers/manga/mangahere.js.map +1 -1
- package/lib/module/providers/manga/mangahost.js.map +1 -1
- package/lib/module/providers/manga/mangakakalot.js.map +1 -1
- package/lib/module/providers/manga/mangapark.js.map +1 -1
- package/lib/module/providers/manga/mangapill.js.map +1 -1
- package/lib/module/providers/manga/mangareader.js.map +1 -1
- package/lib/module/providers/manga/mangasee123.js.map +1 -1
- package/lib/module/providers/manga/readmanga.js.map +1 -1
- package/lib/module/providers/manga/vyvymanga.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/meta/index.js.map +1 -1
- package/lib/module/providers/meta/mal.js.map +1 -1
- package/lib/module/providers/meta/tmdb.js.map +1 -1
- package/lib/module/providers/movies/dramacool.js.map +1 -1
- package/lib/module/providers/movies/himovies/create-himovies.js.map +1 -1
- package/lib/module/providers/movies/himovies/himovies.js.map +1 -1
- package/lib/module/providers/movies/index.js +6 -1
- package/lib/module/providers/movies/index.js.map +1 -1
- package/lib/module/providers/movies/multimovies/create-multimovies.js.map +1 -1
- package/lib/module/providers/movies/multimovies/multimovies.js.map +1 -1
- package/lib/module/providers/movies/multistream/index.js.map +1 -1
- package/lib/module/providers/movies/multistream/utils.js.map +1 -1
- package/lib/module/providers/movies/netflixmirror/create-netflixmirror.js.map +1 -1
- package/lib/module/providers/movies/netflixmirror/netflixmirror.js.map +1 -1
- package/lib/module/providers/movies/vegamovies/create-vegamovies.js +808 -0
- package/lib/module/providers/movies/vegamovies/create-vegamovies.js.map +1 -0
- package/lib/module/providers/movies/vegamovies/vegamovies.js +47 -0
- package/lib/module/providers/movies/vegamovies/vegamovies.js.map +1 -0
- package/lib/module/providers/movies/yflix/create-yflix.js.map +1 -1
- package/lib/module/providers/movies/yflix/yflix.js.map +1 -1
- package/lib/module/providers/movies/yflix.js.map +1 -1
- package/lib/module/utils/ExtractorManager.js +10 -2
- package/lib/module/utils/ExtractorManager.js.map +1 -1
- package/lib/module/utils/ProviderManager.js.map +1 -1
- package/lib/module/utils/constants.js.map +1 -1
- package/lib/module/utils/create-extractor-context.js.map +1 -1
- package/lib/module/utils/create-provider-context.js.map +1 -1
- package/lib/module/utils/extension-utils.js +12 -3
- package/lib/module/utils/extension-utils.js.map +1 -1
- package/lib/module/utils/index.js.map +1 -1
- package/lib/module/utils/provider-maps.js +5 -2
- package/lib/module/utils/provider-maps.js.map +1 -1
- package/lib/module/utils/queries.js.map +1 -1
- package/lib/module/utils/url-polyfill.js.map +1 -1
- package/lib/module/utils/utils.js.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/gdflix.d.ts +8 -0
- package/lib/typescript/commonjs/src/extractors/gdflix.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/extractors/gofile.d.ts +8 -0
- package/lib/typescript/commonjs/src/extractors/gofile.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/extractors/hubcloud.d.ts +8 -0
- package/lib/typescript/commonjs/src/extractors/hubcloud.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/extractors/index.d.ts +5 -1
- package/lib/typescript/commonjs/src/extractors/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/extractors/megaplay.d.ts +9 -0
- package/lib/typescript/commonjs/src/extractors/megaplay.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +2 -2
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/models/provider-context.d.ts +12 -0
- package/lib/typescript/commonjs/src/models/provider-context.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/models/types.d.ts +9 -1
- package/lib/typescript/commonjs/src/models/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/anime/anikoto/anikoto.d.ts +144 -0
- package/lib/typescript/commonjs/src/providers/anime/anikoto/anikoto.d.ts.map +1 -0
- package/lib/typescript/{module/src/providers/anime/aniwatchtv/create-aniwatchtv.d.ts → commonjs/src/providers/anime/anikoto/create-anikoto.d.ts} +10 -12
- package/lib/typescript/commonjs/src/providers/anime/anikoto/create-anikoto.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/providers/anime/index.d.ts +4 -4
- package/lib/typescript/commonjs/src/providers/anime/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/meta/anilist.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/movies/index.d.ts +5 -0
- package/lib/typescript/commonjs/src/providers/movies/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/movies/vegamovies/create-vegamovies.d.ts +22 -0
- package/lib/typescript/commonjs/src/providers/movies/vegamovies/create-vegamovies.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/providers/movies/vegamovies/vegamovies.d.ts +25 -0
- package/lib/typescript/commonjs/src/providers/movies/vegamovies/vegamovies.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/utils/ExtractorManager.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/extension-utils.d.ts +9 -0
- package/lib/typescript/commonjs/src/utils/extension-utils.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/provider-maps.d.ts +2 -1
- package/lib/typescript/commonjs/src/utils/provider-maps.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/gdflix.d.ts +8 -0
- package/lib/typescript/module/src/extractors/gdflix.d.ts.map +1 -0
- package/lib/typescript/module/src/extractors/gofile.d.ts +8 -0
- package/lib/typescript/module/src/extractors/gofile.d.ts.map +1 -0
- package/lib/typescript/module/src/extractors/hubcloud.d.ts +8 -0
- package/lib/typescript/module/src/extractors/hubcloud.d.ts.map +1 -0
- package/lib/typescript/module/src/extractors/index.d.ts +5 -1
- package/lib/typescript/module/src/extractors/index.d.ts.map +1 -1
- package/lib/typescript/module/src/extractors/megaplay.d.ts +9 -0
- package/lib/typescript/module/src/extractors/megaplay.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +2 -2
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/models/provider-context.d.ts +12 -0
- package/lib/typescript/module/src/models/provider-context.d.ts.map +1 -1
- package/lib/typescript/module/src/models/types.d.ts +9 -1
- package/lib/typescript/module/src/models/types.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/anime/anikoto/anikoto.d.ts +144 -0
- package/lib/typescript/module/src/providers/anime/anikoto/anikoto.d.ts.map +1 -0
- package/lib/typescript/{commonjs/src/providers/anime/aniwatchtv/create-aniwatchtv.d.ts → module/src/providers/anime/anikoto/create-anikoto.d.ts} +10 -12
- package/lib/typescript/module/src/providers/anime/anikoto/create-anikoto.d.ts.map +1 -0
- package/lib/typescript/module/src/providers/anime/index.d.ts +4 -4
- package/lib/typescript/module/src/providers/anime/index.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/meta/anilist.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/movies/index.d.ts +5 -0
- package/lib/typescript/module/src/providers/movies/index.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/movies/vegamovies/create-vegamovies.d.ts +22 -0
- package/lib/typescript/module/src/providers/movies/vegamovies/create-vegamovies.d.ts.map +1 -0
- package/lib/typescript/module/src/providers/movies/vegamovies/vegamovies.d.ts +25 -0
- package/lib/typescript/module/src/providers/movies/vegamovies/vegamovies.d.ts.map +1 -0
- package/lib/typescript/module/src/utils/ExtractorManager.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/extension-utils.d.ts +9 -0
- package/lib/typescript/module/src/utils/extension-utils.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/provider-maps.d.ts +2 -1
- package/lib/typescript/module/src/utils/provider-maps.d.ts.map +1 -1
- package/package.json +217 -217
- package/react-native.config.js +12 -12
- package/src/extension-registry.json +60 -64
- package/src/extractors/gdflix.ts +167 -0
- package/src/extractors/gofile.ts +182 -0
- package/src/extractors/hubcloud.ts +357 -0
- package/src/extractors/index.ts +8 -0
- package/src/extractors/kwik.ts +1 -1
- package/src/extractors/megaplay.ts +182 -0
- package/src/index.tsx +8 -0
- package/src/models/provider-context.ts +12 -0
- package/src/models/types.ts +8 -0
- package/src/providers/anime/anikoto/anikoto.ts +215 -0
- package/src/providers/anime/anikoto/create-anikoto.ts +637 -0
- package/src/providers/anime/animepahe/create-animepahe.ts +2 -2
- package/src/providers/anime/index.ts +4 -4
- package/src/providers/meta/anilist.ts +1 -1
- package/src/providers/movies/index.ts +6 -0
- package/src/providers/movies/vegamovies/create-vegamovies.ts +921 -0
- package/src/providers/movies/vegamovies/vegamovies.ts +63 -0
- package/src/utils/ExtractorManager.ts +7 -1
- package/src/utils/extension-utils.ts +13 -0
- package/src/utils/provider-maps.ts +5 -2
- package/lib/commonjs/extractors/streamp2p.js.map +0 -1
- package/lib/commonjs/providers/anime/aniwatchtv/aniwatchtv.js +0 -187
- package/lib/commonjs/providers/anime/aniwatchtv/aniwatchtv.js.map +0 -1
- package/lib/commonjs/providers/anime/aniwatchtv/create-aniwatchtv.js +0 -572
- package/lib/commonjs/providers/anime/aniwatchtv/create-aniwatchtv.js.map +0 -1
- package/lib/module/extractors/streamp2p.js.map +0 -1
- package/lib/module/providers/anime/aniwatchtv/aniwatchtv.js +0 -184
- package/lib/module/providers/anime/aniwatchtv/aniwatchtv.js.map +0 -1
- package/lib/module/providers/anime/aniwatchtv/create-aniwatchtv.js +0 -569
- package/lib/module/providers/anime/aniwatchtv/create-aniwatchtv.js.map +0 -1
- package/lib/typescript/commonjs/src/providers/anime/aniwatchtv/aniwatchtv.d.ts +0 -134
- package/lib/typescript/commonjs/src/providers/anime/aniwatchtv/aniwatchtv.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/providers/anime/aniwatchtv/create-aniwatchtv.d.ts.map +0 -1
- package/lib/typescript/module/src/providers/anime/aniwatchtv/aniwatchtv.d.ts +0 -134
- package/lib/typescript/module/src/providers/anime/aniwatchtv/aniwatchtv.d.ts.map +0 -1
- package/lib/typescript/module/src/providers/anime/aniwatchtv/create-aniwatchtv.d.ts.map +0 -1
- package/src/providers/anime/aniwatchtv/aniwatchtv.ts +0 -198
- package/src/providers/anime/aniwatchtv/create-aniwatchtv.ts +0 -632
- /package/src/extractors/{streamp2p.ts → StreamP2P.ts} +0 -0
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { type ExtractorContext, type ISource, type IVideo, type IVideoExtractor } from '../models';
|
|
2
|
+
import type { PolyURL } from '../utils/url-polyfill';
|
|
3
|
+
|
|
4
|
+
const DEFAULT_USER_AGENT =
|
|
5
|
+
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* GDFlix extractor function / factory relying on ExtractorContext
|
|
9
|
+
* Follows react-native-consumet conventions (Kwik, MegaUp, MegaPlay)
|
|
10
|
+
*/
|
|
11
|
+
export function GDFlix(ctx: ExtractorContext): IVideoExtractor {
|
|
12
|
+
const serverName = 'GDFlix';
|
|
13
|
+
const sources: IVideo[] = [];
|
|
14
|
+
const { axios: client, load, USER_AGENT, PolyURL } = ctx;
|
|
15
|
+
const userAgent = USER_AGENT || DEFAULT_USER_AGENT;
|
|
16
|
+
|
|
17
|
+
const extract = async (videoUrl: PolyURL, referer?: string): Promise<ISource> => {
|
|
18
|
+
try {
|
|
19
|
+
const urlHref = typeof videoUrl === 'string' ? videoUrl : videoUrl.href;
|
|
20
|
+
const urlObj = typeof videoUrl === 'object' && videoUrl.origin ? videoUrl : new PolyURL(urlHref);
|
|
21
|
+
const baseUrl = urlObj.origin;
|
|
22
|
+
|
|
23
|
+
const pageHeaders: Record<string, string> = {
|
|
24
|
+
'User-Agent': userAgent,
|
|
25
|
+
'Referer': referer || baseUrl,
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const res = await client.get(urlHref, { headers: pageHeaders });
|
|
29
|
+
let $ = load(res.data);
|
|
30
|
+
|
|
31
|
+
// Handle location.replace redirect in body onload
|
|
32
|
+
const bodyOnload = $('body').attr('onload');
|
|
33
|
+
if (bodyOnload?.includes('location.replace')) {
|
|
34
|
+
const redirectUrl = bodyOnload.split("location.replace('")?.[1]?.split("'")?.[0];
|
|
35
|
+
if (redirectUrl) {
|
|
36
|
+
const redirectRes = await client.get(redirectUrl, { headers: pageHeaders });
|
|
37
|
+
$ = load(redirectRes.data);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const rawTitle = $('title').text() || '';
|
|
42
|
+
const qualityMatch = rawTitle.match(/\b(2160p|4k|1080p|720p|480p|360p)\b/i);
|
|
43
|
+
const pageQuality = qualityMatch
|
|
44
|
+
? qualityMatch[1]!.toLowerCase() === '4k'
|
|
45
|
+
? '2160p'
|
|
46
|
+
: qualityMatch[1]!.toLowerCase()
|
|
47
|
+
: 'auto';
|
|
48
|
+
|
|
49
|
+
const extractedSources: IVideo[] = [];
|
|
50
|
+
|
|
51
|
+
// 1. Resume Cloud / Resume Bot
|
|
52
|
+
try {
|
|
53
|
+
const resumeDrive = $('.btn-secondary').attr('href') || '';
|
|
54
|
+
if (resumeDrive) {
|
|
55
|
+
if (resumeDrive.includes('indexbot')) {
|
|
56
|
+
const resumeBotRes = await client.get(resumeDrive, { headers: pageHeaders });
|
|
57
|
+
const tokenMatch = resumeBotRes.data.match(/formData\.append\('token',\s*'([a-f0-9]+)'\)/);
|
|
58
|
+
const resumeBotToken = tokenMatch ? tokenMatch[1] : '';
|
|
59
|
+
|
|
60
|
+
const pathMatch = resumeBotRes.data.match(/fetch\('\/download\?id=([a-zA-Z0-9\/+]+)'/);
|
|
61
|
+
const resumeBotPath = pathMatch ? pathMatch[1] : '';
|
|
62
|
+
const resumeBotBaseUrl = resumeDrive.split('/download')[0];
|
|
63
|
+
|
|
64
|
+
if (resumeBotToken && resumeBotPath) {
|
|
65
|
+
const postRes = await client.post(
|
|
66
|
+
`${resumeBotBaseUrl}/download?id=${resumeBotPath}`,
|
|
67
|
+
`token=${encodeURIComponent(resumeBotToken)}`,
|
|
68
|
+
{
|
|
69
|
+
headers: {
|
|
70
|
+
'Referer': resumeDrive,
|
|
71
|
+
'Cookie': 'PHPSESSID=7e9658ce7c805dab5bbcea9046f7f308',
|
|
72
|
+
'Content-Type': 'application/x-www-form-urlencoded',
|
|
73
|
+
},
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
const downloadUrl = postRes.data?.url;
|
|
77
|
+
if (downloadUrl) {
|
|
78
|
+
extractedSources.push({
|
|
79
|
+
url: downloadUrl,
|
|
80
|
+
server: 'ResumeBot',
|
|
81
|
+
quality: pageQuality,
|
|
82
|
+
isM3U8: downloadUrl.includes('.m3u8'),
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
} else {
|
|
87
|
+
const targetUrl = resumeDrive.startsWith('http') ? resumeDrive : `${baseUrl}${resumeDrive}`;
|
|
88
|
+
const resumeDriveRes = await client.get(targetUrl, { headers: pageHeaders });
|
|
89
|
+
const $resumeDrive = load(resumeDriveRes.data);
|
|
90
|
+
const resumeUrl = $resumeDrive('.btn-success').attr('href');
|
|
91
|
+
if (resumeUrl) {
|
|
92
|
+
extractedSources.push({
|
|
93
|
+
url: resumeUrl,
|
|
94
|
+
server: 'ResumeCloud',
|
|
95
|
+
quality: pageQuality,
|
|
96
|
+
isM3U8: resumeUrl.includes('.m3u8'),
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
} catch {
|
|
102
|
+
// Resume link not found
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// 2. Instant Link (G-Drive)
|
|
106
|
+
try {
|
|
107
|
+
const seed = $('.btn-danger').attr('href') || '';
|
|
108
|
+
if (seed) {
|
|
109
|
+
if (!seed.includes('?url=')) {
|
|
110
|
+
const headRes = await client.head(seed, { headers: pageHeaders });
|
|
111
|
+
const redirected = (headRes.request as any)?.responseURL || seed;
|
|
112
|
+
const driveUrl = redirected.includes('?url=') ? redirected.split('?url=')[1] : redirected;
|
|
113
|
+
if (driveUrl) {
|
|
114
|
+
extractedSources.push({
|
|
115
|
+
url: driveUrl,
|
|
116
|
+
server: 'G-Drive',
|
|
117
|
+
quality: pageQuality,
|
|
118
|
+
isM3U8: driveUrl.includes('.m3u8'),
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
} else {
|
|
122
|
+
const instantToken = seed.split('=')[1];
|
|
123
|
+
const videoSeedUrl = seed.split('/').slice(0, 3).join('/') + '/api';
|
|
124
|
+
|
|
125
|
+
if (instantToken) {
|
|
126
|
+
const postRes = await client.post(videoSeedUrl, `keys=${encodeURIComponent(instantToken)}`, {
|
|
127
|
+
headers: {
|
|
128
|
+
'x-token': videoSeedUrl,
|
|
129
|
+
'Content-Type': 'application/x-www-form-urlencoded',
|
|
130
|
+
},
|
|
131
|
+
});
|
|
132
|
+
const instantLinkData = typeof postRes.data === 'string' ? JSON.parse(postRes.data) : postRes.data;
|
|
133
|
+
if (instantLinkData && instantLinkData.error === false && instantLinkData.url) {
|
|
134
|
+
extractedSources.push({
|
|
135
|
+
url: instantLinkData.url,
|
|
136
|
+
server: 'G-Drive (download only)',
|
|
137
|
+
quality: pageQuality,
|
|
138
|
+
isM3U8: instantLinkData.url.includes('.m3u8'),
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
} catch {
|
|
145
|
+
// Instant link not found
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
return {
|
|
149
|
+
sources: extractedSources,
|
|
150
|
+
headers: {
|
|
151
|
+
'User-Agent': userAgent,
|
|
152
|
+
'Referer': baseUrl,
|
|
153
|
+
},
|
|
154
|
+
};
|
|
155
|
+
} catch (error) {
|
|
156
|
+
throw new Error(`[GDFlix] Failed to extract: ${(error as Error).message}`);
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
return {
|
|
161
|
+
serverName,
|
|
162
|
+
sources,
|
|
163
|
+
extract,
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export default GDFlix;
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { type ExtractorContext, type ISource, type IVideo, type IVideoExtractor } from '../models';
|
|
2
|
+
import type { PolyURL } from '../utils/url-polyfill';
|
|
3
|
+
|
|
4
|
+
const GOFILE_API = 'https://api.gofile.io';
|
|
5
|
+
const GOFILE_LANGUAGE = 'en-US';
|
|
6
|
+
const DEFAULT_USER_AGENT =
|
|
7
|
+
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36';
|
|
8
|
+
|
|
9
|
+
type GofileContent = {
|
|
10
|
+
id?: string;
|
|
11
|
+
type?: string;
|
|
12
|
+
link?: string;
|
|
13
|
+
children?: Record<string, GofileContent>;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
let cachedAccountToken: string | null = null;
|
|
17
|
+
let cachedGenerateWT: ((token: string) => string) | null = null;
|
|
18
|
+
let cachedWTTime = 0;
|
|
19
|
+
|
|
20
|
+
async function getOrFetchGenerateWT(axiosClient: any, userAgent: string): Promise<(token: string) => string> {
|
|
21
|
+
const now = Date.now();
|
|
22
|
+
if (cachedGenerateWT && now - cachedWTTime < 3 * 60 * 60 * 1000) {
|
|
23
|
+
return cachedGenerateWT;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
try {
|
|
27
|
+
const res = await axiosClient.get('https://gofile.io/js/wt.obf.js', {
|
|
28
|
+
headers: {
|
|
29
|
+
'User-Agent': userAgent,
|
|
30
|
+
'Referer': 'https://gofile.io/',
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
const code = res.data;
|
|
35
|
+
const runner = new Function(
|
|
36
|
+
'navigator',
|
|
37
|
+
'window',
|
|
38
|
+
'document',
|
|
39
|
+
'location',
|
|
40
|
+
`${code}\nreturn typeof generateWT !== 'undefined' ? generateWT : (window && window.generateWT);`
|
|
41
|
+
);
|
|
42
|
+
const fakeNav = {
|
|
43
|
+
userAgent,
|
|
44
|
+
language: GOFILE_LANGUAGE,
|
|
45
|
+
};
|
|
46
|
+
const fakeWin: any = {
|
|
47
|
+
navigator: fakeNav,
|
|
48
|
+
location: {
|
|
49
|
+
href: 'https://gofile.io/',
|
|
50
|
+
protocol: 'https:',
|
|
51
|
+
host: 'gofile.io',
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const generateWT = runner(fakeNav, fakeWin, {}, fakeWin.location);
|
|
56
|
+
if (typeof generateWT === 'function') {
|
|
57
|
+
cachedGenerateWT = generateWT;
|
|
58
|
+
cachedWTTime = now;
|
|
59
|
+
return generateWT;
|
|
60
|
+
}
|
|
61
|
+
} catch (err: any) {
|
|
62
|
+
console.warn('[Gofile] Failed to fetch or execute wt.obf.js:', err?.message || err);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Fallback if wt.obf.js is unreachable
|
|
66
|
+
return (accountToken: string) => accountToken;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
async function getOrFetchToken(axiosClient: any, userAgent: string): Promise<string> {
|
|
70
|
+
if (cachedAccountToken) return cachedAccountToken;
|
|
71
|
+
|
|
72
|
+
const accountResponse = await axiosClient.post(
|
|
73
|
+
`${GOFILE_API}/accounts`,
|
|
74
|
+
{},
|
|
75
|
+
{
|
|
76
|
+
headers: {
|
|
77
|
+
'User-Agent': userAgent,
|
|
78
|
+
'Origin': 'https://gofile.io',
|
|
79
|
+
'Referer': 'https://gofile.io/',
|
|
80
|
+
},
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
const token = accountResponse.data?.data?.token;
|
|
84
|
+
|
|
85
|
+
if (!token) throw new Error('[Gofile] Did not return an account token');
|
|
86
|
+
|
|
87
|
+
cachedAccountToken = token;
|
|
88
|
+
return token;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function findFirstFile(content: GofileContent): GofileContent | undefined {
|
|
92
|
+
if (content?.type === 'file' && content?.link) return content;
|
|
93
|
+
|
|
94
|
+
for (const child of Object.values(content?.children ?? {})) {
|
|
95
|
+
const file = findFirstFile(child);
|
|
96
|
+
if (file) return file;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
return undefined;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Gofile extractor function / factory relying on ExtractorContext
|
|
104
|
+
* Follows react-native-consumet conventions (Kwik, MegaUp, MegaPlay)
|
|
105
|
+
*/
|
|
106
|
+
export function Gofile(ctx: ExtractorContext): IVideoExtractor {
|
|
107
|
+
const serverName = 'Gofile';
|
|
108
|
+
const sources: IVideo[] = [];
|
|
109
|
+
const { axios: client, USER_AGENT, PolyURL } = ctx;
|
|
110
|
+
const userAgent = USER_AGENT || DEFAULT_USER_AGENT;
|
|
111
|
+
|
|
112
|
+
const extract = async (videoUrl: PolyURL): Promise<ISource> => {
|
|
113
|
+
try {
|
|
114
|
+
const urlHref = typeof videoUrl === 'string' ? videoUrl : videoUrl.href;
|
|
115
|
+
const urlObj = typeof videoUrl === 'object' && videoUrl.origin ? videoUrl : new PolyURL(urlHref);
|
|
116
|
+
const id = urlObj.searchParams.get('c') || urlObj.pathname.split('/').filter(Boolean).pop() || urlHref;
|
|
117
|
+
|
|
118
|
+
const token = await getOrFetchToken(client, userAgent);
|
|
119
|
+
const generateWT = await getOrFetchGenerateWT(client, userAgent);
|
|
120
|
+
const websiteToken = generateWT(token);
|
|
121
|
+
|
|
122
|
+
const response = await client.get(`${GOFILE_API}/contents/${id}`, {
|
|
123
|
+
params: {
|
|
124
|
+
contentFilter: '',
|
|
125
|
+
page: 1,
|
|
126
|
+
pageSize: 1000,
|
|
127
|
+
sortField: 'name',
|
|
128
|
+
sortDirection: 1,
|
|
129
|
+
},
|
|
130
|
+
headers: {
|
|
131
|
+
'Accept': '*/*',
|
|
132
|
+
'Accept-Language': `${GOFILE_LANGUAGE},en;q=0.9`,
|
|
133
|
+
'Authorization': `Bearer ${token}`,
|
|
134
|
+
'Origin': 'https://gofile.io',
|
|
135
|
+
'Referer': 'https://gofile.io/',
|
|
136
|
+
'User-Agent': userAgent,
|
|
137
|
+
'X-BL': GOFILE_LANGUAGE,
|
|
138
|
+
'X-Website-Token': websiteToken,
|
|
139
|
+
},
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
if (response.data?.status !== 'ok') {
|
|
143
|
+
if (response.data?.status === 'error-auth' || response.status === 401) {
|
|
144
|
+
cachedAccountToken = null;
|
|
145
|
+
}
|
|
146
|
+
throw new Error(`[Gofile] API returned ${response.data?.status ?? 'invalid data'}`);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
const file = findFirstFile(response.data.data);
|
|
150
|
+
if (!file?.link) {
|
|
151
|
+
throw new Error('[Gofile] No downloadable file found in Gofile response');
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
const defaultSource: IVideo = {
|
|
155
|
+
url: file.link,
|
|
156
|
+
isM3U8: file.link.includes('.m3u8'),
|
|
157
|
+
isDASH: file.link.includes('.mpd'),
|
|
158
|
+
quality: 'auto',
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
return {
|
|
162
|
+
sources: [defaultSource],
|
|
163
|
+
headers: {
|
|
164
|
+
'User-Agent': userAgent,
|
|
165
|
+
'Referer': 'https://gofile.io/',
|
|
166
|
+
'Cookie': `accountToken=${token}`,
|
|
167
|
+
},
|
|
168
|
+
download: file.link,
|
|
169
|
+
};
|
|
170
|
+
} catch (error) {
|
|
171
|
+
throw new Error(`[Gofile] Failed to extract: ${(error as Error).message}`);
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
return {
|
|
176
|
+
serverName,
|
|
177
|
+
sources,
|
|
178
|
+
extract,
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export default Gofile;
|
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
import { type ExtractorContext, type ISource, type IVideo, type IVideoExtractor } from '../models';
|
|
2
|
+
import type { PolyURL } from '../utils/url-polyfill';
|
|
3
|
+
import { Gofile } from './gofile';
|
|
4
|
+
|
|
5
|
+
const DEFAULT_USER_AGENT =
|
|
6
|
+
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36';
|
|
7
|
+
|
|
8
|
+
function safeAtob(value: string): string {
|
|
9
|
+
if (!value) return '';
|
|
10
|
+
if (typeof atob === 'function') {
|
|
11
|
+
try {
|
|
12
|
+
return atob(value);
|
|
13
|
+
} catch {}
|
|
14
|
+
}
|
|
15
|
+
if (typeof Buffer !== 'undefined') {
|
|
16
|
+
try {
|
|
17
|
+
return Buffer.from(value, 'base64').toString('binary');
|
|
18
|
+
} catch {}
|
|
19
|
+
}
|
|
20
|
+
return '';
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const hubcloudDecode = function (value: string) {
|
|
24
|
+
if (!value) return '';
|
|
25
|
+
return safeAtob(value.toString());
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const extractUrlFromScript = (html: string): string => {
|
|
29
|
+
const doubleAtobMatch = html.match(/(?:var|let|const)\s+\w+\s*=\s*atob\(atob\(['"]([^'"]+)['"]\)\)/);
|
|
30
|
+
if (doubleAtobMatch?.[1]) {
|
|
31
|
+
return safeAtob(safeAtob(doubleAtobMatch[1]));
|
|
32
|
+
}
|
|
33
|
+
const plainMatch = html.match(/var\s+url\s*=\s*['"]([^'"]+)['"]/);
|
|
34
|
+
return hubcloudDecode(plainMatch?.[1]?.split('r=')?.[1] ?? '') || plainMatch?.[1] || '';
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const getPixelDrainUrl = (html: string) => {
|
|
38
|
+
const match = html.match(/var\s+pxl\s*=\s*['"]([^'"]+)['"];?/i);
|
|
39
|
+
return match?.[1] || '';
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const getRedirectedPixelDrainUrl = (...htmlSources: Array<string | undefined>) => {
|
|
43
|
+
for (const html of htmlSources) {
|
|
44
|
+
if (!html) continue;
|
|
45
|
+
const redirectedUrl = getPixelDrainUrl(html);
|
|
46
|
+
if (redirectedUrl) {
|
|
47
|
+
return redirectedUrl;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return '';
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* HubCloud extractor function / factory relying on ExtractorContext
|
|
55
|
+
* Follows react-native-consumet conventions (Kwik, MegaUp, MegaPlay)
|
|
56
|
+
*/
|
|
57
|
+
export function HubCloud(ctx: ExtractorContext): IVideoExtractor {
|
|
58
|
+
const serverName = 'HubCloud';
|
|
59
|
+
const sources: IVideo[] = [];
|
|
60
|
+
const { axios: client, load, USER_AGENT, PolyURL } = ctx;
|
|
61
|
+
const userAgent = USER_AGENT || DEFAULT_USER_AGENT;
|
|
62
|
+
|
|
63
|
+
const extract = async (videoUrl: PolyURL, referer?: string): Promise<ISource> => {
|
|
64
|
+
try {
|
|
65
|
+
const urlHref = typeof videoUrl === 'string' ? videoUrl : videoUrl.href;
|
|
66
|
+
const urlObj = typeof videoUrl === 'object' && videoUrl.origin ? videoUrl : new PolyURL(urlHref);
|
|
67
|
+
const baseUrl = urlObj.origin;
|
|
68
|
+
|
|
69
|
+
const pageHeaders: Record<string, string> = {
|
|
70
|
+
'User-Agent': userAgent,
|
|
71
|
+
'Referer': referer || baseUrl,
|
|
72
|
+
'Cookie':
|
|
73
|
+
'ext_name=ojplmecpdpgccookcobabopnaifgidhf; xla=s4t; cf_clearance=woQrFGXtLfmEMBEiGUsVHrUBMT8s3cmguIzmMjmvpkg-1770053679-1.2.1.1-xBrQdciOJsweUF6F2T_OtH6jmyanN_TduQ0yslc_XqjU6RcHSxI7.YOKv6ry7oYo64868HYoULnVyww536H2eVI3R2e4wKzsky6abjPdfQPxqpUaXjxfJ02o6jl3_Vkwr4uiaU7Wy596Vdst3y78HXvVmKdIohhtPvp.vZ9_L7wvWdce0GRixjh_6JiqWmWMws46hwEt3hboaS1e1e4EoWCvj5b0M_jVwvSxBOAW5emFzvT3QrnRh4nyYmKDERnY',
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
const vLinkRes = await client.get(urlHref, { headers: pageHeaders });
|
|
77
|
+
const vLinkText = vLinkRes.data;
|
|
78
|
+
const $vLink = load(vLinkText);
|
|
79
|
+
|
|
80
|
+
// Extract file quality and size from page text and headers
|
|
81
|
+
const extractQualityFromText = (text: string): string => {
|
|
82
|
+
const m = text.match(/\b(2160p|4k|1080p|720p|480p|360p)\b/i);
|
|
83
|
+
if (m) {
|
|
84
|
+
return m[1]!.toLowerCase() === '4k' ? '2160p' : m[1]!.toLowerCase();
|
|
85
|
+
}
|
|
86
|
+
return '';
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
const parseSizeInBytes = (text: string): number | undefined => {
|
|
90
|
+
const match = text.match(/([\d.]+)\s*(GB|MB|KB|B)/i);
|
|
91
|
+
if (!match) return undefined;
|
|
92
|
+
const val = parseFloat(match[1]!);
|
|
93
|
+
const unit = match[2]!.toUpperCase();
|
|
94
|
+
if (unit === 'GB') return Math.round(val * 1024 * 1024 * 1024);
|
|
95
|
+
if (unit === 'MB') return Math.round(val * 1024 * 1024);
|
|
96
|
+
if (unit === 'KB') return Math.round(val * 1024);
|
|
97
|
+
return Math.round(val);
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
let pageQuality =
|
|
101
|
+
extractQualityFromText($vLink('title').text()) ||
|
|
102
|
+
extractQualityFromText($vLink('.card-header').text()) ||
|
|
103
|
+
extractQualityFromText(urlHref) ||
|
|
104
|
+
'auto';
|
|
105
|
+
|
|
106
|
+
let fileSize = parseSizeInBytes($vLink('#size, .list-group-item:contains("Size")').text());
|
|
107
|
+
|
|
108
|
+
const extractedSources: IVideo[] = [];
|
|
109
|
+
|
|
110
|
+
const addGofileSources = (res: ISource | IVideo[]) => {
|
|
111
|
+
const list = Array.isArray(res) ? res : res.sources;
|
|
112
|
+
if (Array.isArray(list)) {
|
|
113
|
+
for (const s of list) {
|
|
114
|
+
if (!extractedSources.some((item) => item.url === s.url)) {
|
|
115
|
+
extractedSources.push({
|
|
116
|
+
...s,
|
|
117
|
+
server: 'Gofile',
|
|
118
|
+
quality: pageQuality !== 'auto' ? pageQuality : s.quality || 'auto',
|
|
119
|
+
size: s.size || fileSize,
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
// Check if initial page contains any direct Gofile download links
|
|
127
|
+
const vLinkGofileBtns = $vLink("a[href*='gofile.io']");
|
|
128
|
+
for (const el of vLinkGofileBtns.toArray()) {
|
|
129
|
+
const gfHref = $vLink(el).attr('href');
|
|
130
|
+
if (gfHref) {
|
|
131
|
+
try {
|
|
132
|
+
const gofileRes = await Gofile(ctx).extract(new PolyURL(gfHref));
|
|
133
|
+
addGofileSources(gofileRes);
|
|
134
|
+
} catch {}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
let vcloudLink =
|
|
139
|
+
extractUrlFromScript(vLinkText) || $vLink('.fa-file-download.fa-lg').parent().attr('href') || urlHref;
|
|
140
|
+
|
|
141
|
+
if (vcloudLink?.startsWith('/')) {
|
|
142
|
+
vcloudLink = `${baseUrl}${vcloudLink}`;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// If vcloudLink is directly a Gofile URL
|
|
146
|
+
if (vcloudLink?.includes('gofile.io')) {
|
|
147
|
+
try {
|
|
148
|
+
const gofileRes = await Gofile(ctx).extract(new PolyURL(vcloudLink));
|
|
149
|
+
addGofileSources(gofileRes);
|
|
150
|
+
} catch {}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
let vcloudText = '';
|
|
154
|
+
if (vcloudLink && !vcloudLink.includes('gofile.io') && vcloudLink !== urlHref) {
|
|
155
|
+
const vcloudRes = await client.get(vcloudLink, { headers: pageHeaders });
|
|
156
|
+
vcloudText = vcloudRes.data;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
const $ = load(vcloudText || vLinkText);
|
|
160
|
+
|
|
161
|
+
// Re-check quality and size from final page if not found earlier
|
|
162
|
+
if (pageQuality === 'auto') {
|
|
163
|
+
pageQuality =
|
|
164
|
+
extractQualityFromText($('title').text()) ||
|
|
165
|
+
extractQualityFromText($('.card-header').text()) ||
|
|
166
|
+
extractQualityFromText(vcloudLink) ||
|
|
167
|
+
'auto';
|
|
168
|
+
}
|
|
169
|
+
if (!fileSize) {
|
|
170
|
+
fileSize = parseSizeInBytes($('#size, .list-group-item:contains("Size")').text());
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
const linkClass = $('.btn-success.btn-lg.h6, .btn-danger, .btn-secondary');
|
|
174
|
+
|
|
175
|
+
for (const element of linkClass.toArray()) {
|
|
176
|
+
const itm = $(element);
|
|
177
|
+
let btnUrl = itm.attr('href') || '';
|
|
178
|
+
|
|
179
|
+
switch (true) {
|
|
180
|
+
case btnUrl.includes('pixeld'):
|
|
181
|
+
if (!btnUrl.includes('api')) {
|
|
182
|
+
const redirectedPixelDrainUrl = getRedirectedPixelDrainUrl(vLinkText, vcloudText);
|
|
183
|
+
if (redirectedPixelDrainUrl) {
|
|
184
|
+
btnUrl = redirectedPixelDrainUrl;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
const token = btnUrl.split('/').pop()?.split('?')[0];
|
|
188
|
+
const pxlBaseUrl = btnUrl.split('/').slice(0, -2).join('/');
|
|
189
|
+
btnUrl = `${pxlBaseUrl}/api/file/${token}?download`;
|
|
190
|
+
}
|
|
191
|
+
extractedSources.push({
|
|
192
|
+
url: btnUrl,
|
|
193
|
+
server: 'Pixeldrain',
|
|
194
|
+
quality: pageQuality,
|
|
195
|
+
isM3U8: btnUrl.includes('.m3u8'),
|
|
196
|
+
size: fileSize,
|
|
197
|
+
});
|
|
198
|
+
break;
|
|
199
|
+
|
|
200
|
+
case btnUrl.includes('.dev') && !btnUrl.includes('/?id='):
|
|
201
|
+
extractedSources.push({
|
|
202
|
+
url: btnUrl,
|
|
203
|
+
server: 'CF Worker',
|
|
204
|
+
quality: pageQuality,
|
|
205
|
+
isM3U8: btnUrl.includes('.m3u8'),
|
|
206
|
+
size: fileSize,
|
|
207
|
+
});
|
|
208
|
+
break;
|
|
209
|
+
|
|
210
|
+
case btnUrl.includes('hubcloud') || btnUrl.includes('/?id='):
|
|
211
|
+
try {
|
|
212
|
+
let newUrl = btnUrl;
|
|
213
|
+
try {
|
|
214
|
+
if (typeof fetch !== 'undefined') {
|
|
215
|
+
const fRes = await fetch(btnUrl, {
|
|
216
|
+
headers: pageHeaders,
|
|
217
|
+
redirect: 'follow',
|
|
218
|
+
});
|
|
219
|
+
if (fRes.url && fRes.url.includes('googleusercontent')) {
|
|
220
|
+
newUrl = fRes.url.split('?link=')[1] || fRes.url;
|
|
221
|
+
} else if (fRes.url && fRes.url !== btnUrl) {
|
|
222
|
+
newUrl = fRes.url;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
} catch {}
|
|
226
|
+
|
|
227
|
+
if (!newUrl.includes('googleusercontent')) {
|
|
228
|
+
try {
|
|
229
|
+
const res1 = await client.get(newUrl, {
|
|
230
|
+
headers: pageHeaders,
|
|
231
|
+
maxRedirects: 0,
|
|
232
|
+
validateStatus: (s: number) => s >= 200 && s < 400,
|
|
233
|
+
});
|
|
234
|
+
if (res1.headers?.location) {
|
|
235
|
+
newUrl = res1.headers.location;
|
|
236
|
+
}
|
|
237
|
+
if (newUrl.includes('googleusercontent')) {
|
|
238
|
+
newUrl = newUrl.split('?link=')[1] || newUrl;
|
|
239
|
+
} else if (newUrl.includes('http')) {
|
|
240
|
+
const res2 = await client.get(newUrl, {
|
|
241
|
+
headers: pageHeaders,
|
|
242
|
+
maxRedirects: 0,
|
|
243
|
+
validateStatus: (s: number) => s >= 200 && s < 400,
|
|
244
|
+
});
|
|
245
|
+
if (res2.headers?.location) {
|
|
246
|
+
const loc2 = res2.headers.location;
|
|
247
|
+
newUrl = loc2.includes('?link=') ? loc2.split('?link=')[1] : loc2;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
} catch {}
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
if (newUrl.includes('?link=')) {
|
|
254
|
+
newUrl = newUrl.split('?link=')[1] || newUrl;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
extractedSources.push({
|
|
258
|
+
url: newUrl,
|
|
259
|
+
server: 'GDrive (download only)',
|
|
260
|
+
quality: pageQuality,
|
|
261
|
+
isM3U8: newUrl.includes('.m3u8'),
|
|
262
|
+
size: fileSize,
|
|
263
|
+
});
|
|
264
|
+
} catch {}
|
|
265
|
+
break;
|
|
266
|
+
|
|
267
|
+
case btnUrl.includes('gofile.io'):
|
|
268
|
+
try {
|
|
269
|
+
const gofileRes = await Gofile(ctx).extract(new PolyURL(btnUrl));
|
|
270
|
+
addGofileSources(gofileRes);
|
|
271
|
+
} catch {}
|
|
272
|
+
break;
|
|
273
|
+
|
|
274
|
+
case btnUrl.includes('cloudflarestorage'):
|
|
275
|
+
extractedSources.push({
|
|
276
|
+
url: btnUrl,
|
|
277
|
+
server: 'CF Storage',
|
|
278
|
+
quality: pageQuality,
|
|
279
|
+
isM3U8: btnUrl.includes('.m3u8'),
|
|
280
|
+
size: fileSize,
|
|
281
|
+
});
|
|
282
|
+
break;
|
|
283
|
+
|
|
284
|
+
case btnUrl.includes('fastdl') || btnUrl.includes('fsl.'):
|
|
285
|
+
extractedSources.push({
|
|
286
|
+
url: btnUrl,
|
|
287
|
+
server: 'FastDl',
|
|
288
|
+
quality: pageQuality,
|
|
289
|
+
isM3U8: btnUrl.includes('.m3u8'),
|
|
290
|
+
size: fileSize,
|
|
291
|
+
});
|
|
292
|
+
break;
|
|
293
|
+
|
|
294
|
+
case btnUrl.includes('hubcdn') && !btnUrl.includes('/?id='):
|
|
295
|
+
extractedSources.push({
|
|
296
|
+
url: btnUrl,
|
|
297
|
+
server: 'HubCdn',
|
|
298
|
+
quality: pageQuality,
|
|
299
|
+
isM3U8: btnUrl.includes('.m3u8'),
|
|
300
|
+
size: fileSize,
|
|
301
|
+
});
|
|
302
|
+
break;
|
|
303
|
+
|
|
304
|
+
default:
|
|
305
|
+
if (
|
|
306
|
+
btnUrl.includes('.m3u8') ||
|
|
307
|
+
btnUrl.includes('.mp4') ||
|
|
308
|
+
btnUrl.includes('.mkv') ||
|
|
309
|
+
btnUrl.includes('?token=')
|
|
310
|
+
) {
|
|
311
|
+
extractedSources.push({
|
|
312
|
+
url: btnUrl,
|
|
313
|
+
server: 'CF Worker',
|
|
314
|
+
quality: pageQuality,
|
|
315
|
+
isM3U8: btnUrl.includes('.m3u8'),
|
|
316
|
+
size: fileSize,
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
break;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
// Sort extracted sources by priority
|
|
324
|
+
const getPriority = (serverName: string = '') => {
|
|
325
|
+
const s = serverName.toLowerCase();
|
|
326
|
+
if (s.includes('cf storage') || s.includes('storage')) return 1;
|
|
327
|
+
if (s.includes('cf worker') || s.includes('worker') || s.includes('fast cloud')) return 2;
|
|
328
|
+
if (s.includes('gofile')) return 3;
|
|
329
|
+
if (s.includes('pixeldrain')) return 4;
|
|
330
|
+
if (s.includes('fastdl') || s.includes('fsl')) return 5;
|
|
331
|
+
if (s.includes('hubcdn')) return 6;
|
|
332
|
+
if (s.includes('gdrive') || s.includes('google')) return 7;
|
|
333
|
+
return 10;
|
|
334
|
+
};
|
|
335
|
+
|
|
336
|
+
extractedSources.sort((a, b) => getPriority(a.server || a.quality) - getPriority(b.server || b.quality));
|
|
337
|
+
|
|
338
|
+
return {
|
|
339
|
+
sources: extractedSources,
|
|
340
|
+
headers: {
|
|
341
|
+
'User-Agent': userAgent,
|
|
342
|
+
'Referer': baseUrl,
|
|
343
|
+
},
|
|
344
|
+
};
|
|
345
|
+
} catch (error) {
|
|
346
|
+
throw new Error(`[HubCloud] Failed to extract: ${(error as Error).message}`);
|
|
347
|
+
}
|
|
348
|
+
};
|
|
349
|
+
|
|
350
|
+
return {
|
|
351
|
+
serverName,
|
|
352
|
+
sources,
|
|
353
|
+
extract,
|
|
354
|
+
};
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
export default HubCloud;
|