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.
Files changed (382) hide show
  1. package/Consumet.podspec +26 -26
  2. package/LICENSE +673 -673
  3. package/README.md +102 -102
  4. package/android/build.gradle +106 -106
  5. package/android/gradle.properties +5 -5
  6. package/android/src/main/AndroidManifest.xml +4 -4
  7. package/android/src/main/AndroidManifestNew.xml +3 -3
  8. package/android/src/main/java/com/consumet/ConsumetModule.kt +63 -63
  9. package/android/src/main/java/com/consumet/ConsumetPackage.kt +33 -33
  10. package/android/src/main/java/com/consumet/DdosGuardModule.kt +213 -213
  11. package/android/src/main/java/com/consumet/DeobfuscatorModule.kt +89 -89
  12. package/android/src/main/java/com/consumet/HttpRequestModule.kt +417 -417
  13. package/ios/Consumet.h +6 -6
  14. package/ios/Consumet.mm +18 -18
  15. package/lib/commonjs/extension-registry.json +60 -64
  16. package/lib/commonjs/extractors/{streamp2p.js → StreamP2P.js} +1 -1
  17. package/lib/commonjs/extractors/StreamP2P.js.map +1 -0
  18. package/lib/commonjs/extractors/asianload.js.map +1 -1
  19. package/lib/commonjs/extractors/filemoon.js.map +1 -1
  20. package/lib/commonjs/extractors/gdflix.js +167 -0
  21. package/lib/commonjs/extractors/gdflix.js.map +1 -0
  22. package/lib/commonjs/extractors/gofile.js +152 -0
  23. package/lib/commonjs/extractors/gofile.js.map +1 -0
  24. package/lib/commonjs/extractors/gogocdn.js.map +1 -1
  25. package/lib/commonjs/extractors/hubcloud.js +320 -0
  26. package/lib/commonjs/extractors/hubcloud.js.map +1 -0
  27. package/lib/commonjs/extractors/index.js +28 -0
  28. package/lib/commonjs/extractors/index.js.map +1 -1
  29. package/lib/commonjs/extractors/kisskh/kkey.js.map +1 -1
  30. package/lib/commonjs/extractors/kisskh/staticdata.js.map +1 -1
  31. package/lib/commonjs/extractors/kwik.js +1 -1
  32. package/lib/commonjs/extractors/kwik.js.map +1 -1
  33. package/lib/commonjs/extractors/megacloud.js.map +1 -1
  34. package/lib/commonjs/extractors/megaplay.js +169 -0
  35. package/lib/commonjs/extractors/megaplay.js.map +1 -0
  36. package/lib/commonjs/extractors/megaup.js.map +1 -1
  37. package/lib/commonjs/extractors/mixdrop.js.map +1 -1
  38. package/lib/commonjs/extractors/mp4player.js.map +1 -1
  39. package/lib/commonjs/extractors/mp4upload.js.map +1 -1
  40. package/lib/commonjs/extractors/rapidcloud.js.map +1 -1
  41. package/lib/commonjs/extractors/streamhub.js.map +1 -1
  42. package/lib/commonjs/extractors/streamlare.js.map +1 -1
  43. package/lib/commonjs/extractors/streamsb.js.map +1 -1
  44. package/lib/commonjs/extractors/streamtape.js.map +1 -1
  45. package/lib/commonjs/extractors/streamwish.js.map +1 -1
  46. package/lib/commonjs/extractors/vidhide.js.map +1 -1
  47. package/lib/commonjs/extractors/vidmoly.js.map +1 -1
  48. package/lib/commonjs/extractors/vizcloud.js.map +1 -1
  49. package/lib/commonjs/extractors/voe.js.map +1 -1
  50. package/lib/commonjs/index.js +24 -0
  51. package/lib/commonjs/index.js.map +1 -1
  52. package/lib/commonjs/models/anime-parser.js.map +1 -1
  53. package/lib/commonjs/models/base-parser.js.map +1 -1
  54. package/lib/commonjs/models/base-provider.js.map +1 -1
  55. package/lib/commonjs/models/base-types.js.map +1 -1
  56. package/lib/commonjs/models/extension-manifest.js.map +1 -1
  57. package/lib/commonjs/models/extractor-context.js.map +1 -1
  58. package/lib/commonjs/models/index.js.map +1 -1
  59. package/lib/commonjs/models/lightnovel-parser.js.map +1 -1
  60. package/lib/commonjs/models/manga-parser.js.map +1 -1
  61. package/lib/commonjs/models/movie-parser.js.map +1 -1
  62. package/lib/commonjs/models/provider-context.js.map +1 -1
  63. package/lib/commonjs/models/types.js +4 -0
  64. package/lib/commonjs/models/types.js.map +1 -1
  65. package/lib/commonjs/models/video-extractor.js.map +1 -1
  66. package/lib/commonjs/providers/anime/anify.js.map +1 -1
  67. package/lib/commonjs/providers/anime/anikoto/anikoto.js +186 -0
  68. package/lib/commonjs/providers/anime/anikoto/anikoto.js.map +1 -0
  69. package/lib/commonjs/providers/anime/anikoto/create-anikoto.js +533 -0
  70. package/lib/commonjs/providers/anime/anikoto/create-anikoto.js.map +1 -0
  71. package/lib/commonjs/providers/anime/animedrive.js.map +1 -1
  72. package/lib/commonjs/providers/anime/animekai/animekai.js.map +1 -1
  73. package/lib/commonjs/providers/anime/animekai/create-animekai.js.map +1 -1
  74. package/lib/commonjs/providers/anime/animepahe/animepahe.js.map +1 -1
  75. package/lib/commonjs/providers/anime/animepahe/create-animepahe.js +2 -2
  76. package/lib/commonjs/providers/anime/animepahe/create-animepahe.js.map +1 -1
  77. package/lib/commonjs/providers/anime/animesuge/animesuge.js.map +1 -1
  78. package/lib/commonjs/providers/anime/animesuge/create-animesuge.js.map +1 -1
  79. package/lib/commonjs/providers/anime/animeunity.js.map +1 -1
  80. package/lib/commonjs/providers/anime/index.js +4 -4
  81. package/lib/commonjs/providers/anime/index.js.map +1 -1
  82. package/lib/commonjs/providers/anime/kickassanime.js.map +1 -1
  83. package/lib/commonjs/providers/anime/marin.js.map +1 -1
  84. package/lib/commonjs/providers/anime/zoro/create-zoro.js.map +1 -1
  85. package/lib/commonjs/providers/anime/zoro/zoro.js.map +1 -1
  86. package/lib/commonjs/providers/index.js.map +1 -1
  87. package/lib/commonjs/providers/light-novels/index.js.map +1 -1
  88. package/lib/commonjs/providers/light-novels/novelupdates.js.map +1 -1
  89. package/lib/commonjs/providers/light-novels/readlightnovels.js.map +1 -1
  90. package/lib/commonjs/providers/manga/asurascans.js.map +1 -1
  91. package/lib/commonjs/providers/manga/brmangas.js.map +1 -1
  92. package/lib/commonjs/providers/manga/comick.js.map +1 -1
  93. package/lib/commonjs/providers/manga/flamescans.js.map +1 -1
  94. package/lib/commonjs/providers/manga/index.js.map +1 -1
  95. package/lib/commonjs/providers/manga/mangadex.js.map +1 -1
  96. package/lib/commonjs/providers/manga/mangahere.js.map +1 -1
  97. package/lib/commonjs/providers/manga/mangahost.js.map +1 -1
  98. package/lib/commonjs/providers/manga/mangakakalot.js.map +1 -1
  99. package/lib/commonjs/providers/manga/mangapark.js.map +1 -1
  100. package/lib/commonjs/providers/manga/mangapill.js.map +1 -1
  101. package/lib/commonjs/providers/manga/mangareader.js.map +1 -1
  102. package/lib/commonjs/providers/manga/mangasee123.js.map +1 -1
  103. package/lib/commonjs/providers/manga/readmanga.js.map +1 -1
  104. package/lib/commonjs/providers/manga/vyvymanga.js.map +1 -1
  105. package/lib/commonjs/providers/meta/anilist.js +2 -2
  106. package/lib/commonjs/providers/meta/anilist.js.map +1 -1
  107. package/lib/commonjs/providers/meta/index.js.map +1 -1
  108. package/lib/commonjs/providers/meta/mal.js.map +1 -1
  109. package/lib/commonjs/providers/meta/tmdb.js.map +1 -1
  110. package/lib/commonjs/providers/movies/dramacool.js.map +1 -1
  111. package/lib/commonjs/providers/movies/himovies/create-himovies.js.map +1 -1
  112. package/lib/commonjs/providers/movies/himovies/himovies.js.map +1 -1
  113. package/lib/commonjs/providers/movies/index.js +18 -1
  114. package/lib/commonjs/providers/movies/index.js.map +1 -1
  115. package/lib/commonjs/providers/movies/multimovies/create-multimovies.js.map +1 -1
  116. package/lib/commonjs/providers/movies/multimovies/multimovies.js.map +1 -1
  117. package/lib/commonjs/providers/movies/multistream/index.js.map +1 -1
  118. package/lib/commonjs/providers/movies/multistream/utils.js.map +1 -1
  119. package/lib/commonjs/providers/movies/netflixmirror/create-netflixmirror.js.map +1 -1
  120. package/lib/commonjs/providers/movies/netflixmirror/netflixmirror.js.map +1 -1
  121. package/lib/commonjs/providers/movies/vegamovies/create-vegamovies.js +812 -0
  122. package/lib/commonjs/providers/movies/vegamovies/create-vegamovies.js.map +1 -0
  123. package/lib/commonjs/providers/movies/vegamovies/vegamovies.js +56 -0
  124. package/lib/commonjs/providers/movies/vegamovies/vegamovies.js.map +1 -0
  125. package/lib/commonjs/providers/movies/yflix/create-yflix.js.map +1 -1
  126. package/lib/commonjs/providers/movies/yflix/yflix.js.map +1 -1
  127. package/lib/commonjs/providers/movies/yflix.js.map +1 -1
  128. package/lib/commonjs/utils/ExtractorManager.js +10 -2
  129. package/lib/commonjs/utils/ExtractorManager.js.map +1 -1
  130. package/lib/commonjs/utils/ProviderManager.js.map +1 -1
  131. package/lib/commonjs/utils/constants.js.map +1 -1
  132. package/lib/commonjs/utils/create-extractor-context.js.map +1 -1
  133. package/lib/commonjs/utils/create-provider-context.js.map +1 -1
  134. package/lib/commonjs/utils/extension-utils.js +11 -2
  135. package/lib/commonjs/utils/extension-utils.js.map +1 -1
  136. package/lib/commonjs/utils/index.js.map +1 -1
  137. package/lib/commonjs/utils/provider-maps.js +5 -2
  138. package/lib/commonjs/utils/provider-maps.js.map +1 -1
  139. package/lib/commonjs/utils/queries.js.map +1 -1
  140. package/lib/commonjs/utils/url-polyfill.js.map +1 -1
  141. package/lib/commonjs/utils/utils.js.map +1 -1
  142. package/lib/module/extension-registry.json +60 -64
  143. package/lib/module/extractors/{streamp2p.js → StreamP2P.js} +1 -1
  144. package/lib/module/extractors/StreamP2P.js.map +1 -0
  145. package/lib/module/extractors/asianload.js.map +1 -1
  146. package/lib/module/extractors/filemoon.js.map +1 -1
  147. package/lib/module/extractors/gdflix.js +162 -0
  148. package/lib/module/extractors/gdflix.js.map +1 -0
  149. package/lib/module/extractors/gofile.js +147 -0
  150. package/lib/module/extractors/gofile.js.map +1 -0
  151. package/lib/module/extractors/gogocdn.js.map +1 -1
  152. package/lib/module/extractors/hubcloud.js +315 -0
  153. package/lib/module/extractors/hubcloud.js.map +1 -0
  154. package/lib/module/extractors/index.js +5 -1
  155. package/lib/module/extractors/index.js.map +1 -1
  156. package/lib/module/extractors/kisskh/kkey.js.map +1 -1
  157. package/lib/module/extractors/kisskh/staticdata.js.map +1 -1
  158. package/lib/module/extractors/kwik.js +1 -1
  159. package/lib/module/extractors/kwik.js.map +1 -1
  160. package/lib/module/extractors/megacloud.js.map +1 -1
  161. package/lib/module/extractors/megaplay.js +163 -0
  162. package/lib/module/extractors/megaplay.js.map +1 -0
  163. package/lib/module/extractors/megaup.js.map +1 -1
  164. package/lib/module/extractors/mixdrop.js.map +1 -1
  165. package/lib/module/extractors/mp4player.js.map +1 -1
  166. package/lib/module/extractors/mp4upload.js.map +1 -1
  167. package/lib/module/extractors/rapidcloud.js.map +1 -1
  168. package/lib/module/extractors/streamhub.js.map +1 -1
  169. package/lib/module/extractors/streamlare.js.map +1 -1
  170. package/lib/module/extractors/streamsb.js.map +1 -1
  171. package/lib/module/extractors/streamtape.js.map +1 -1
  172. package/lib/module/extractors/streamwish.js.map +1 -1
  173. package/lib/module/extractors/vidhide.js.map +1 -1
  174. package/lib/module/extractors/vidmoly.js.map +1 -1
  175. package/lib/module/extractors/vizcloud.js.map +1 -1
  176. package/lib/module/extractors/voe.js.map +1 -1
  177. package/lib/module/index.js +2 -2
  178. package/lib/module/index.js.map +1 -1
  179. package/lib/module/models/anime-parser.js.map +1 -1
  180. package/lib/module/models/base-parser.js.map +1 -1
  181. package/lib/module/models/base-provider.js.map +1 -1
  182. package/lib/module/models/base-types.js.map +1 -1
  183. package/lib/module/models/extension-manifest.js.map +1 -1
  184. package/lib/module/models/extractor-context.js.map +1 -1
  185. package/lib/module/models/index.js.map +1 -1
  186. package/lib/module/models/lightnovel-parser.js.map +1 -1
  187. package/lib/module/models/manga-parser.js.map +1 -1
  188. package/lib/module/models/movie-parser.js.map +1 -1
  189. package/lib/module/models/provider-context.js.map +1 -1
  190. package/lib/module/models/types.js +4 -0
  191. package/lib/module/models/types.js.map +1 -1
  192. package/lib/module/models/video-extractor.js.map +1 -1
  193. package/lib/module/providers/anime/anify.js.map +1 -1
  194. package/lib/module/providers/anime/anikoto/anikoto.js +181 -0
  195. package/lib/module/providers/anime/anikoto/anikoto.js.map +1 -0
  196. package/lib/module/providers/anime/anikoto/create-anikoto.js +529 -0
  197. package/lib/module/providers/anime/anikoto/create-anikoto.js.map +1 -0
  198. package/lib/module/providers/anime/animedrive.js.map +1 -1
  199. package/lib/module/providers/anime/animekai/animekai.js.map +1 -1
  200. package/lib/module/providers/anime/animekai/create-animekai.js.map +1 -1
  201. package/lib/module/providers/anime/animepahe/animepahe.js.map +1 -1
  202. package/lib/module/providers/anime/animepahe/create-animepahe.js +2 -2
  203. package/lib/module/providers/anime/animepahe/create-animepahe.js.map +1 -1
  204. package/lib/module/providers/anime/animesuge/animesuge.js.map +1 -1
  205. package/lib/module/providers/anime/animesuge/create-animesuge.js.map +1 -1
  206. package/lib/module/providers/anime/animeunity.js.map +1 -1
  207. package/lib/module/providers/anime/index.js +4 -4
  208. package/lib/module/providers/anime/index.js.map +1 -1
  209. package/lib/module/providers/anime/kickassanime.js.map +1 -1
  210. package/lib/module/providers/anime/marin.js.map +1 -1
  211. package/lib/module/providers/anime/zoro/create-zoro.js.map +1 -1
  212. package/lib/module/providers/anime/zoro/zoro.js.map +1 -1
  213. package/lib/module/providers/index.js.map +1 -1
  214. package/lib/module/providers/light-novels/index.js.map +1 -1
  215. package/lib/module/providers/light-novels/novelupdates.js.map +1 -1
  216. package/lib/module/providers/light-novels/readlightnovels.js.map +1 -1
  217. package/lib/module/providers/manga/asurascans.js.map +1 -1
  218. package/lib/module/providers/manga/brmangas.js.map +1 -1
  219. package/lib/module/providers/manga/comick.js.map +1 -1
  220. package/lib/module/providers/manga/flamescans.js.map +1 -1
  221. package/lib/module/providers/manga/index.js.map +1 -1
  222. package/lib/module/providers/manga/mangadex.js.map +1 -1
  223. package/lib/module/providers/manga/mangahere.js.map +1 -1
  224. package/lib/module/providers/manga/mangahost.js.map +1 -1
  225. package/lib/module/providers/manga/mangakakalot.js.map +1 -1
  226. package/lib/module/providers/manga/mangapark.js.map +1 -1
  227. package/lib/module/providers/manga/mangapill.js.map +1 -1
  228. package/lib/module/providers/manga/mangareader.js.map +1 -1
  229. package/lib/module/providers/manga/mangasee123.js.map +1 -1
  230. package/lib/module/providers/manga/readmanga.js.map +1 -1
  231. package/lib/module/providers/manga/vyvymanga.js.map +1 -1
  232. package/lib/module/providers/meta/anilist.js +1 -1
  233. package/lib/module/providers/meta/anilist.js.map +1 -1
  234. package/lib/module/providers/meta/index.js.map +1 -1
  235. package/lib/module/providers/meta/mal.js.map +1 -1
  236. package/lib/module/providers/meta/tmdb.js.map +1 -1
  237. package/lib/module/providers/movies/dramacool.js.map +1 -1
  238. package/lib/module/providers/movies/himovies/create-himovies.js.map +1 -1
  239. package/lib/module/providers/movies/himovies/himovies.js.map +1 -1
  240. package/lib/module/providers/movies/index.js +6 -1
  241. package/lib/module/providers/movies/index.js.map +1 -1
  242. package/lib/module/providers/movies/multimovies/create-multimovies.js.map +1 -1
  243. package/lib/module/providers/movies/multimovies/multimovies.js.map +1 -1
  244. package/lib/module/providers/movies/multistream/index.js.map +1 -1
  245. package/lib/module/providers/movies/multistream/utils.js.map +1 -1
  246. package/lib/module/providers/movies/netflixmirror/create-netflixmirror.js.map +1 -1
  247. package/lib/module/providers/movies/netflixmirror/netflixmirror.js.map +1 -1
  248. package/lib/module/providers/movies/vegamovies/create-vegamovies.js +808 -0
  249. package/lib/module/providers/movies/vegamovies/create-vegamovies.js.map +1 -0
  250. package/lib/module/providers/movies/vegamovies/vegamovies.js +47 -0
  251. package/lib/module/providers/movies/vegamovies/vegamovies.js.map +1 -0
  252. package/lib/module/providers/movies/yflix/create-yflix.js.map +1 -1
  253. package/lib/module/providers/movies/yflix/yflix.js.map +1 -1
  254. package/lib/module/providers/movies/yflix.js.map +1 -1
  255. package/lib/module/utils/ExtractorManager.js +10 -2
  256. package/lib/module/utils/ExtractorManager.js.map +1 -1
  257. package/lib/module/utils/ProviderManager.js.map +1 -1
  258. package/lib/module/utils/constants.js.map +1 -1
  259. package/lib/module/utils/create-extractor-context.js.map +1 -1
  260. package/lib/module/utils/create-provider-context.js.map +1 -1
  261. package/lib/module/utils/extension-utils.js +12 -3
  262. package/lib/module/utils/extension-utils.js.map +1 -1
  263. package/lib/module/utils/index.js.map +1 -1
  264. package/lib/module/utils/provider-maps.js +5 -2
  265. package/lib/module/utils/provider-maps.js.map +1 -1
  266. package/lib/module/utils/queries.js.map +1 -1
  267. package/lib/module/utils/url-polyfill.js.map +1 -1
  268. package/lib/module/utils/utils.js.map +1 -1
  269. package/lib/typescript/commonjs/src/extractors/{streamp2p.d.ts → StreamP2P.d.ts} +1 -1
  270. package/lib/typescript/commonjs/src/extractors/{streamp2p.d.ts.map → StreamP2P.d.ts.map} +1 -1
  271. package/lib/typescript/commonjs/src/extractors/gdflix.d.ts +8 -0
  272. package/lib/typescript/commonjs/src/extractors/gdflix.d.ts.map +1 -0
  273. package/lib/typescript/commonjs/src/extractors/gofile.d.ts +8 -0
  274. package/lib/typescript/commonjs/src/extractors/gofile.d.ts.map +1 -0
  275. package/lib/typescript/commonjs/src/extractors/hubcloud.d.ts +8 -0
  276. package/lib/typescript/commonjs/src/extractors/hubcloud.d.ts.map +1 -0
  277. package/lib/typescript/commonjs/src/extractors/index.d.ts +5 -1
  278. package/lib/typescript/commonjs/src/extractors/index.d.ts.map +1 -1
  279. package/lib/typescript/commonjs/src/extractors/megaplay.d.ts +9 -0
  280. package/lib/typescript/commonjs/src/extractors/megaplay.d.ts.map +1 -0
  281. package/lib/typescript/commonjs/src/index.d.ts +2 -2
  282. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  283. package/lib/typescript/commonjs/src/models/provider-context.d.ts +12 -0
  284. package/lib/typescript/commonjs/src/models/provider-context.d.ts.map +1 -1
  285. package/lib/typescript/commonjs/src/models/types.d.ts +9 -1
  286. package/lib/typescript/commonjs/src/models/types.d.ts.map +1 -1
  287. package/lib/typescript/commonjs/src/providers/anime/anikoto/anikoto.d.ts +144 -0
  288. package/lib/typescript/commonjs/src/providers/anime/anikoto/anikoto.d.ts.map +1 -0
  289. package/lib/typescript/{module/src/providers/anime/aniwatchtv/create-aniwatchtv.d.ts → commonjs/src/providers/anime/anikoto/create-anikoto.d.ts} +10 -12
  290. package/lib/typescript/commonjs/src/providers/anime/anikoto/create-anikoto.d.ts.map +1 -0
  291. package/lib/typescript/commonjs/src/providers/anime/index.d.ts +4 -4
  292. package/lib/typescript/commonjs/src/providers/anime/index.d.ts.map +1 -1
  293. package/lib/typescript/commonjs/src/providers/meta/anilist.d.ts.map +1 -1
  294. package/lib/typescript/commonjs/src/providers/movies/index.d.ts +5 -0
  295. package/lib/typescript/commonjs/src/providers/movies/index.d.ts.map +1 -1
  296. package/lib/typescript/commonjs/src/providers/movies/vegamovies/create-vegamovies.d.ts +22 -0
  297. package/lib/typescript/commonjs/src/providers/movies/vegamovies/create-vegamovies.d.ts.map +1 -0
  298. package/lib/typescript/commonjs/src/providers/movies/vegamovies/vegamovies.d.ts +25 -0
  299. package/lib/typescript/commonjs/src/providers/movies/vegamovies/vegamovies.d.ts.map +1 -0
  300. package/lib/typescript/commonjs/src/utils/ExtractorManager.d.ts.map +1 -1
  301. package/lib/typescript/commonjs/src/utils/extension-utils.d.ts +9 -0
  302. package/lib/typescript/commonjs/src/utils/extension-utils.d.ts.map +1 -1
  303. package/lib/typescript/commonjs/src/utils/provider-maps.d.ts +2 -1
  304. package/lib/typescript/commonjs/src/utils/provider-maps.d.ts.map +1 -1
  305. package/lib/typescript/module/src/extractors/{streamp2p.d.ts → StreamP2P.d.ts} +1 -1
  306. package/lib/typescript/module/src/extractors/{streamp2p.d.ts.map → StreamP2P.d.ts.map} +1 -1
  307. package/lib/typescript/module/src/extractors/gdflix.d.ts +8 -0
  308. package/lib/typescript/module/src/extractors/gdflix.d.ts.map +1 -0
  309. package/lib/typescript/module/src/extractors/gofile.d.ts +8 -0
  310. package/lib/typescript/module/src/extractors/gofile.d.ts.map +1 -0
  311. package/lib/typescript/module/src/extractors/hubcloud.d.ts +8 -0
  312. package/lib/typescript/module/src/extractors/hubcloud.d.ts.map +1 -0
  313. package/lib/typescript/module/src/extractors/index.d.ts +5 -1
  314. package/lib/typescript/module/src/extractors/index.d.ts.map +1 -1
  315. package/lib/typescript/module/src/extractors/megaplay.d.ts +9 -0
  316. package/lib/typescript/module/src/extractors/megaplay.d.ts.map +1 -0
  317. package/lib/typescript/module/src/index.d.ts +2 -2
  318. package/lib/typescript/module/src/index.d.ts.map +1 -1
  319. package/lib/typescript/module/src/models/provider-context.d.ts +12 -0
  320. package/lib/typescript/module/src/models/provider-context.d.ts.map +1 -1
  321. package/lib/typescript/module/src/models/types.d.ts +9 -1
  322. package/lib/typescript/module/src/models/types.d.ts.map +1 -1
  323. package/lib/typescript/module/src/providers/anime/anikoto/anikoto.d.ts +144 -0
  324. package/lib/typescript/module/src/providers/anime/anikoto/anikoto.d.ts.map +1 -0
  325. package/lib/typescript/{commonjs/src/providers/anime/aniwatchtv/create-aniwatchtv.d.ts → module/src/providers/anime/anikoto/create-anikoto.d.ts} +10 -12
  326. package/lib/typescript/module/src/providers/anime/anikoto/create-anikoto.d.ts.map +1 -0
  327. package/lib/typescript/module/src/providers/anime/index.d.ts +4 -4
  328. package/lib/typescript/module/src/providers/anime/index.d.ts.map +1 -1
  329. package/lib/typescript/module/src/providers/meta/anilist.d.ts.map +1 -1
  330. package/lib/typescript/module/src/providers/movies/index.d.ts +5 -0
  331. package/lib/typescript/module/src/providers/movies/index.d.ts.map +1 -1
  332. package/lib/typescript/module/src/providers/movies/vegamovies/create-vegamovies.d.ts +22 -0
  333. package/lib/typescript/module/src/providers/movies/vegamovies/create-vegamovies.d.ts.map +1 -0
  334. package/lib/typescript/module/src/providers/movies/vegamovies/vegamovies.d.ts +25 -0
  335. package/lib/typescript/module/src/providers/movies/vegamovies/vegamovies.d.ts.map +1 -0
  336. package/lib/typescript/module/src/utils/ExtractorManager.d.ts.map +1 -1
  337. package/lib/typescript/module/src/utils/extension-utils.d.ts +9 -0
  338. package/lib/typescript/module/src/utils/extension-utils.d.ts.map +1 -1
  339. package/lib/typescript/module/src/utils/provider-maps.d.ts +2 -1
  340. package/lib/typescript/module/src/utils/provider-maps.d.ts.map +1 -1
  341. package/package.json +217 -217
  342. package/react-native.config.js +12 -12
  343. package/src/extension-registry.json +60 -64
  344. package/src/extractors/gdflix.ts +167 -0
  345. package/src/extractors/gofile.ts +182 -0
  346. package/src/extractors/hubcloud.ts +357 -0
  347. package/src/extractors/index.ts +8 -0
  348. package/src/extractors/kwik.ts +1 -1
  349. package/src/extractors/megaplay.ts +182 -0
  350. package/src/index.tsx +8 -0
  351. package/src/models/provider-context.ts +12 -0
  352. package/src/models/types.ts +8 -0
  353. package/src/providers/anime/anikoto/anikoto.ts +215 -0
  354. package/src/providers/anime/anikoto/create-anikoto.ts +637 -0
  355. package/src/providers/anime/animepahe/create-animepahe.ts +2 -2
  356. package/src/providers/anime/index.ts +4 -4
  357. package/src/providers/meta/anilist.ts +1 -1
  358. package/src/providers/movies/index.ts +6 -0
  359. package/src/providers/movies/vegamovies/create-vegamovies.ts +921 -0
  360. package/src/providers/movies/vegamovies/vegamovies.ts +63 -0
  361. package/src/utils/ExtractorManager.ts +7 -1
  362. package/src/utils/extension-utils.ts +13 -0
  363. package/src/utils/provider-maps.ts +5 -2
  364. package/lib/commonjs/extractors/streamp2p.js.map +0 -1
  365. package/lib/commonjs/providers/anime/aniwatchtv/aniwatchtv.js +0 -187
  366. package/lib/commonjs/providers/anime/aniwatchtv/aniwatchtv.js.map +0 -1
  367. package/lib/commonjs/providers/anime/aniwatchtv/create-aniwatchtv.js +0 -572
  368. package/lib/commonjs/providers/anime/aniwatchtv/create-aniwatchtv.js.map +0 -1
  369. package/lib/module/extractors/streamp2p.js.map +0 -1
  370. package/lib/module/providers/anime/aniwatchtv/aniwatchtv.js +0 -184
  371. package/lib/module/providers/anime/aniwatchtv/aniwatchtv.js.map +0 -1
  372. package/lib/module/providers/anime/aniwatchtv/create-aniwatchtv.js +0 -569
  373. package/lib/module/providers/anime/aniwatchtv/create-aniwatchtv.js.map +0 -1
  374. package/lib/typescript/commonjs/src/providers/anime/aniwatchtv/aniwatchtv.d.ts +0 -134
  375. package/lib/typescript/commonjs/src/providers/anime/aniwatchtv/aniwatchtv.d.ts.map +0 -1
  376. package/lib/typescript/commonjs/src/providers/anime/aniwatchtv/create-aniwatchtv.d.ts.map +0 -1
  377. package/lib/typescript/module/src/providers/anime/aniwatchtv/aniwatchtv.d.ts +0 -134
  378. package/lib/typescript/module/src/providers/anime/aniwatchtv/aniwatchtv.d.ts.map +0 -1
  379. package/lib/typescript/module/src/providers/anime/aniwatchtv/create-aniwatchtv.d.ts.map +0 -1
  380. package/src/providers/anime/aniwatchtv/aniwatchtv.ts +0 -198
  381. package/src/providers/anime/aniwatchtv/create-aniwatchtv.ts +0 -632
  382. /package/src/extractors/{streamp2p.ts → StreamP2P.ts} +0 -0
@@ -0,0 +1,808 @@
1
+ "use strict";
2
+
3
+ const cleanTitle = raw => {
4
+ let t = raw;
5
+
6
+ // 1. Remove leading "Download" or "Watch"
7
+ t = t.replace(/^(?:Download|Watch)\s+/i, '');
8
+
9
+ // 2. Truncate at season indicators (e.g. " - Season 1", " (Season 1 – 3)", " Season 1", " S01-S03")
10
+ t = t.replace(/\s*[-–—:]?\s*\(?\b(?:Season\s*\d+|S\d{1,2})\b.*$/i, '');
11
+
12
+ // 3. Truncate at 4-digit year in parentheses e.g. "(2025)", "(1999)"
13
+ t = t.replace(/\s*\(\s*(?:19\d{2}|20\d{2})\s*\).*$/, '');
14
+
15
+ // 4. Truncate at curly braces e.g. "{Hindi-English-Korean}" or "{E110 - Added}"
16
+ t = t.replace(/\s*\{.*?\}$/, '');
17
+
18
+ // 5. Truncate at bracketed metadata e.g. "[S04 E15 Added]", "[320MB]"
19
+ t = t.replace(/\s*\[.*?\]$/, '');
20
+
21
+ // 6. Truncate at quality / release / audio / network tags if still present
22
+ t = t.replace(/\s*[-–—:]?\s*\b(?:Dual[- ]Audio|Multi[- ]Audio|Hindi[- ](?:Dubbed|ORG)|ORG\s+Dubbed|Blu[- ]?Ray|WEB[- ]?DL|HDRip|HDTC|PreDVDRip|CAMRip|DVDRip|Anime\s+Series|K-DRAMA\s+Series|C-Drama\s+Series|Turkish-Drama\s+Series|Netflix[- ]Series|Disney\+|Hotstar|Amazon\s+Prime|IMAX|Extended|Edition|x264|x265|HEVC|10Bit|480p|720p|1080p|2160p|4k)\b.*$/i, '');
23
+
24
+ // 7. Remove any trailing punctuation or leftover dashes/colons/slashes
25
+ return t.replace(/[\r\n\t]+/g, ' ').replace(/\s+/g, ' ').trim().replace(/[-–—:|/]+$/, '').trim();
26
+ };
27
+ export function createVegaMovies(ctx, customBaseURL) {
28
+ const {
29
+ load,
30
+ extractors,
31
+ enums,
32
+ axios,
33
+ createCustomBaseUrl,
34
+ PolyURL,
35
+ USER_AGENT
36
+ } = ctx;
37
+ const {
38
+ HubCloud
39
+ } = extractors;
40
+ const {
41
+ StreamingServers: StreamingServersEnum,
42
+ TvType: TvTypeEnum
43
+ } = enums;
44
+ const baseUrl = createCustomBaseUrl('https://new2.vegamovies.futbol', customBaseURL);
45
+ const config = {
46
+ name: 'VegaMovies',
47
+ languages: 'all',
48
+ classPath: 'MOVIES.VegaMovies',
49
+ logo: `${baseUrl}/images/favicon-32x32.png`,
50
+ baseUrl,
51
+ isNSFW: false,
52
+ isWorking: true
53
+ };
54
+ const defaultHeaders = {
55
+ 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8',
56
+ 'Accept-Language': 'en-US,en;q=0.9',
57
+ 'Cookie': 'xla=s4t',
58
+ 'User-Agent': USER_AGENT || 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36'
59
+ };
60
+ const supportedTypes = new Set([TvTypeEnum.MOVIE, TvTypeEnum.TVSERIES]);
61
+
62
+ /**
63
+ * Parse year from title string
64
+ */
65
+ const extractYear = text => {
66
+ const match = text.match(/\b(19\d{2}|20\d{2})\b/);
67
+ return match ? match[1] : undefined;
68
+ };
69
+
70
+ /**
71
+ * Parse season number from title/text
72
+ */
73
+ const extractSeasonNumber = text => {
74
+ const match = text.match(/season\s*(\d+)|s(\d+)/i);
75
+ if (match) {
76
+ const num = match[1] || match[2];
77
+ if (num) return parseInt(num, 10);
78
+ }
79
+ return 1;
80
+ };
81
+
82
+ /**
83
+ * Helper to parse HTML grid items into IMovieResult list
84
+ */
85
+ const parseHtmlGrid = html => {
86
+ const $ = load(html);
87
+ const results = [];
88
+ const seen = new Set();
89
+ const items = $('.movies-grid, #moviesGridMain, .blog-items, .post-list, #archive-container').children('a, article, .entry-list-item, .poster-card');
90
+ items.each((_, el) => {
91
+ const element = $(el);
92
+ const linkEl = element.is('a') ? element : element.find('a').first();
93
+ const href = linkEl.attr('href') || element.attr('href') || '';
94
+ if (!href || href === '#' || href === '/') return;
95
+ const postUrl = new PolyURL(href, `${config.baseUrl}/`);
96
+ const cleanId = postUrl.pathname.replace(/^\/|\/$/g, '');
97
+ if (!cleanId || seen.has(cleanId)) return;
98
+ seen.add(cleanId);
99
+ const rawTitle = element.find('.poster-title, .entry-title, .post-title').text().trim() || element.find('img').attr('alt') || linkEl.attr('aria-label') || linkEl.attr('title') || '';
100
+ const releaseDate = extractYear(rawTitle);
101
+ const isSeries = /\b(?:season|s\d+|web series|series)\b/i.test(rawTitle) || href.includes('season') || href.includes('series');
102
+ const title = cleanTitle(rawTitle);
103
+ if (!title) return;
104
+ let image = element.find('img').attr('data-lazy-src') || element.find('img').attr('data-src') || element.find('img').attr('src') || '';
105
+ if (image.startsWith('//')) {
106
+ image = `https:${image}`;
107
+ }
108
+ results.push({
109
+ id: cleanId,
110
+ title,
111
+ url: postUrl.href,
112
+ image,
113
+ releaseDate,
114
+ type: isSeries ? TvTypeEnum.TVSERIES : TvTypeEnum.MOVIE
115
+ });
116
+ });
117
+ return results;
118
+ };
119
+
120
+ /**
121
+ * Search for movies/TV shows
122
+ * @param query search query string
123
+ * @param page page number (default 1)
124
+ */
125
+ const search = async (query, page = 1) => {
126
+ const searchResult = {
127
+ currentPage: page,
128
+ hasNextPage: false,
129
+ results: []
130
+ };
131
+
132
+ // Primary: Typesense search.php endpoint
133
+ try {
134
+ const searchUrl = `${config.baseUrl}/search.php?q=${encodeURIComponent(query)}&page=${page}`;
135
+ const {
136
+ data
137
+ } = await axios.get(searchUrl, {
138
+ headers: {
139
+ ...defaultHeaders,
140
+ Referer: config.baseUrl
141
+ }
142
+ });
143
+ if (data && Array.isArray(data.hits) && data.hits.length > 0) {
144
+ const perPage = data.request_params?.per_page || 15;
145
+ const total = typeof data.found === 'number' ? data.found : 0;
146
+ searchResult.hasNextPage = page * perPage < total;
147
+ for (const hit of data.hits) {
148
+ const doc = hit.document;
149
+ if (!doc) continue;
150
+ const permalink = doc.permalink || '';
151
+ const postUrl = new PolyURL(permalink, `${config.baseUrl}/`);
152
+ const cleanId = postUrl.pathname.replace(/^\/|\/$/g, '');
153
+ const rawPostTitle = doc.post_title || '';
154
+ const title = cleanTitle(rawPostTitle);
155
+ const categories = Array.isArray(doc.category) ? doc.category : [];
156
+ const isSeries = categories.some(c => /series/i.test(c)) || /\b(?:season|s\d+|web series|series)\b/i.test(rawPostTitle);
157
+ searchResult.results.push({
158
+ id: cleanId,
159
+ title,
160
+ url: postUrl.href,
161
+ image: doc.post_thumbnail || '',
162
+ releaseDate: extractYear(rawPostTitle) || doc.post_date,
163
+ type: isSeries ? TvTypeEnum.TVSERIES : TvTypeEnum.MOVIE
164
+ });
165
+ }
166
+ return searchResult;
167
+ }
168
+ } catch {
169
+ // Fallback to HTML scraping search
170
+ }
171
+
172
+ // Fallback: WordPress HTML search
173
+ try {
174
+ const fallbackUrl = page === 1 ? `${config.baseUrl}/?s=${encodeURIComponent(query)}` : `${config.baseUrl}/page/${page}/?s=${encodeURIComponent(query)}`;
175
+ const {
176
+ data
177
+ } = await axios.get(fallbackUrl, {
178
+ headers: {
179
+ ...defaultHeaders,
180
+ Referer: config.baseUrl
181
+ }
182
+ });
183
+ const $ = load(data);
184
+ searchResult.results = parseHtmlGrid(data);
185
+ const navSelector = '.pagination, .nav-links';
186
+ searchResult.hasNextPage = $(navSelector).find('.next, a:contains("Next")').length > 0;
187
+ return searchResult;
188
+ } catch (err) {
189
+ throw new Error(err.message);
190
+ }
191
+ };
192
+
193
+ /**
194
+ * Fetch media information (including seasons and episodes)
195
+ * @param mediaId media link or slug ID
196
+ */
197
+ const fetchMediaInfo = async mediaId => {
198
+ let fullUrl = mediaId;
199
+ if (!fullUrl.startsWith('http')) {
200
+ fullUrl = `${config.baseUrl}/${mediaId.replace(/^\//, '')}`;
201
+ }
202
+ const cleanId = fullUrl.replace(/^https?:\/\/[^/]+\//, '').replace(/^\/|\/$/g, '');
203
+ const movieInfo = {
204
+ id: cleanId,
205
+ title: '',
206
+ url: fullUrl
207
+ };
208
+ try {
209
+ const {
210
+ data
211
+ } = await axios.get(fullUrl, {
212
+ headers: {
213
+ ...defaultHeaders,
214
+ Referer: config.baseUrl
215
+ }
216
+ });
217
+ const $ = load(data);
218
+
219
+ // Title extraction
220
+ const rawTitle = $('h1.entry-title').text().trim() || $('meta[property="og:title"]').attr('content') || $('h1').first().text().trim() || '';
221
+ movieInfo.title = cleanTitle((rawTitle.split('|')[0] || '').trim());
222
+
223
+ // Poster image
224
+ let image = $('meta[property="og:image"]').attr('content') || $('.entry-content img[data-lazy-src]').attr('data-lazy-src') || $('.entry-content img[data-src]').attr('data-src') || $('.entry-content img').first().attr('src') || '';
225
+ if (image.startsWith('//')) {
226
+ image = `https:${image}`;
227
+ }
228
+ movieInfo.image = image;
229
+
230
+ // Synopsis / description
231
+ let synopsis = '';
232
+ const synopsisHeader = $('h3, h4, h5').filter((_, el) => /synopsis|plot/i.test($(el).text()));
233
+ if (synopsisHeader.length > 0) {
234
+ synopsis = synopsisHeader.next('p').text().trim();
235
+ }
236
+ if (!synopsis) {
237
+ synopsis = $('meta[property="og:description"]').attr('content')?.trim() || '';
238
+ }
239
+ movieInfo.description = synopsis;
240
+
241
+ // IMDb ID
242
+ const imdbMatch = $('a[href*="imdb.com"]').attr('href')?.match(/tt\d+/) || data.match(/tt\d{7,}/);
243
+ if (imdbMatch?.[0]) {
244
+ movieInfo.imdbId = imdbMatch[0];
245
+ }
246
+
247
+ // Rating
248
+ const ratingText = $('.imdb-score, .starstruck-rating').text();
249
+ const ratingMatch = ratingText.match(/(\d+(?:\.\d+)?)/);
250
+ if (ratingMatch?.[1]) {
251
+ movieInfo.rating = parseFloat(ratingMatch[1]);
252
+ }
253
+
254
+ // Release year
255
+ movieInfo.releaseDate = extractYear(movieInfo.title);
256
+
257
+ // Genres
258
+ movieInfo.genres = $('a[rel="category tag"], .category a').map((_, el) => $(el).text().trim()).get().filter(g => g && !g.includes('1080p') && !g.includes('720p') && !g.includes('480p'));
259
+
260
+ // Determine type
261
+ const pageText = `${movieInfo.title} ${$('.entry-content').text()}`;
262
+ const isSeries = /\b(?:web\s*series|season\s*\d+|s\d+\s*e\d+)\b/i.test(pageText) || $('a:contains("V-Cloud"), a:contains("vcloud")').length > 1;
263
+ movieInfo.type = isSeries ? TvTypeEnum.TVSERIES : TvTypeEnum.MOVIE;
264
+
265
+ // Extract quality blocks and download buttons
266
+ const episodesList = [];
267
+ if (movieInfo.type === TvTypeEnum.TVSERIES) {
268
+ // Collect season intermediate links
269
+
270
+ const seasonPacks = [];
271
+ $('h3, h4, h5, p').each((_, element) => {
272
+ const el = $(element);
273
+ const blockText = el.text().trim();
274
+ if (/season\s*\d+|s\d+/i.test(blockText)) {
275
+ const seasonNum = extractSeasonNumber(blockText);
276
+ let nextP = el.next();
277
+ while (nextP.length && !nextP.is('p') && !nextP.find('a[href]').length) {
278
+ nextP = nextP.next();
279
+ }
280
+
281
+ // Prefer V-Cloud link, avoid Zip / Batch
282
+ let btn = nextP.find('a:contains("V-Cloud"), a:contains("vcloud"), a[href*="vcloud"]').first();
283
+ if (!btn.length) {
284
+ btn = nextP.find('a').filter((_, a) => {
285
+ const txt = $(a).text().toLowerCase();
286
+ const href = ($(a).attr('href') || '').toLowerCase();
287
+ return !txt.includes('zip') && !txt.includes('batch') && !href.includes('zip') && !href.includes('batch');
288
+ }).first();
289
+ }
290
+ const btnHref = btn.attr('href');
291
+ if (btnHref && btnHref.startsWith('http')) {
292
+ seasonPacks.push({
293
+ title: blockText,
294
+ season: seasonNum,
295
+ url: btnHref
296
+ });
297
+ }
298
+ }
299
+ });
300
+ const getPackPriority = t => {
301
+ if (/1080p|2160p|4k/i.test(t)) return 3;
302
+ if (/720p/i.test(t)) return 2;
303
+ if (/480p/i.test(t)) return 1;
304
+ return 0;
305
+ };
306
+
307
+ // Deduplicate season packs: pick highest quality pack per season
308
+ const selectedPacksBySeason = new Map();
309
+ for (const pack of seasonPacks) {
310
+ if (!selectedPacksBySeason.has(pack.season)) {
311
+ selectedPacksBySeason.set(pack.season, pack);
312
+ } else {
313
+ const existing = selectedPacksBySeason.get(pack.season);
314
+ if (getPackPriority(pack.title) > getPackPriority(existing.title)) {
315
+ selectedPacksBySeason.set(pack.season, pack);
316
+ }
317
+ }
318
+ }
319
+
320
+ // Fetch episodes from each season pack's intermediate page
321
+ const packResults = await Promise.allSettled(Array.from(selectedPacksBySeason.values()).map(async pack => {
322
+ const res = await axios.get(pack.url, {
323
+ headers: {
324
+ ...defaultHeaders,
325
+ Referer: fullUrl
326
+ }
327
+ });
328
+ const $ep = load(res.data);
329
+ const eps = [];
330
+ $ep('h3, h4, h5, p').each((_, element) => {
331
+ const el = $ep(element);
332
+ const text = el.text().trim();
333
+ if (/episodes?\s*[:\d\-]/i.test(text) || /e\d{1,3}\b/i.test(text) || /^episode\s*\d+/i.test(text)) {
334
+ const epTitle = text.replace(/\s+/g, ' ').trim().replace(/^[-:\s]+|[-:\s]+$/g, '').replace(/^episodes?\s*:\s*/i, 'Episode ');
335
+ const epNumMatch = epTitle.match(/\b(?:episode|e)\s*(\d+)/i);
336
+ const epNumber = epNumMatch && epNumMatch[1] ? parseInt(epNumMatch[1], 10) : undefined;
337
+ let nextP = el.next();
338
+ while (nextP.length && !nextP.is('p') && !nextP.find('a[href]').length) {
339
+ nextP = nextP.next();
340
+ }
341
+ const link = nextP.find('a[href*="vcloud"]').attr('href') || nextP.find('a[href*="hubcloud"]').attr('href') || nextP.find('a[href*="fastdl"]').attr('href') || nextP.find('.btn-outline').parent().attr('href') || nextP.find('.btn-outline').attr('href') || nextP.find('a[href]').first().attr('href');
342
+ if (link && link.startsWith('http') && !eps.some(e => e.url === link)) {
343
+ eps.push({
344
+ id: link,
345
+ title: epTitle,
346
+ number: epNumber,
347
+ season: pack.season,
348
+ url: link
349
+ });
350
+ }
351
+ }
352
+ });
353
+ return eps;
354
+ }));
355
+ for (const r of packResults) {
356
+ if (r.status === 'fulfilled' && Array.isArray(r.value)) {
357
+ episodesList.push(...r.value);
358
+ }
359
+ }
360
+
361
+ // Fallback: If no episodes resolved from intermediate page, expose season pack links as episodes
362
+ if (episodesList.length === 0 && seasonPacks.length > 0) {
363
+ for (let i = 0; i < seasonPacks.length; i++) {
364
+ const sp = seasonPacks[i];
365
+ if (sp) {
366
+ episodesList.push({
367
+ id: sp.url,
368
+ title: sp.title || `Season ${sp.season}`,
369
+ season: sp.season,
370
+ number: i + 1,
371
+ url: sp.url
372
+ });
373
+ }
374
+ }
375
+ }
376
+ } else {
377
+ // Movie: extract quality options
378
+ let count = 0;
379
+ $('h3, h4, h5, p').each((_, element) => {
380
+ const el = $(element);
381
+ const text = el.text().trim();
382
+ const qualityMatch = text.match(/\d+p\b/i);
383
+ let nextP = el.next();
384
+ while (nextP.length && !nextP.is('p') && !nextP.find('a[href]').length) {
385
+ nextP = nextP.next();
386
+ }
387
+ const btn = nextP.find('a[href*="nexdrive"], a[href*="vcloud"], a[href*="hubcloud"], a[href*="fastdl"]').first().length > 0 ? nextP.find('a[href*="nexdrive"], a[href*="vcloud"], a[href*="hubcloud"], a[href*="fastdl"]').first() : nextP.find('.dwd-button, .btn-outline').first().is('a') ? nextP.find('.dwd-button, .btn-outline').first() : nextP.find('.dwd-button, .btn-outline').first().parent('a');
388
+ const btnHref = btn.attr('href');
389
+ if (btnHref && btnHref.startsWith('http') && !episodesList.some(e => e.url === btnHref)) {
390
+ count++;
391
+ episodesList.push({
392
+ id: btnHref,
393
+ title: text || `${movieInfo.title} ${qualityMatch ? qualityMatch[0] : 'HD'}`,
394
+ number: count,
395
+ season: 1,
396
+ url: btnHref
397
+ });
398
+ }
399
+ });
400
+
401
+ // If no quality blocks found, check for generic download buttons
402
+ if (episodesList.length === 0) {
403
+ $('a[href*="nexdrive.fit"], a[href*="vcloud"], a[href*="hubcloud"]').each((i, el) => {
404
+ const href = $(el).attr('href');
405
+ if (href && href.startsWith('http') && !episodesList.some(e => e.url === href)) {
406
+ episodesList.push({
407
+ id: href,
408
+ title: `${movieInfo.title} Option ${i + 1}`,
409
+ number: i + 1,
410
+ season: 1,
411
+ url: href
412
+ });
413
+ }
414
+ });
415
+ }
416
+ }
417
+
418
+ // Final fallback: at least 1 episode pointing to the media URL
419
+ if (episodesList.length === 0) {
420
+ episodesList.push({
421
+ id: movieInfo.url || fullUrl,
422
+ title: movieInfo.title || 'Movie',
423
+ url: movieInfo.url || fullUrl,
424
+ number: 1,
425
+ season: 1
426
+ });
427
+ }
428
+ movieInfo.episodes = episodesList;
429
+ movieInfo.totalEpisodes = episodesList.length;
430
+ return movieInfo;
431
+ } catch (err) {
432
+ throw new Error(err.message);
433
+ }
434
+ };
435
+
436
+ /**
437
+ * Fetch available servers for a given episode
438
+ * @param episodeId episode URL or intermediate link
439
+ * @param mediaId optional media link or slug
440
+ */
441
+ const fetchEpisodeServers = async (episodeId, mediaId) => {
442
+ const servers = [];
443
+ let resolvedUrl = episodeId;
444
+ if (!resolvedUrl.startsWith('http')) {
445
+ try {
446
+ const info = await fetchMediaInfo(episodeId);
447
+ const firstEp = info.episodes?.[0];
448
+ if (firstEp?.url) {
449
+ resolvedUrl = firstEp.url;
450
+ }
451
+ } catch {}
452
+ }
453
+ if (!resolvedUrl.startsWith('http')) {
454
+ return [{
455
+ name: 'HubCloud',
456
+ url: episodeId
457
+ }];
458
+ }
459
+
460
+ // If already direct V-Cloud / HubCloud link
461
+ if (resolvedUrl.includes('vcloud') || resolvedUrl.includes('hubcloud')) {
462
+ try {
463
+ const hubCloudExtractor = HubCloud(ctx);
464
+ const hubRes = await hubCloudExtractor.extract(new PolyURL(resolvedUrl));
465
+ if (hubRes?.sources && hubRes.sources.length > 0) {
466
+ for (const s of hubRes.sources) {
467
+ const sName = s.server || s.quality || 'HubCloud';
468
+ if (!servers.some(srv => srv.name === sName)) {
469
+ servers.push({
470
+ name: sName,
471
+ url: s.url
472
+ });
473
+ }
474
+ }
475
+ }
476
+ } catch {}
477
+ if (!servers.some(s => s.name.toLowerCase() === 'hubcloud')) {
478
+ servers.push({
479
+ name: 'HubCloud',
480
+ url: resolvedUrl
481
+ });
482
+ }
483
+ return servers;
484
+ }
485
+
486
+ // If intermediate page (e.g. nexdrive.fit)
487
+ try {
488
+ const {
489
+ data
490
+ } = await axios.get(resolvedUrl, {
491
+ headers: {
492
+ ...defaultHeaders,
493
+ Referer: config.baseUrl
494
+ }
495
+ });
496
+ const $ = load(data);
497
+ const vcloudLink = $('a[href*="vcloud"], a[href*="hubcloud"]').attr('href');
498
+ if (vcloudLink) {
499
+ try {
500
+ const hubCloudExtractor = HubCloud(ctx);
501
+ const hubRes = await hubCloudExtractor.extract(new PolyURL(vcloudLink));
502
+ if (hubRes?.sources && hubRes.sources.length > 0) {
503
+ for (const s of hubRes.sources) {
504
+ const sName = s.server || s.quality || 'HubCloud';
505
+ if (!servers.some(srv => srv.name === sName)) {
506
+ servers.push({
507
+ name: sName,
508
+ url: s.url
509
+ });
510
+ }
511
+ }
512
+ }
513
+ } catch {}
514
+ if (!servers.some(s => s.name.toLowerCase() === 'hubcloud')) {
515
+ servers.push({
516
+ name: 'HubCloud',
517
+ url: vcloudLink
518
+ });
519
+ }
520
+ }
521
+ const gdirectLink = $('a[href*="fastdl"], a:contains("G-Direct")').attr('href');
522
+ if (gdirectLink) {
523
+ servers.push({
524
+ name: 'FastDL',
525
+ url: gdirectLink
526
+ });
527
+ }
528
+ const filepressLink = $('a[href*="filebee"], a[href*="filepress"]').attr('href');
529
+ if (filepressLink) {
530
+ servers.push({
531
+ name: 'Filepress',
532
+ url: filepressLink
533
+ });
534
+ }
535
+ } catch {
536
+ // Ignore intermediate page parse error
537
+ }
538
+ if (servers.length === 0) {
539
+ servers.push({
540
+ name: 'HubCloud',
541
+ url: resolvedUrl
542
+ });
543
+ }
544
+ return servers;
545
+ };
546
+
547
+ /**
548
+ * Fetch streaming sources for an episode
549
+ * @param episodeId episode URL (vcloud link, nexdrive intermediate link, or slug)
550
+ * @param mediaId media link or slug (optional)
551
+ * @param server requested server (default HubCloud)
552
+ */
553
+ const fetchEpisodeSources = async (episodeId, mediaId, server = StreamingServersEnum.HubCloud) => {
554
+ let resolvedUrl = episodeId;
555
+
556
+ // If episodeId is not an HTTP URL, resolve via fetchMediaInfo
557
+ if (!resolvedUrl.startsWith('http')) {
558
+ const info = await fetchMediaInfo(episodeId);
559
+ const firstEp = info.episodes?.[0];
560
+ if (firstEp?.url) {
561
+ resolvedUrl = firstEp.url;
562
+ } else {
563
+ throw new Error(`Unable to resolve episode source for ${episodeId}`);
564
+ }
565
+ }
566
+ const epQualityMatch = resolvedUrl.match(/\b(2160p|4k|1080p|720p|480p|360p)\b/i);
567
+ const epQuality = epQualityMatch ? epQualityMatch[1].toLowerCase() === '4k' ? '2160p' : epQualityMatch[1].toLowerCase() : 'auto';
568
+ const extraSources = [];
569
+
570
+ // If not a direct cloud link (e.g. intermediate dotlink / nexdrive page)
571
+ if (!resolvedUrl.includes('cloud')) {
572
+ try {
573
+ const dotlinkRes = await axios.get(resolvedUrl, {
574
+ headers: defaultHeaders
575
+ });
576
+ const dotlinkText = dotlinkRes.data;
577
+
578
+ // Extract vlink (HubCloud / V-Cloud)
579
+ const vlinkMatch = dotlinkText.match(/<a\s+href="([^"]*cloud\.[^"]*)"/i);
580
+ if (vlinkMatch?.[1]) {
581
+ resolvedUrl = vlinkMatch[1];
582
+ }
583
+
584
+ // Extract FastDL direct stream if available
585
+ const fastdlMatch = dotlinkText.match(/<a\s+href="([^"]*fastdl\.[^"]*)"/i);
586
+ if (fastdlMatch?.[1]) {
587
+ try {
588
+ const fdlRes = await axios.get(fastdlMatch[1], {
589
+ headers: {
590
+ ...defaultHeaders,
591
+ Referer: resolvedUrl
592
+ }
593
+ });
594
+ const reurlMatch = fdlRes.data.match(/var\s+reurl\s*=\s*['"]([^'"]+)['"]/);
595
+ if (reurlMatch?.[1]) {
596
+ extraSources.push({
597
+ url: reurlMatch[1],
598
+ server: 'FastDL',
599
+ quality: epQuality,
600
+ isM3U8: false
601
+ });
602
+ }
603
+ } catch {}
604
+ }
605
+
606
+ // Extract Filepress stream if available (as in reference stream.ts)
607
+ try {
608
+ const $ = load(dotlinkText);
609
+ const filepressLink = $('.btn.btn-sm.btn-outline[style*="rgb(252,185,0)"]').parent().attr('href') || $('a[href*="filebee"], a[href*="filepress"]').attr('href');
610
+ if (filepressLink) {
611
+ const filepressID = filepressLink.split('/').filter(Boolean).pop();
612
+ const filepressBaseUrl = filepressLink.split('/').slice(0, 3).join('/');
613
+ const fpRes1 = await axios.post(`${filepressBaseUrl}/api/file/downlaod/`, {
614
+ id: filepressID,
615
+ method: 'indexDownlaod',
616
+ captchaValue: null
617
+ }, {
618
+ headers: {
619
+ 'Content-Type': 'application/json',
620
+ 'Referer': filepressBaseUrl
621
+ }
622
+ });
623
+ if (fpRes1.data?.status && fpRes1.data?.data) {
624
+ const fpToken = fpRes1.data.data;
625
+ const fpRes2 = await axios.post(`${filepressBaseUrl}/api/file/downlaod2/`, {
626
+ id: fpToken,
627
+ method: 'indexDownlaod',
628
+ captchaValue: null
629
+ }, {
630
+ headers: {
631
+ 'Content-Type': 'application/json',
632
+ 'Referer': filepressBaseUrl
633
+ }
634
+ });
635
+ const fpStreamUrl = fpRes2.data?.data?.[0];
636
+ if (fpStreamUrl && fpStreamUrl.startsWith('http')) {
637
+ extraSources.push({
638
+ url: fpStreamUrl,
639
+ server: 'Filepress',
640
+ quality: epQuality,
641
+ isM3U8: false
642
+ });
643
+ }
644
+ }
645
+ }
646
+ } catch {}
647
+ } catch {}
648
+ }
649
+
650
+ // If resolvedUrl is a FastDL link directly
651
+ if (resolvedUrl.includes('fastdl.zip')) {
652
+ try {
653
+ const {
654
+ data
655
+ } = await axios.get(resolvedUrl, {
656
+ headers: {
657
+ ...defaultHeaders,
658
+ Referer: 'https://nexdrive.fit/'
659
+ }
660
+ });
661
+ const reurlMatch = data.match(/var\s+reurl\s*=\s*['"]([^'"]+)['"]/);
662
+ const directUrl = reurlMatch ? reurlMatch[1] : resolvedUrl;
663
+ return {
664
+ headers: {
665
+ Referer: 'https://fastdl.zip/'
666
+ },
667
+ sources: [{
668
+ url: directUrl,
669
+ server: 'FastDL',
670
+ quality: epQuality,
671
+ isM3U8: false
672
+ }, ...extraSources],
673
+ download: directUrl
674
+ };
675
+ } catch {}
676
+ }
677
+
678
+ // HubCloud extraction
679
+ let hubCloudSources = [];
680
+ let hubHeaders = {
681
+ Referer: config.baseUrl
682
+ };
683
+ if (resolvedUrl.includes('cloud')) {
684
+ try {
685
+ const hubCloudExtractor = HubCloud(ctx);
686
+ const hubCloudRes = await hubCloudExtractor.extract(new PolyURL(resolvedUrl));
687
+ if (hubCloudRes?.sources && Array.isArray(hubCloudRes.sources)) {
688
+ hubCloudSources = hubCloudRes.sources.map(s => ({
689
+ ...s,
690
+ server: s.server || s.quality || 'HubCloud',
691
+ quality: s.quality && s.quality !== 'auto' && !/\b(?:server|worker|storage|drain|bot|cloud)\b/i.test(s.quality) ? s.quality : epQuality !== 'auto' ? epQuality : 'auto'
692
+ }));
693
+ if (hubCloudRes.headers) {
694
+ hubHeaders = hubCloudRes.headers;
695
+ }
696
+ }
697
+ } catch {}
698
+ }
699
+ let allSources = [...extraSources, ...hubCloudSources];
700
+
701
+ // Filter or prioritize requested server if specified and not 'hubcloud'
702
+ if (server && server.toLowerCase() !== 'hubcloud') {
703
+ const serverLower = server.toLowerCase();
704
+ const matched = allSources.filter(s => (s.server || '').toLowerCase().includes(serverLower));
705
+ if (matched.length > 0) {
706
+ const others = allSources.filter(s => !(s.server || '').toLowerCase().includes(serverLower));
707
+ allSources = [...matched, ...others];
708
+ }
709
+ }
710
+ if (allSources.length === 0) {
711
+ throw new Error(`[VegaMovies] No streamable video sources found for ${episodeId}`);
712
+ }
713
+ return {
714
+ headers: hubHeaders,
715
+ sources: allSources,
716
+ download: allSources[0]?.url
717
+ };
718
+ };
719
+
720
+ /**
721
+ * Fetch latest releases from homepage
722
+ * @param page page number (default 1)
723
+ */
724
+ const fetchLatest = async (page = 1) => {
725
+ const searchResult = {
726
+ currentPage: page,
727
+ hasNextPage: false,
728
+ results: []
729
+ };
730
+ try {
731
+ const url = page === 1 ? `${config.baseUrl}/` : `${config.baseUrl}/page/${page}/`;
732
+ const {
733
+ data
734
+ } = await axios.get(url, {
735
+ headers: {
736
+ ...defaultHeaders,
737
+ Referer: config.baseUrl
738
+ }
739
+ });
740
+ const $ = load(data);
741
+ searchResult.results = parseHtmlGrid(data);
742
+ const navSelector = '.pagination, .nav-links';
743
+ searchResult.hasNextPage = $(navSelector).find('.next, a:contains("Next")').length > 0;
744
+ return searchResult;
745
+ } catch (err) {
746
+ throw new Error(err.message);
747
+ }
748
+ };
749
+
750
+ /**
751
+ * Fetch recent movies
752
+ */
753
+ const fetchRecentMovies = async (page = 1) => {
754
+ return fetchByFilter('category/movies-by-genres', page);
755
+ };
756
+
757
+ /**
758
+ * Fetch recent TV shows
759
+ */
760
+ const fetchRecentTVShows = async (page = 1) => {
761
+ return fetchByFilter('web-series', page);
762
+ };
763
+
764
+ /**
765
+ * Fetch movies/shows by category filter
766
+ * @param filter path filter (e.g. 'web-series/netflix')
767
+ * @param page page number (default 1)
768
+ */
769
+ const fetchByFilter = async (filter, page = 1) => {
770
+ const searchResult = {
771
+ currentPage: page,
772
+ hasNextPage: false,
773
+ results: []
774
+ };
775
+ try {
776
+ const cleanFilter = filter.replace(/^\/|\/$/g, '');
777
+ const url = page === 1 ? `${config.baseUrl}/${cleanFilter}/` : `${config.baseUrl}/${cleanFilter}/page/${page}/`;
778
+ const {
779
+ data
780
+ } = await axios.get(url, {
781
+ headers: {
782
+ ...defaultHeaders,
783
+ Referer: config.baseUrl
784
+ }
785
+ });
786
+ const $ = load(data);
787
+ searchResult.results = parseHtmlGrid(data);
788
+ const navSelector = '.pagination, .nav-links';
789
+ searchResult.hasNextPage = $(navSelector).find('.next, a:contains("Next")').length > 0;
790
+ return searchResult;
791
+ } catch (err) {
792
+ throw new Error(err.message);
793
+ }
794
+ };
795
+ return {
796
+ ...config,
797
+ supportedTypes,
798
+ search,
799
+ fetchMediaInfo,
800
+ fetchEpisodeServers,
801
+ fetchEpisodeSources,
802
+ fetchLatest,
803
+ fetchRecentMovies,
804
+ fetchRecentTVShows,
805
+ fetchByFilter
806
+ };
807
+ }
808
+ //# sourceMappingURL=create-vegamovies.js.map