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