react-native-consumet 3.0.0 → 4.0.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 (1129) hide show
  1. package/README.md +1 -1
  2. package/android/build.gradle +1 -18
  3. package/android/generated/java/com/consumet/NativeConsumetSpec.java +0 -8
  4. package/android/generated/jni/RNConsumetSpec-generated.cpp +0 -12
  5. package/android/generated/jni/react/renderer/components/RNConsumetSpec/RNConsumetSpecJSI.h +0 -18
  6. package/android/src/androidTest/java/com/consumet/WebViewContractTest.kt +41 -21
  7. package/android/src/main/AndroidManifest.xml +2 -3
  8. package/android/src/main/java/com/consumet/ConsumetModule.kt +0 -11
  9. package/android/src/main/java/com/consumet/DeobfuscatorModule.kt +6 -11
  10. package/android/src/main/java/com/consumet/HttpClients.kt +26 -0
  11. package/android/src/main/java/com/consumet/HttpRequestModule.kt +174 -197
  12. package/android/src/main/java/com/consumet/RequestHeaders.kt +39 -0
  13. package/android/src/main/java/com/consumet/WebViewTask.kt +32 -7
  14. package/ios/Consumet.mm +366 -381
  15. package/ios/RCConsumetSynchronyCache.m +3 -1
  16. package/ios/generated/ReactCodegen/RNConsumetSpec/RNConsumetSpec-generated.mm +0 -14
  17. package/ios/generated/ReactCodegen/RNConsumetSpec/RNConsumetSpec.h +0 -6
  18. package/ios/generated/ReactCodegen/RNConsumetSpecJSI.h +0 -18
  19. package/lib/commonjs/NativeConsumet.ts +44 -45
  20. package/lib/commonjs/extension-registry.json +42 -153
  21. package/lib/commonjs/extension-registry.json.sig +1 -1
  22. package/lib/commonjs/extractors/file-hosts.js +42 -0
  23. package/lib/commonjs/extractors/file-hosts.js.map +1 -0
  24. package/lib/commonjs/extractors/flixcloud.js +25 -60
  25. package/lib/commonjs/extractors/flixcloud.js.map +1 -1
  26. package/lib/commonjs/extractors/gofile.js +85 -96
  27. package/lib/commonjs/extractors/gofile.js.map +1 -1
  28. package/lib/commonjs/extractors/hls.js +46 -0
  29. package/lib/commonjs/extractors/hls.js.map +1 -0
  30. package/lib/commonjs/extractors/hubcloud.js +109 -273
  31. package/lib/commonjs/extractors/hubcloud.js.map +1 -1
  32. package/lib/commonjs/extractors/index.js +4 -116
  33. package/lib/commonjs/extractors/index.js.map +1 -1
  34. package/lib/commonjs/extractors/kwik.js +23 -58
  35. package/lib/commonjs/extractors/kwik.js.map +1 -1
  36. package/lib/commonjs/extractors/megacloud.js +67 -140
  37. package/lib/commonjs/extractors/megacloud.js.map +1 -1
  38. package/lib/commonjs/extractors/megaplay.js +78 -128
  39. package/lib/commonjs/extractors/megaplay.js.map +1 -1
  40. package/lib/commonjs/extractors/packer.js +40 -0
  41. package/lib/commonjs/extractors/packer.js.map +1 -0
  42. package/lib/commonjs/extractors/streamwish.js +47 -103
  43. package/lib/commonjs/extractors/streamwish.js.map +1 -1
  44. package/lib/commonjs/extractors/url.js +11 -0
  45. package/lib/commonjs/extractors/url.js.map +1 -0
  46. package/lib/commonjs/extractors/vidhide.js +32 -59
  47. package/lib/commonjs/extractors/vidhide.js.map +1 -1
  48. package/lib/commonjs/index.js +111 -219
  49. package/lib/commonjs/index.js.map +1 -1
  50. package/lib/commonjs/models/anime-parser.js +4 -17
  51. package/lib/commonjs/models/anime-parser.js.map +1 -1
  52. package/lib/commonjs/models/base-parser.js.map +1 -1
  53. package/lib/commonjs/models/base-provider.js +6 -33
  54. package/lib/commonjs/models/base-provider.js.map +1 -1
  55. package/lib/commonjs/models/index.js +21 -56
  56. package/lib/commonjs/models/index.js.map +1 -1
  57. package/lib/commonjs/models/lightnovel-parser.js.map +1 -1
  58. package/lib/commonjs/models/manga-parser.js.map +1 -1
  59. package/lib/commonjs/models/meta-error.js +4 -1
  60. package/lib/commonjs/models/meta-error.js.map +1 -1
  61. package/lib/commonjs/models/movie-parser.js.map +1 -1
  62. package/lib/commonjs/models/types.js +13 -22
  63. package/lib/commonjs/models/types.js.map +1 -1
  64. package/lib/commonjs/models/video-extractor.js +0 -10
  65. package/lib/commonjs/models/video-extractor.js.map +1 -1
  66. package/lib/commonjs/providers/anime/anikoto/anikoto.js +3 -182
  67. package/lib/commonjs/providers/anime/anikoto/anikoto.js.map +1 -1
  68. package/lib/commonjs/providers/anime/anikoto/create-anikoto.js +258 -440
  69. package/lib/commonjs/providers/anime/anikoto/create-anikoto.js.map +1 -1
  70. package/lib/commonjs/providers/anime/animepahe/animepahe.js +2 -66
  71. package/lib/commonjs/providers/anime/animepahe/animepahe.js.map +1 -1
  72. package/lib/commonjs/providers/anime/animepahe/create-animepahe.js +173 -197
  73. package/lib/commonjs/providers/anime/animepahe/create-animepahe.js.map +1 -1
  74. package/lib/commonjs/providers/anime/anineko/anineko.js +2 -32
  75. package/lib/commonjs/providers/anime/anineko/anineko.js.map +1 -1
  76. package/lib/commonjs/providers/anime/anineko/create-anineko.js +119 -210
  77. package/lib/commonjs/providers/anime/anineko/create-anineko.js.map +1 -1
  78. package/lib/commonjs/providers/anime/helpers.js +16 -0
  79. package/lib/commonjs/providers/anime/helpers.js.map +1 -0
  80. package/lib/commonjs/providers/anime/hianime.js +77 -0
  81. package/lib/commonjs/providers/anime/hianime.js.map +1 -0
  82. package/lib/commonjs/providers/anime/index.js +0 -4
  83. package/lib/commonjs/providers/anime/index.js.map +1 -1
  84. package/lib/commonjs/providers/anime/reanime/create-reanime.js +36 -60
  85. package/lib/commonjs/providers/anime/reanime/create-reanime.js.map +1 -1
  86. package/lib/commonjs/providers/anime/reanime/reanime.js +2 -27
  87. package/lib/commonjs/providers/anime/reanime/reanime.js.map +1 -1
  88. package/lib/commonjs/providers/anime/zoro/create-zoro.js +283 -507
  89. package/lib/commonjs/providers/anime/zoro/create-zoro.js.map +1 -1
  90. package/lib/commonjs/providers/anime/zoro/zoro.js +2 -184
  91. package/lib/commonjs/providers/anime/zoro/zoro.js.map +1 -1
  92. package/lib/commonjs/providers/common/enc-dec.js +9 -0
  93. package/lib/commonjs/providers/common/enc-dec.js.map +1 -0
  94. package/lib/commonjs/providers/common/media-status.js +20 -0
  95. package/lib/commonjs/providers/common/media-status.js.map +1 -0
  96. package/lib/commonjs/providers/common/search.js +15 -0
  97. package/lib/commonjs/providers/common/search.js.map +1 -0
  98. package/lib/commonjs/providers/common/servers.js +39 -0
  99. package/lib/commonjs/providers/common/servers.js.map +1 -0
  100. package/lib/commonjs/providers/index.js +2 -3
  101. package/lib/commonjs/providers/index.js.map +1 -1
  102. package/lib/commonjs/providers/light-novels/novelupdates.js +49 -98
  103. package/lib/commonjs/providers/light-novels/novelupdates.js.map +1 -1
  104. package/lib/commonjs/providers/light-novels/readlightnovels.js +51 -93
  105. package/lib/commonjs/providers/light-novels/readlightnovels.js.map +1 -1
  106. package/lib/commonjs/providers/manga/asurascans.js +14 -49
  107. package/lib/commonjs/providers/manga/asurascans.js.map +1 -1
  108. package/lib/commonjs/providers/manga/flamescans.js +11 -33
  109. package/lib/commonjs/providers/manga/flamescans.js.map +1 -1
  110. package/lib/commonjs/providers/manga/mangadex.js +18 -17
  111. package/lib/commonjs/providers/manga/mangadex.js.map +1 -1
  112. package/lib/commonjs/providers/manga/mangahere.js +107 -169
  113. package/lib/commonjs/providers/manga/mangahere.js.map +1 -1
  114. package/lib/commonjs/providers/manga/mangakakalot.js +26 -56
  115. package/lib/commonjs/providers/manga/mangakakalot.js.map +1 -1
  116. package/lib/commonjs/providers/manga/mangapill.js +82 -120
  117. package/lib/commonjs/providers/manga/mangapill.js.map +1 -1
  118. package/lib/commonjs/providers/manga/shared.js +72 -0
  119. package/lib/commonjs/providers/manga/shared.js.map +1 -0
  120. package/lib/commonjs/providers/meta/anilist-media.js +242 -0
  121. package/lib/commonjs/providers/meta/anilist-media.js.map +1 -0
  122. package/lib/commonjs/providers/meta/anilist.js +420 -838
  123. package/lib/commonjs/providers/meta/anilist.js.map +1 -1
  124. package/lib/commonjs/providers/meta/index.js +2 -2
  125. package/lib/commonjs/providers/meta/index.js.map +1 -1
  126. package/lib/commonjs/providers/meta/mal.js +137 -321
  127. package/lib/commonjs/providers/meta/mal.js.map +1 -1
  128. package/lib/commonjs/providers/meta/shared.js +127 -0
  129. package/lib/commonjs/providers/meta/shared.js.map +1 -0
  130. package/lib/commonjs/providers/meta/tmdb.js +138 -291
  131. package/lib/commonjs/providers/meta/tmdb.js.map +1 -1
  132. package/lib/commonjs/providers/movies/himovies/create-himovies.js +161 -366
  133. package/lib/commonjs/providers/movies/himovies/create-himovies.js.map +1 -1
  134. package/lib/commonjs/providers/movies/himovies/himovies.js +2 -70
  135. package/lib/commonjs/providers/movies/himovies/himovies.js.map +1 -1
  136. package/lib/commonjs/providers/movies/index.js +7 -11
  137. package/lib/commonjs/providers/movies/index.js.map +1 -1
  138. package/lib/commonjs/providers/movies/multimovies/create-multimovies.js +216 -409
  139. package/lib/commonjs/providers/movies/multimovies/create-multimovies.js.map +1 -1
  140. package/lib/commonjs/providers/movies/multimovies/multimovies.js +2 -42
  141. package/lib/commonjs/providers/movies/multimovies/multimovies.js.map +1 -1
  142. package/lib/commonjs/providers/movies/multistream/create-multistream.js +130 -0
  143. package/lib/commonjs/providers/movies/multistream/create-multistream.js.map +1 -0
  144. package/lib/commonjs/providers/movies/multistream/multistream.js +12 -0
  145. package/lib/commonjs/providers/movies/multistream/multistream.js.map +1 -0
  146. package/lib/commonjs/providers/movies/multistream/utils.js +330 -406
  147. package/lib/commonjs/providers/movies/multistream/utils.js.map +1 -1
  148. package/lib/commonjs/providers/movies/netflixmirror/create-netflixmirror.js +27 -6
  149. package/lib/commonjs/providers/movies/netflixmirror/create-netflixmirror.js.map +1 -1
  150. package/lib/commonjs/providers/movies/netflixmirror/netflixmirror.js +6 -15
  151. package/lib/commonjs/providers/movies/netflixmirror/netflixmirror.js.map +1 -1
  152. package/lib/commonjs/providers/movies/site-paths.js +33 -0
  153. package/lib/commonjs/providers/movies/site-paths.js.map +1 -0
  154. package/lib/commonjs/providers/movies/vegamovies/create-vegamovies.js +427 -658
  155. package/lib/commonjs/providers/movies/vegamovies/create-vegamovies.js.map +1 -1
  156. package/lib/commonjs/providers/movies/vegamovies/vegamovies.js +2 -44
  157. package/lib/commonjs/providers/movies/vegamovies/vegamovies.js.map +1 -1
  158. package/lib/commonjs/providers/provider-class.js +28 -0
  159. package/lib/commonjs/providers/provider-class.js.map +1 -0
  160. package/lib/commonjs/registry-signing-keys.json +6 -0
  161. package/lib/commonjs/utils/ExtractorManager.js +83 -221
  162. package/lib/commonjs/utils/ExtractorManager.js.map +1 -1
  163. package/lib/commonjs/utils/ProviderManager.js +93 -243
  164. package/lib/commonjs/utils/ProviderManager.js.map +1 -1
  165. package/lib/commonjs/utils/constants.js +3 -9
  166. package/lib/commonjs/utils/constants.js.map +1 -1
  167. package/lib/commonjs/utils/create-extractor-context.js +29 -17
  168. package/lib/commonjs/utils/create-extractor-context.js.map +1 -1
  169. package/lib/commonjs/utils/create-provider-context.js +32 -98
  170. package/lib/commonjs/utils/create-provider-context.js.map +1 -1
  171. package/lib/commonjs/utils/extension-integrity.js +2 -2
  172. package/lib/commonjs/utils/extension-integrity.js.map +1 -1
  173. package/lib/commonjs/utils/extension-modules.js +151 -33
  174. package/lib/commonjs/utils/extension-modules.js.map +1 -1
  175. package/lib/commonjs/utils/fetch-with-timeout.js +3 -2
  176. package/lib/commonjs/utils/fetch-with-timeout.js.map +1 -1
  177. package/lib/commonjs/utils/meta-http.js +18 -28
  178. package/lib/commonjs/utils/meta-http.js.map +1 -1
  179. package/lib/commonjs/utils/registry-schema.js +47 -14
  180. package/lib/commonjs/utils/registry-schema.js.map +1 -1
  181. package/lib/commonjs/utils/registry-signature-format.js +43 -0
  182. package/lib/commonjs/utils/registry-signature-format.js.map +1 -0
  183. package/lib/commonjs/utils/registry-signature.js +27 -62
  184. package/lib/commonjs/utils/registry-signature.js.map +1 -1
  185. package/lib/commonjs/utils/runtime-modules.js +14 -0
  186. package/lib/commonjs/utils/runtime-modules.js.map +1 -0
  187. package/lib/commonjs/utils/tmdb.js +140 -0
  188. package/lib/commonjs/utils/tmdb.js.map +1 -0
  189. package/lib/commonjs/utils/url-polyfill.js +13 -59
  190. package/lib/commonjs/utils/url-polyfill.js.map +1 -1
  191. package/lib/commonjs/utils/utf8.js +52 -0
  192. package/lib/commonjs/utils/utf8.js.map +1 -0
  193. package/lib/commonjs/utils/utils.js +23 -326
  194. package/lib/commonjs/utils/utils.js.map +1 -1
  195. package/lib/module/NativeConsumet.ts +44 -45
  196. package/lib/module/extension-registry.json +42 -153
  197. package/lib/module/extension-registry.json.sig +1 -1
  198. package/lib/module/extractors/file-hosts.js +32 -0
  199. package/lib/module/extractors/file-hosts.js.map +1 -0
  200. package/lib/module/extractors/flixcloud.js +23 -57
  201. package/lib/module/extractors/flixcloud.js.map +1 -1
  202. package/lib/module/extractors/gofile.js +85 -96
  203. package/lib/module/extractors/gofile.js.map +1 -1
  204. package/lib/module/extractors/hls.js +41 -0
  205. package/lib/module/extractors/hls.js.map +1 -0
  206. package/lib/module/extractors/hubcloud.js +110 -273
  207. package/lib/module/extractors/hubcloud.js.map +1 -1
  208. package/lib/module/extractors/index.js +4 -20
  209. package/lib/module/extractors/index.js.map +1 -1
  210. package/lib/module/extractors/kwik.js +24 -58
  211. package/lib/module/extractors/kwik.js.map +1 -1
  212. package/lib/module/extractors/megacloud.js +68 -140
  213. package/lib/module/extractors/megacloud.js.map +1 -1
  214. package/lib/module/extractors/megaplay.js +78 -128
  215. package/lib/module/extractors/megaplay.js.map +1 -1
  216. package/lib/module/extractors/packer.js +36 -0
  217. package/lib/module/extractors/packer.js.map +1 -0
  218. package/lib/module/extractors/streamwish.js +47 -103
  219. package/lib/module/extractors/streamwish.js.map +1 -1
  220. package/lib/module/extractors/url.js +7 -0
  221. package/lib/module/extractors/url.js.map +1 -0
  222. package/lib/module/extractors/vidhide.js +32 -59
  223. package/lib/module/extractors/vidhide.js.map +1 -1
  224. package/lib/module/index.js +20 -49
  225. package/lib/module/index.js.map +1 -1
  226. package/lib/module/models/anime-parser.js +4 -17
  227. package/lib/module/models/anime-parser.js.map +1 -1
  228. package/lib/module/models/base-parser.js.map +1 -1
  229. package/lib/module/models/base-provider.js +6 -33
  230. package/lib/module/models/base-provider.js.map +1 -1
  231. package/lib/module/models/index.js +8 -10
  232. package/lib/module/models/index.js.map +1 -1
  233. package/lib/module/models/lightnovel-parser.js.map +1 -1
  234. package/lib/module/models/manga-parser.js.map +1 -1
  235. package/lib/module/models/meta-error.js +4 -1
  236. package/lib/module/models/meta-error.js.map +1 -1
  237. package/lib/module/models/movie-parser.js.map +1 -1
  238. package/lib/module/models/types.js +12 -21
  239. package/lib/module/models/types.js.map +1 -1
  240. package/lib/module/models/video-extractor.js +1 -9
  241. package/lib/module/models/video-extractor.js.map +1 -1
  242. package/lib/module/providers/anime/anikoto/anikoto.js +2 -181
  243. package/lib/module/providers/anime/anikoto/anikoto.js.map +1 -1
  244. package/lib/module/providers/anime/anikoto/create-anikoto.js +258 -440
  245. package/lib/module/providers/anime/anikoto/create-anikoto.js.map +1 -1
  246. package/lib/module/providers/anime/animepahe/animepahe.js +2 -66
  247. package/lib/module/providers/anime/animepahe/animepahe.js.map +1 -1
  248. package/lib/module/providers/anime/animepahe/create-animepahe.js +173 -197
  249. package/lib/module/providers/anime/animepahe/create-animepahe.js.map +1 -1
  250. package/lib/module/providers/anime/anineko/anineko.js +2 -31
  251. package/lib/module/providers/anime/anineko/anineko.js.map +1 -1
  252. package/lib/module/providers/anime/anineko/create-anineko.js +119 -210
  253. package/lib/module/providers/anime/anineko/create-anineko.js.map +1 -1
  254. package/lib/module/providers/anime/helpers.js +12 -0
  255. package/lib/module/providers/anime/helpers.js.map +1 -0
  256. package/lib/module/providers/anime/hianime.js +69 -0
  257. package/lib/module/providers/anime/hianime.js.map +1 -0
  258. package/lib/module/providers/anime/index.js +0 -4
  259. package/lib/module/providers/anime/index.js.map +1 -1
  260. package/lib/module/providers/anime/reanime/create-reanime.js +34 -58
  261. package/lib/module/providers/anime/reanime/create-reanime.js.map +1 -1
  262. package/lib/module/providers/anime/reanime/reanime.js +2 -26
  263. package/lib/module/providers/anime/reanime/reanime.js.map +1 -1
  264. package/lib/module/providers/anime/zoro/create-zoro.js +283 -507
  265. package/lib/module/providers/anime/zoro/create-zoro.js.map +1 -1
  266. package/lib/module/providers/anime/zoro/zoro.js +2 -184
  267. package/lib/module/providers/anime/zoro/zoro.js.map +1 -1
  268. package/lib/module/providers/common/enc-dec.js +5 -0
  269. package/lib/module/providers/common/enc-dec.js.map +1 -0
  270. package/lib/module/providers/common/media-status.js +17 -0
  271. package/lib/module/providers/common/media-status.js.map +1 -0
  272. package/lib/module/providers/common/search.js +11 -0
  273. package/lib/module/providers/common/search.js.map +1 -0
  274. package/lib/module/providers/common/servers.js +33 -0
  275. package/lib/module/providers/common/servers.js.map +1 -0
  276. package/lib/module/providers/index.js +5 -6
  277. package/lib/module/providers/index.js.map +1 -1
  278. package/lib/module/providers/light-novels/novelupdates.js +51 -99
  279. package/lib/module/providers/light-novels/novelupdates.js.map +1 -1
  280. package/lib/module/providers/light-novels/readlightnovels.js +52 -93
  281. package/lib/module/providers/light-novels/readlightnovels.js.map +1 -1
  282. package/lib/module/providers/manga/asurascans.js +14 -49
  283. package/lib/module/providers/manga/asurascans.js.map +1 -1
  284. package/lib/module/providers/manga/flamescans.js +12 -34
  285. package/lib/module/providers/manga/flamescans.js.map +1 -1
  286. package/lib/module/providers/manga/mangadex.js +19 -18
  287. package/lib/module/providers/manga/mangadex.js.map +1 -1
  288. package/lib/module/providers/manga/mangahere.js +108 -170
  289. package/lib/module/providers/manga/mangahere.js.map +1 -1
  290. package/lib/module/providers/manga/mangakakalot.js +27 -57
  291. package/lib/module/providers/manga/mangakakalot.js.map +1 -1
  292. package/lib/module/providers/manga/mangapill.js +83 -122
  293. package/lib/module/providers/manga/mangapill.js.map +1 -1
  294. package/lib/module/providers/manga/shared.js +63 -0
  295. package/lib/module/providers/manga/shared.js.map +1 -0
  296. package/lib/module/providers/meta/anilist-media.js +229 -0
  297. package/lib/module/providers/meta/anilist-media.js.map +1 -0
  298. package/lib/module/providers/meta/anilist.js +414 -833
  299. package/lib/module/providers/meta/anilist.js.map +1 -1
  300. package/lib/module/providers/meta/index.js +1 -1
  301. package/lib/module/providers/meta/index.js.map +1 -1
  302. package/lib/module/providers/meta/mal.js +134 -320
  303. package/lib/module/providers/meta/mal.js.map +1 -1
  304. package/lib/module/providers/meta/shared.js +119 -0
  305. package/lib/module/providers/meta/shared.js.map +1 -0
  306. package/lib/module/providers/meta/tmdb.js +136 -290
  307. package/lib/module/providers/meta/tmdb.js.map +1 -1
  308. package/lib/module/providers/movies/himovies/create-himovies.js +161 -366
  309. package/lib/module/providers/movies/himovies/create-himovies.js.map +1 -1
  310. package/lib/module/providers/movies/himovies/himovies.js +2 -70
  311. package/lib/module/providers/movies/himovies/himovies.js.map +1 -1
  312. package/lib/module/providers/movies/index.js +5 -9
  313. package/lib/module/providers/movies/index.js.map +1 -1
  314. package/lib/module/providers/movies/multimovies/create-multimovies.js +217 -409
  315. package/lib/module/providers/movies/multimovies/create-multimovies.js.map +1 -1
  316. package/lib/module/providers/movies/multimovies/multimovies.js +2 -42
  317. package/lib/module/providers/movies/multimovies/multimovies.js.map +1 -1
  318. package/lib/module/providers/movies/multistream/create-multistream.js +127 -0
  319. package/lib/module/providers/movies/multistream/create-multistream.js.map +1 -0
  320. package/lib/module/providers/movies/multistream/multistream.js +9 -0
  321. package/lib/module/providers/movies/multistream/multistream.js.map +1 -0
  322. package/lib/module/providers/movies/multistream/utils.js +325 -397
  323. package/lib/module/providers/movies/multistream/utils.js.map +1 -1
  324. package/lib/module/providers/movies/netflixmirror/create-netflixmirror.js +27 -6
  325. package/lib/module/providers/movies/netflixmirror/create-netflixmirror.js.map +1 -1
  326. package/lib/module/providers/movies/netflixmirror/netflixmirror.js +6 -14
  327. package/lib/module/providers/movies/netflixmirror/netflixmirror.js.map +1 -1
  328. package/lib/module/providers/movies/site-paths.js +27 -0
  329. package/lib/module/providers/movies/site-paths.js.map +1 -0
  330. package/lib/module/providers/movies/vegamovies/create-vegamovies.js +427 -658
  331. package/lib/module/providers/movies/vegamovies/create-vegamovies.js.map +1 -1
  332. package/lib/module/providers/movies/vegamovies/vegamovies.js +2 -44
  333. package/lib/module/providers/movies/vegamovies/vegamovies.js.map +1 -1
  334. package/lib/module/providers/provider-class.js +25 -0
  335. package/lib/module/providers/provider-class.js.map +1 -0
  336. package/lib/module/registry-signing-keys.json +6 -0
  337. package/lib/module/utils/ExtractorManager.js +83 -221
  338. package/lib/module/utils/ExtractorManager.js.map +1 -1
  339. package/lib/module/utils/ProviderManager.js +94 -243
  340. package/lib/module/utils/ProviderManager.js.map +1 -1
  341. package/lib/module/utils/constants.js +2 -8
  342. package/lib/module/utils/constants.js.map +1 -1
  343. package/lib/module/utils/create-extractor-context.js +28 -18
  344. package/lib/module/utils/create-extractor-context.js.map +1 -1
  345. package/lib/module/utils/create-provider-context.js +33 -98
  346. package/lib/module/utils/create-provider-context.js.map +1 -1
  347. package/lib/module/utils/extension-integrity.js +1 -1
  348. package/lib/module/utils/extension-integrity.js.map +1 -1
  349. package/lib/module/utils/extension-modules.js +147 -33
  350. package/lib/module/utils/extension-modules.js.map +1 -1
  351. package/lib/module/utils/fetch-with-timeout.js +3 -2
  352. package/lib/module/utils/fetch-with-timeout.js.map +1 -1
  353. package/lib/module/utils/meta-http.js +17 -26
  354. package/lib/module/utils/meta-http.js.map +1 -1
  355. package/lib/module/utils/registry-schema.js +45 -13
  356. package/lib/module/utils/registry-schema.js.map +1 -1
  357. package/lib/module/utils/registry-signature-format.js +37 -0
  358. package/lib/module/utils/registry-signature-format.js.map +1 -0
  359. package/lib/module/utils/registry-signature.js +23 -58
  360. package/lib/module/utils/registry-signature.js.map +1 -1
  361. package/lib/module/utils/runtime-modules.js +10 -0
  362. package/lib/module/utils/runtime-modules.js.map +1 -0
  363. package/lib/module/utils/tmdb.js +128 -0
  364. package/lib/module/utils/tmdb.js.map +1 -0
  365. package/lib/module/utils/url-polyfill.js +1 -47
  366. package/lib/module/utils/url-polyfill.js.map +1 -1
  367. package/lib/module/utils/utf8.js +45 -0
  368. package/lib/module/utils/utf8.js.map +1 -0
  369. package/lib/module/utils/utils.js +16 -281
  370. package/lib/module/utils/utils.js.map +1 -1
  371. package/lib/typescript/commonjs/src/NativeConsumet.d.ts +38 -72
  372. package/lib/typescript/commonjs/src/NativeConsumet.d.ts.map +1 -1
  373. package/lib/typescript/commonjs/src/extractors/file-hosts.d.ts +18 -0
  374. package/lib/typescript/commonjs/src/extractors/file-hosts.d.ts.map +1 -0
  375. package/lib/typescript/commonjs/src/extractors/flixcloud.d.ts +9 -9
  376. package/lib/typescript/commonjs/src/extractors/flixcloud.d.ts.map +1 -1
  377. package/lib/typescript/commonjs/src/extractors/gofile.d.ts +5 -6
  378. package/lib/typescript/commonjs/src/extractors/gofile.d.ts.map +1 -1
  379. package/lib/typescript/commonjs/src/extractors/hls.d.ts +14 -0
  380. package/lib/typescript/commonjs/src/extractors/hls.d.ts.map +1 -0
  381. package/lib/typescript/commonjs/src/extractors/hubcloud.d.ts +8 -4
  382. package/lib/typescript/commonjs/src/extractors/hubcloud.d.ts.map +1 -1
  383. package/lib/typescript/commonjs/src/extractors/index.d.ts +4 -20
  384. package/lib/typescript/commonjs/src/extractors/index.d.ts.map +1 -1
  385. package/lib/typescript/commonjs/src/extractors/kwik.d.ts +6 -7
  386. package/lib/typescript/commonjs/src/extractors/kwik.d.ts.map +1 -1
  387. package/lib/typescript/commonjs/src/extractors/megacloud.d.ts +7 -5
  388. package/lib/typescript/commonjs/src/extractors/megacloud.d.ts.map +1 -1
  389. package/lib/typescript/commonjs/src/extractors/megaplay.d.ts +6 -7
  390. package/lib/typescript/commonjs/src/extractors/megaplay.d.ts.map +1 -1
  391. package/lib/typescript/commonjs/src/extractors/packer.d.ts +3 -0
  392. package/lib/typescript/commonjs/src/extractors/packer.d.ts.map +1 -0
  393. package/lib/typescript/commonjs/src/extractors/streamwish.d.ts +5 -7
  394. package/lib/typescript/commonjs/src/extractors/streamwish.d.ts.map +1 -1
  395. package/lib/typescript/commonjs/src/extractors/url.d.ts +4 -0
  396. package/lib/typescript/commonjs/src/extractors/url.d.ts.map +1 -0
  397. package/lib/typescript/commonjs/src/extractors/vidhide.d.ts +5 -7
  398. package/lib/typescript/commonjs/src/extractors/vidhide.d.ts.map +1 -1
  399. package/lib/typescript/commonjs/src/index.d.ts +16 -20
  400. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  401. package/lib/typescript/commonjs/src/models/anime-parser.d.ts +10 -21
  402. package/lib/typescript/commonjs/src/models/anime-parser.d.ts.map +1 -1
  403. package/lib/typescript/commonjs/src/models/base-parser.d.ts +0 -5
  404. package/lib/typescript/commonjs/src/models/base-parser.d.ts.map +1 -1
  405. package/lib/typescript/commonjs/src/models/base-provider.d.ts +7 -31
  406. package/lib/typescript/commonjs/src/models/base-provider.d.ts.map +1 -1
  407. package/lib/typescript/commonjs/src/models/extension-manifest.d.ts +3 -1
  408. package/lib/typescript/commonjs/src/models/extension-manifest.d.ts.map +1 -1
  409. package/lib/typescript/commonjs/src/models/extractor-context.d.ts +5 -34
  410. package/lib/typescript/commonjs/src/models/extractor-context.d.ts.map +1 -1
  411. package/lib/typescript/commonjs/src/models/index.d.ts +12 -15
  412. package/lib/typescript/commonjs/src/models/index.d.ts.map +1 -1
  413. package/lib/typescript/commonjs/src/models/lightnovel-parser.d.ts +5 -12
  414. package/lib/typescript/commonjs/src/models/lightnovel-parser.d.ts.map +1 -1
  415. package/lib/typescript/commonjs/src/models/manga-parser.d.ts +2 -10
  416. package/lib/typescript/commonjs/src/models/manga-parser.d.ts.map +1 -1
  417. package/lib/typescript/commonjs/src/models/meta-error.d.ts +5 -2
  418. package/lib/typescript/commonjs/src/models/meta-error.d.ts.map +1 -1
  419. package/lib/typescript/commonjs/src/models/movie-parser.d.ts +8 -24
  420. package/lib/typescript/commonjs/src/models/movie-parser.d.ts.map +1 -1
  421. package/lib/typescript/commonjs/src/models/provider-context.d.ts +11 -138
  422. package/lib/typescript/commonjs/src/models/provider-context.d.ts.map +1 -1
  423. package/lib/typescript/commonjs/src/models/types.d.ts +16 -39
  424. package/lib/typescript/commonjs/src/models/types.d.ts.map +1 -1
  425. package/lib/typescript/commonjs/src/models/video-extractor.d.ts +7 -38
  426. package/lib/typescript/commonjs/src/models/video-extractor.d.ts.map +1 -1
  427. package/lib/typescript/commonjs/src/providers/anime/anikoto/anikoto.d.ts +4 -148
  428. package/lib/typescript/commonjs/src/providers/anime/anikoto/anikoto.d.ts.map +1 -1
  429. package/lib/typescript/commonjs/src/providers/anime/anikoto/create-anikoto.d.ts +2 -2
  430. package/lib/typescript/commonjs/src/providers/anime/anikoto/create-anikoto.d.ts.map +1 -1
  431. package/lib/typescript/commonjs/src/providers/anime/animepahe/animepahe.d.ts +4 -40
  432. package/lib/typescript/commonjs/src/providers/anime/animepahe/animepahe.d.ts.map +1 -1
  433. package/lib/typescript/commonjs/src/providers/anime/animepahe/create-animepahe.d.ts +4 -4
  434. package/lib/typescript/commonjs/src/providers/anime/animepahe/create-animepahe.d.ts.map +1 -1
  435. package/lib/typescript/commonjs/src/providers/anime/anineko/anineko.d.ts +4 -27
  436. package/lib/typescript/commonjs/src/providers/anime/anineko/anineko.d.ts.map +1 -1
  437. package/lib/typescript/commonjs/src/providers/anime/anineko/create-anineko.d.ts +2 -2
  438. package/lib/typescript/commonjs/src/providers/anime/anineko/create-anineko.d.ts.map +1 -1
  439. package/lib/typescript/commonjs/src/providers/anime/helpers.d.ts +6 -0
  440. package/lib/typescript/commonjs/src/providers/anime/helpers.d.ts.map +1 -0
  441. package/lib/typescript/commonjs/src/providers/anime/hianime.d.ts +24 -0
  442. package/lib/typescript/commonjs/src/providers/anime/hianime.d.ts.map +1 -0
  443. package/lib/typescript/commonjs/src/providers/anime/index.d.ts +5 -14
  444. package/lib/typescript/commonjs/src/providers/anime/index.d.ts.map +1 -1
  445. package/lib/typescript/commonjs/src/providers/anime/reanime/create-reanime.d.ts +2 -2
  446. package/lib/typescript/commonjs/src/providers/anime/reanime/create-reanime.d.ts.map +1 -1
  447. package/lib/typescript/commonjs/src/providers/anime/reanime/reanime.d.ts +4 -23
  448. package/lib/typescript/commonjs/src/providers/anime/reanime/reanime.d.ts.map +1 -1
  449. package/lib/typescript/commonjs/src/providers/anime/zoro/create-zoro.d.ts +4 -4
  450. package/lib/typescript/commonjs/src/providers/anime/zoro/create-zoro.d.ts.map +1 -1
  451. package/lib/typescript/commonjs/src/providers/anime/zoro/zoro.d.ts +4 -138
  452. package/lib/typescript/commonjs/src/providers/anime/zoro/zoro.d.ts.map +1 -1
  453. package/lib/typescript/commonjs/src/providers/common/enc-dec.d.ts +3 -0
  454. package/lib/typescript/commonjs/src/providers/common/enc-dec.d.ts.map +1 -0
  455. package/lib/typescript/commonjs/src/providers/common/media-status.d.ts +7 -0
  456. package/lib/typescript/commonjs/src/providers/common/media-status.d.ts.map +1 -0
  457. package/lib/typescript/commonjs/src/providers/common/search.d.ts +4 -0
  458. package/lib/typescript/commonjs/src/providers/common/search.d.ts.map +1 -0
  459. package/lib/typescript/commonjs/src/providers/common/servers.d.ts +16 -0
  460. package/lib/typescript/commonjs/src/providers/common/servers.d.ts.map +1 -0
  461. package/lib/typescript/commonjs/src/providers/index.d.ts +5 -6
  462. package/lib/typescript/commonjs/src/providers/index.d.ts.map +1 -1
  463. package/lib/typescript/commonjs/src/providers/light-novels/novelupdates.d.ts +11 -12
  464. package/lib/typescript/commonjs/src/providers/light-novels/novelupdates.d.ts.map +1 -1
  465. package/lib/typescript/commonjs/src/providers/light-novels/readlightnovels.d.ts +3 -11
  466. package/lib/typescript/commonjs/src/providers/light-novels/readlightnovels.d.ts.map +1 -1
  467. package/lib/typescript/commonjs/src/providers/manga/asurascans.d.ts +1 -5
  468. package/lib/typescript/commonjs/src/providers/manga/asurascans.d.ts.map +1 -1
  469. package/lib/typescript/commonjs/src/providers/manga/flamescans.d.ts +2 -4
  470. package/lib/typescript/commonjs/src/providers/manga/flamescans.d.ts.map +1 -1
  471. package/lib/typescript/commonjs/src/providers/manga/mangadex.d.ts +6 -4
  472. package/lib/typescript/commonjs/src/providers/manga/mangadex.d.ts.map +1 -1
  473. package/lib/typescript/commonjs/src/providers/manga/mangahere.d.ts +4 -4
  474. package/lib/typescript/commonjs/src/providers/manga/mangahere.d.ts.map +1 -1
  475. package/lib/typescript/commonjs/src/providers/manga/mangakakalot.d.ts +4 -13
  476. package/lib/typescript/commonjs/src/providers/manga/mangakakalot.d.ts.map +1 -1
  477. package/lib/typescript/commonjs/src/providers/manga/mangapill.d.ts +1 -8
  478. package/lib/typescript/commonjs/src/providers/manga/mangapill.d.ts.map +1 -1
  479. package/lib/typescript/commonjs/src/providers/manga/shared.d.ts +28 -0
  480. package/lib/typescript/commonjs/src/providers/manga/shared.d.ts.map +1 -0
  481. package/lib/typescript/commonjs/src/providers/meta/anilist-media.d.ts +176 -0
  482. package/lib/typescript/commonjs/src/providers/meta/anilist-media.d.ts.map +1 -0
  483. package/lib/typescript/commonjs/src/providers/meta/anilist.d.ts +80 -128
  484. package/lib/typescript/commonjs/src/providers/meta/anilist.d.ts.map +1 -1
  485. package/lib/typescript/commonjs/src/providers/meta/index.d.ts +1 -2
  486. package/lib/typescript/commonjs/src/providers/meta/index.d.ts.map +1 -1
  487. package/lib/typescript/commonjs/src/providers/meta/mal.d.ts +12 -18
  488. package/lib/typescript/commonjs/src/providers/meta/mal.d.ts.map +1 -1
  489. package/lib/typescript/commonjs/src/providers/meta/shared.d.ts +45 -0
  490. package/lib/typescript/commonjs/src/providers/meta/shared.d.ts.map +1 -0
  491. package/lib/typescript/commonjs/src/providers/meta/tmdb.d.ts +18 -26
  492. package/lib/typescript/commonjs/src/providers/meta/tmdb.d.ts.map +1 -1
  493. package/lib/typescript/commonjs/src/providers/movies/himovies/create-himovies.d.ts +6 -2
  494. package/lib/typescript/commonjs/src/providers/movies/himovies/create-himovies.d.ts.map +1 -1
  495. package/lib/typescript/commonjs/src/providers/movies/himovies/himovies.d.ts +4 -49
  496. package/lib/typescript/commonjs/src/providers/movies/himovies/himovies.d.ts.map +1 -1
  497. package/lib/typescript/commonjs/src/providers/movies/index.d.ts +9 -18
  498. package/lib/typescript/commonjs/src/providers/movies/index.d.ts.map +1 -1
  499. package/lib/typescript/commonjs/src/providers/movies/multimovies/create-multimovies.d.ts +8 -3
  500. package/lib/typescript/commonjs/src/providers/movies/multimovies/create-multimovies.d.ts.map +1 -1
  501. package/lib/typescript/commonjs/src/providers/movies/multimovies/multimovies.d.ts +4 -25
  502. package/lib/typescript/commonjs/src/providers/movies/multimovies/multimovies.d.ts.map +1 -1
  503. package/lib/typescript/commonjs/src/providers/movies/multistream/create-multistream.d.ts +26 -0
  504. package/lib/typescript/commonjs/src/providers/movies/multistream/create-multistream.d.ts.map +1 -0
  505. package/lib/typescript/commonjs/src/providers/movies/multistream/multistream.d.ts +6 -0
  506. package/lib/typescript/commonjs/src/providers/movies/multistream/multistream.d.ts.map +1 -0
  507. package/lib/typescript/commonjs/src/providers/movies/multistream/utils.d.ts +21 -19
  508. package/lib/typescript/commonjs/src/providers/movies/multistream/utils.d.ts.map +1 -1
  509. package/lib/typescript/commonjs/src/providers/movies/netflixmirror/create-netflixmirror.d.ts +40 -8
  510. package/lib/typescript/commonjs/src/providers/movies/netflixmirror/create-netflixmirror.d.ts.map +1 -1
  511. package/lib/typescript/commonjs/src/providers/movies/netflixmirror/netflixmirror.d.ts +8 -11
  512. package/lib/typescript/commonjs/src/providers/movies/netflixmirror/netflixmirror.d.ts.map +1 -1
  513. package/lib/typescript/commonjs/src/providers/movies/site-paths.d.ts +11 -0
  514. package/lib/typescript/commonjs/src/providers/movies/site-paths.d.ts.map +1 -0
  515. package/lib/typescript/commonjs/src/providers/movies/vegamovies/create-vegamovies.d.ts +9 -3
  516. package/lib/typescript/commonjs/src/providers/movies/vegamovies/create-vegamovies.d.ts.map +1 -1
  517. package/lib/typescript/commonjs/src/providers/movies/vegamovies/vegamovies.d.ts +4 -27
  518. package/lib/typescript/commonjs/src/providers/movies/vegamovies/vegamovies.d.ts.map +1 -1
  519. package/lib/typescript/commonjs/src/providers/provider-class.d.ts +23 -0
  520. package/lib/typescript/commonjs/src/providers/provider-class.d.ts.map +1 -0
  521. package/lib/typescript/commonjs/src/utils/ExtractorManager.d.ts +31 -51
  522. package/lib/typescript/commonjs/src/utils/ExtractorManager.d.ts.map +1 -1
  523. package/lib/typescript/commonjs/src/utils/ProviderManager.d.ts +37 -70
  524. package/lib/typescript/commonjs/src/utils/ProviderManager.d.ts.map +1 -1
  525. package/lib/typescript/commonjs/src/utils/constants.d.ts +2 -7
  526. package/lib/typescript/commonjs/src/utils/constants.d.ts.map +1 -1
  527. package/lib/typescript/commonjs/src/utils/create-extractor-context.d.ts +17 -5
  528. package/lib/typescript/commonjs/src/utils/create-extractor-context.d.ts.map +1 -1
  529. package/lib/typescript/commonjs/src/utils/create-provider-context.d.ts +12 -8
  530. package/lib/typescript/commonjs/src/utils/create-provider-context.d.ts.map +1 -1
  531. package/lib/typescript/commonjs/src/utils/extension-integrity.d.ts.map +1 -1
  532. package/lib/typescript/commonjs/src/utils/extension-modules.d.ts +46 -21
  533. package/lib/typescript/commonjs/src/utils/extension-modules.d.ts.map +1 -1
  534. package/lib/typescript/commonjs/src/utils/fetch-with-timeout.d.ts +1 -1
  535. package/lib/typescript/commonjs/src/utils/fetch-with-timeout.d.ts.map +1 -1
  536. package/lib/typescript/commonjs/src/utils/meta-http.d.ts +2 -13
  537. package/lib/typescript/commonjs/src/utils/meta-http.d.ts.map +1 -1
  538. package/lib/typescript/commonjs/src/utils/registry-schema.d.ts +26 -0
  539. package/lib/typescript/commonjs/src/utils/registry-schema.d.ts.map +1 -1
  540. package/lib/typescript/commonjs/src/utils/registry-signature-format.d.ts +15 -0
  541. package/lib/typescript/commonjs/src/utils/registry-signature-format.d.ts.map +1 -0
  542. package/lib/typescript/commonjs/src/utils/registry-signature.d.ts +10 -4
  543. package/lib/typescript/commonjs/src/utils/registry-signature.d.ts.map +1 -1
  544. package/lib/typescript/commonjs/src/utils/runtime-modules.d.ts +8 -0
  545. package/lib/typescript/commonjs/src/utils/runtime-modules.d.ts.map +1 -0
  546. package/lib/typescript/commonjs/src/utils/tmdb.d.ts +71 -0
  547. package/lib/typescript/commonjs/src/utils/tmdb.d.ts.map +1 -0
  548. package/lib/typescript/commonjs/src/utils/url-polyfill.d.ts.map +1 -1
  549. package/lib/typescript/commonjs/src/utils/utf8.d.ts +7 -0
  550. package/lib/typescript/commonjs/src/utils/utf8.d.ts.map +1 -0
  551. package/lib/typescript/commonjs/src/utils/utils.d.ts +12 -36
  552. package/lib/typescript/commonjs/src/utils/utils.d.ts.map +1 -1
  553. package/lib/typescript/module/src/NativeConsumet.d.ts +38 -72
  554. package/lib/typescript/module/src/NativeConsumet.d.ts.map +1 -1
  555. package/lib/typescript/module/src/extractors/file-hosts.d.ts +18 -0
  556. package/lib/typescript/module/src/extractors/file-hosts.d.ts.map +1 -0
  557. package/lib/typescript/module/src/extractors/flixcloud.d.ts +9 -9
  558. package/lib/typescript/module/src/extractors/flixcloud.d.ts.map +1 -1
  559. package/lib/typescript/module/src/extractors/gofile.d.ts +5 -6
  560. package/lib/typescript/module/src/extractors/gofile.d.ts.map +1 -1
  561. package/lib/typescript/module/src/extractors/hls.d.ts +14 -0
  562. package/lib/typescript/module/src/extractors/hls.d.ts.map +1 -0
  563. package/lib/typescript/module/src/extractors/hubcloud.d.ts +8 -4
  564. package/lib/typescript/module/src/extractors/hubcloud.d.ts.map +1 -1
  565. package/lib/typescript/module/src/extractors/index.d.ts +4 -20
  566. package/lib/typescript/module/src/extractors/index.d.ts.map +1 -1
  567. package/lib/typescript/module/src/extractors/kwik.d.ts +6 -7
  568. package/lib/typescript/module/src/extractors/kwik.d.ts.map +1 -1
  569. package/lib/typescript/module/src/extractors/megacloud.d.ts +7 -5
  570. package/lib/typescript/module/src/extractors/megacloud.d.ts.map +1 -1
  571. package/lib/typescript/module/src/extractors/megaplay.d.ts +6 -7
  572. package/lib/typescript/module/src/extractors/megaplay.d.ts.map +1 -1
  573. package/lib/typescript/module/src/extractors/packer.d.ts +3 -0
  574. package/lib/typescript/module/src/extractors/packer.d.ts.map +1 -0
  575. package/lib/typescript/module/src/extractors/streamwish.d.ts +5 -7
  576. package/lib/typescript/module/src/extractors/streamwish.d.ts.map +1 -1
  577. package/lib/typescript/module/src/extractors/url.d.ts +4 -0
  578. package/lib/typescript/module/src/extractors/url.d.ts.map +1 -0
  579. package/lib/typescript/module/src/extractors/vidhide.d.ts +5 -7
  580. package/lib/typescript/module/src/extractors/vidhide.d.ts.map +1 -1
  581. package/lib/typescript/module/src/index.d.ts +16 -20
  582. package/lib/typescript/module/src/index.d.ts.map +1 -1
  583. package/lib/typescript/module/src/models/anime-parser.d.ts +10 -21
  584. package/lib/typescript/module/src/models/anime-parser.d.ts.map +1 -1
  585. package/lib/typescript/module/src/models/base-parser.d.ts +0 -5
  586. package/lib/typescript/module/src/models/base-parser.d.ts.map +1 -1
  587. package/lib/typescript/module/src/models/base-provider.d.ts +7 -31
  588. package/lib/typescript/module/src/models/base-provider.d.ts.map +1 -1
  589. package/lib/typescript/module/src/models/extension-manifest.d.ts +3 -1
  590. package/lib/typescript/module/src/models/extension-manifest.d.ts.map +1 -1
  591. package/lib/typescript/module/src/models/extractor-context.d.ts +5 -34
  592. package/lib/typescript/module/src/models/extractor-context.d.ts.map +1 -1
  593. package/lib/typescript/module/src/models/index.d.ts +12 -15
  594. package/lib/typescript/module/src/models/index.d.ts.map +1 -1
  595. package/lib/typescript/module/src/models/lightnovel-parser.d.ts +5 -12
  596. package/lib/typescript/module/src/models/lightnovel-parser.d.ts.map +1 -1
  597. package/lib/typescript/module/src/models/manga-parser.d.ts +2 -10
  598. package/lib/typescript/module/src/models/manga-parser.d.ts.map +1 -1
  599. package/lib/typescript/module/src/models/meta-error.d.ts +5 -2
  600. package/lib/typescript/module/src/models/meta-error.d.ts.map +1 -1
  601. package/lib/typescript/module/src/models/movie-parser.d.ts +8 -24
  602. package/lib/typescript/module/src/models/movie-parser.d.ts.map +1 -1
  603. package/lib/typescript/module/src/models/provider-context.d.ts +11 -138
  604. package/lib/typescript/module/src/models/provider-context.d.ts.map +1 -1
  605. package/lib/typescript/module/src/models/types.d.ts +16 -39
  606. package/lib/typescript/module/src/models/types.d.ts.map +1 -1
  607. package/lib/typescript/module/src/models/video-extractor.d.ts +7 -38
  608. package/lib/typescript/module/src/models/video-extractor.d.ts.map +1 -1
  609. package/lib/typescript/module/src/providers/anime/anikoto/anikoto.d.ts +4 -148
  610. package/lib/typescript/module/src/providers/anime/anikoto/anikoto.d.ts.map +1 -1
  611. package/lib/typescript/module/src/providers/anime/anikoto/create-anikoto.d.ts +2 -2
  612. package/lib/typescript/module/src/providers/anime/anikoto/create-anikoto.d.ts.map +1 -1
  613. package/lib/typescript/module/src/providers/anime/animepahe/animepahe.d.ts +4 -40
  614. package/lib/typescript/module/src/providers/anime/animepahe/animepahe.d.ts.map +1 -1
  615. package/lib/typescript/module/src/providers/anime/animepahe/create-animepahe.d.ts +4 -4
  616. package/lib/typescript/module/src/providers/anime/animepahe/create-animepahe.d.ts.map +1 -1
  617. package/lib/typescript/module/src/providers/anime/anineko/anineko.d.ts +4 -27
  618. package/lib/typescript/module/src/providers/anime/anineko/anineko.d.ts.map +1 -1
  619. package/lib/typescript/module/src/providers/anime/anineko/create-anineko.d.ts +2 -2
  620. package/lib/typescript/module/src/providers/anime/anineko/create-anineko.d.ts.map +1 -1
  621. package/lib/typescript/module/src/providers/anime/helpers.d.ts +6 -0
  622. package/lib/typescript/module/src/providers/anime/helpers.d.ts.map +1 -0
  623. package/lib/typescript/module/src/providers/anime/hianime.d.ts +24 -0
  624. package/lib/typescript/module/src/providers/anime/hianime.d.ts.map +1 -0
  625. package/lib/typescript/module/src/providers/anime/index.d.ts +5 -14
  626. package/lib/typescript/module/src/providers/anime/index.d.ts.map +1 -1
  627. package/lib/typescript/module/src/providers/anime/reanime/create-reanime.d.ts +2 -2
  628. package/lib/typescript/module/src/providers/anime/reanime/create-reanime.d.ts.map +1 -1
  629. package/lib/typescript/module/src/providers/anime/reanime/reanime.d.ts +4 -23
  630. package/lib/typescript/module/src/providers/anime/reanime/reanime.d.ts.map +1 -1
  631. package/lib/typescript/module/src/providers/anime/zoro/create-zoro.d.ts +4 -4
  632. package/lib/typescript/module/src/providers/anime/zoro/create-zoro.d.ts.map +1 -1
  633. package/lib/typescript/module/src/providers/anime/zoro/zoro.d.ts +4 -138
  634. package/lib/typescript/module/src/providers/anime/zoro/zoro.d.ts.map +1 -1
  635. package/lib/typescript/module/src/providers/common/enc-dec.d.ts +3 -0
  636. package/lib/typescript/module/src/providers/common/enc-dec.d.ts.map +1 -0
  637. package/lib/typescript/module/src/providers/common/media-status.d.ts +7 -0
  638. package/lib/typescript/module/src/providers/common/media-status.d.ts.map +1 -0
  639. package/lib/typescript/module/src/providers/common/search.d.ts +4 -0
  640. package/lib/typescript/module/src/providers/common/search.d.ts.map +1 -0
  641. package/lib/typescript/module/src/providers/common/servers.d.ts +16 -0
  642. package/lib/typescript/module/src/providers/common/servers.d.ts.map +1 -0
  643. package/lib/typescript/module/src/providers/index.d.ts +5 -6
  644. package/lib/typescript/module/src/providers/index.d.ts.map +1 -1
  645. package/lib/typescript/module/src/providers/light-novels/novelupdates.d.ts +11 -12
  646. package/lib/typescript/module/src/providers/light-novels/novelupdates.d.ts.map +1 -1
  647. package/lib/typescript/module/src/providers/light-novels/readlightnovels.d.ts +3 -11
  648. package/lib/typescript/module/src/providers/light-novels/readlightnovels.d.ts.map +1 -1
  649. package/lib/typescript/module/src/providers/manga/asurascans.d.ts +1 -5
  650. package/lib/typescript/module/src/providers/manga/asurascans.d.ts.map +1 -1
  651. package/lib/typescript/module/src/providers/manga/flamescans.d.ts +2 -4
  652. package/lib/typescript/module/src/providers/manga/flamescans.d.ts.map +1 -1
  653. package/lib/typescript/module/src/providers/manga/mangadex.d.ts +6 -4
  654. package/lib/typescript/module/src/providers/manga/mangadex.d.ts.map +1 -1
  655. package/lib/typescript/module/src/providers/manga/mangahere.d.ts +4 -4
  656. package/lib/typescript/module/src/providers/manga/mangahere.d.ts.map +1 -1
  657. package/lib/typescript/module/src/providers/manga/mangakakalot.d.ts +4 -13
  658. package/lib/typescript/module/src/providers/manga/mangakakalot.d.ts.map +1 -1
  659. package/lib/typescript/module/src/providers/manga/mangapill.d.ts +1 -8
  660. package/lib/typescript/module/src/providers/manga/mangapill.d.ts.map +1 -1
  661. package/lib/typescript/module/src/providers/manga/shared.d.ts +28 -0
  662. package/lib/typescript/module/src/providers/manga/shared.d.ts.map +1 -0
  663. package/lib/typescript/module/src/providers/meta/anilist-media.d.ts +176 -0
  664. package/lib/typescript/module/src/providers/meta/anilist-media.d.ts.map +1 -0
  665. package/lib/typescript/module/src/providers/meta/anilist.d.ts +80 -128
  666. package/lib/typescript/module/src/providers/meta/anilist.d.ts.map +1 -1
  667. package/lib/typescript/module/src/providers/meta/index.d.ts +1 -2
  668. package/lib/typescript/module/src/providers/meta/index.d.ts.map +1 -1
  669. package/lib/typescript/module/src/providers/meta/mal.d.ts +12 -18
  670. package/lib/typescript/module/src/providers/meta/mal.d.ts.map +1 -1
  671. package/lib/typescript/module/src/providers/meta/shared.d.ts +45 -0
  672. package/lib/typescript/module/src/providers/meta/shared.d.ts.map +1 -0
  673. package/lib/typescript/module/src/providers/meta/tmdb.d.ts +18 -26
  674. package/lib/typescript/module/src/providers/meta/tmdb.d.ts.map +1 -1
  675. package/lib/typescript/module/src/providers/movies/himovies/create-himovies.d.ts +6 -2
  676. package/lib/typescript/module/src/providers/movies/himovies/create-himovies.d.ts.map +1 -1
  677. package/lib/typescript/module/src/providers/movies/himovies/himovies.d.ts +4 -49
  678. package/lib/typescript/module/src/providers/movies/himovies/himovies.d.ts.map +1 -1
  679. package/lib/typescript/module/src/providers/movies/index.d.ts +9 -18
  680. package/lib/typescript/module/src/providers/movies/index.d.ts.map +1 -1
  681. package/lib/typescript/module/src/providers/movies/multimovies/create-multimovies.d.ts +8 -3
  682. package/lib/typescript/module/src/providers/movies/multimovies/create-multimovies.d.ts.map +1 -1
  683. package/lib/typescript/module/src/providers/movies/multimovies/multimovies.d.ts +4 -25
  684. package/lib/typescript/module/src/providers/movies/multimovies/multimovies.d.ts.map +1 -1
  685. package/lib/typescript/module/src/providers/movies/multistream/create-multistream.d.ts +26 -0
  686. package/lib/typescript/module/src/providers/movies/multistream/create-multistream.d.ts.map +1 -0
  687. package/lib/typescript/module/src/providers/movies/multistream/multistream.d.ts +6 -0
  688. package/lib/typescript/module/src/providers/movies/multistream/multistream.d.ts.map +1 -0
  689. package/lib/typescript/module/src/providers/movies/multistream/utils.d.ts +21 -19
  690. package/lib/typescript/module/src/providers/movies/multistream/utils.d.ts.map +1 -1
  691. package/lib/typescript/module/src/providers/movies/netflixmirror/create-netflixmirror.d.ts +40 -8
  692. package/lib/typescript/module/src/providers/movies/netflixmirror/create-netflixmirror.d.ts.map +1 -1
  693. package/lib/typescript/module/src/providers/movies/netflixmirror/netflixmirror.d.ts +8 -11
  694. package/lib/typescript/module/src/providers/movies/netflixmirror/netflixmirror.d.ts.map +1 -1
  695. package/lib/typescript/module/src/providers/movies/site-paths.d.ts +11 -0
  696. package/lib/typescript/module/src/providers/movies/site-paths.d.ts.map +1 -0
  697. package/lib/typescript/module/src/providers/movies/vegamovies/create-vegamovies.d.ts +9 -3
  698. package/lib/typescript/module/src/providers/movies/vegamovies/create-vegamovies.d.ts.map +1 -1
  699. package/lib/typescript/module/src/providers/movies/vegamovies/vegamovies.d.ts +4 -27
  700. package/lib/typescript/module/src/providers/movies/vegamovies/vegamovies.d.ts.map +1 -1
  701. package/lib/typescript/module/src/providers/provider-class.d.ts +23 -0
  702. package/lib/typescript/module/src/providers/provider-class.d.ts.map +1 -0
  703. package/lib/typescript/module/src/utils/ExtractorManager.d.ts +31 -51
  704. package/lib/typescript/module/src/utils/ExtractorManager.d.ts.map +1 -1
  705. package/lib/typescript/module/src/utils/ProviderManager.d.ts +37 -70
  706. package/lib/typescript/module/src/utils/ProviderManager.d.ts.map +1 -1
  707. package/lib/typescript/module/src/utils/constants.d.ts +2 -7
  708. package/lib/typescript/module/src/utils/constants.d.ts.map +1 -1
  709. package/lib/typescript/module/src/utils/create-extractor-context.d.ts +17 -5
  710. package/lib/typescript/module/src/utils/create-extractor-context.d.ts.map +1 -1
  711. package/lib/typescript/module/src/utils/create-provider-context.d.ts +12 -8
  712. package/lib/typescript/module/src/utils/create-provider-context.d.ts.map +1 -1
  713. package/lib/typescript/module/src/utils/extension-integrity.d.ts.map +1 -1
  714. package/lib/typescript/module/src/utils/extension-modules.d.ts +46 -21
  715. package/lib/typescript/module/src/utils/extension-modules.d.ts.map +1 -1
  716. package/lib/typescript/module/src/utils/fetch-with-timeout.d.ts +1 -1
  717. package/lib/typescript/module/src/utils/fetch-with-timeout.d.ts.map +1 -1
  718. package/lib/typescript/module/src/utils/meta-http.d.ts +2 -13
  719. package/lib/typescript/module/src/utils/meta-http.d.ts.map +1 -1
  720. package/lib/typescript/module/src/utils/registry-schema.d.ts +26 -0
  721. package/lib/typescript/module/src/utils/registry-schema.d.ts.map +1 -1
  722. package/lib/typescript/module/src/utils/registry-signature-format.d.ts +15 -0
  723. package/lib/typescript/module/src/utils/registry-signature-format.d.ts.map +1 -0
  724. package/lib/typescript/module/src/utils/registry-signature.d.ts +10 -4
  725. package/lib/typescript/module/src/utils/registry-signature.d.ts.map +1 -1
  726. package/lib/typescript/module/src/utils/runtime-modules.d.ts +8 -0
  727. package/lib/typescript/module/src/utils/runtime-modules.d.ts.map +1 -0
  728. package/lib/typescript/module/src/utils/tmdb.d.ts +71 -0
  729. package/lib/typescript/module/src/utils/tmdb.d.ts.map +1 -0
  730. package/lib/typescript/module/src/utils/url-polyfill.d.ts.map +1 -1
  731. package/lib/typescript/module/src/utils/utf8.d.ts +7 -0
  732. package/lib/typescript/module/src/utils/utf8.d.ts.map +1 -0
  733. package/lib/typescript/module/src/utils/utils.d.ts +12 -36
  734. package/lib/typescript/module/src/utils/utils.d.ts.map +1 -1
  735. package/package.json +8 -10
  736. package/src/NativeConsumet.ts +44 -45
  737. package/src/extension-registry.json +42 -153
  738. package/src/extension-registry.json.sig +1 -1
  739. package/src/extractors/file-hosts.ts +29 -0
  740. package/src/extractors/flixcloud.ts +23 -53
  741. package/src/extractors/gofile.ts +97 -126
  742. package/src/extractors/hls.ts +43 -0
  743. package/src/extractors/hubcloud.ts +111 -308
  744. package/src/extractors/index.ts +4 -20
  745. package/src/extractors/kwik.ts +27 -79
  746. package/src/extractors/megacloud.ts +50 -153
  747. package/src/extractors/megaplay.ts +77 -147
  748. package/src/extractors/packer.ts +40 -0
  749. package/src/extractors/streamwish.ts +50 -122
  750. package/src/extractors/url.ts +6 -0
  751. package/src/extractors/vidhide.ts +29 -81
  752. package/src/index.tsx +48 -228
  753. package/src/models/anime-parser.ts +12 -21
  754. package/src/models/base-parser.ts +0 -5
  755. package/src/models/base-provider.ts +7 -31
  756. package/src/models/extension-manifest.ts +4 -1
  757. package/src/models/extractor-context.ts +5 -46
  758. package/src/models/index.ts +12 -119
  759. package/src/models/lightnovel-parser.ts +5 -12
  760. package/src/models/manga-parser.ts +2 -10
  761. package/src/models/meta-error.ts +5 -2
  762. package/src/models/movie-parser.ts +9 -24
  763. package/src/models/provider-context.ts +11 -149
  764. package/src/models/types.ts +17 -41
  765. package/src/models/video-extractor.ts +7 -43
  766. package/src/providers/anime/anikoto/anikoto.ts +5 -218
  767. package/src/providers/anime/anikoto/create-anikoto.ts +278 -515
  768. package/src/providers/anime/animepahe/animepahe.ts +5 -78
  769. package/src/providers/anime/animepahe/create-animepahe.ts +179 -219
  770. package/src/providers/anime/anineko/anineko.ts +5 -53
  771. package/src/providers/anime/anineko/create-anineko.ts +103 -199
  772. package/src/providers/anime/helpers.ts +9 -0
  773. package/src/providers/anime/hianime.ts +67 -0
  774. package/src/providers/anime/index.ts +0 -4
  775. package/src/providers/anime/reanime/create-reanime.ts +30 -62
  776. package/src/providers/anime/reanime/reanime.ts +5 -44
  777. package/src/providers/anime/zoro/create-zoro.ts +299 -546
  778. package/src/providers/anime/zoro/zoro.ts +5 -200
  779. package/src/providers/common/enc-dec.ts +2 -0
  780. package/src/providers/common/media-status.ts +20 -0
  781. package/src/providers/common/search.ts +6 -0
  782. package/src/providers/common/servers.ts +36 -0
  783. package/src/providers/index.ts +5 -7
  784. package/src/providers/light-novels/novelupdates.ts +55 -125
  785. package/src/providers/light-novels/readlightnovels.ts +81 -117
  786. package/src/providers/manga/asurascans.ts +15 -57
  787. package/src/providers/manga/flamescans.ts +11 -44
  788. package/src/providers/manga/mangadex.ts +15 -23
  789. package/src/providers/manga/mangahere.ts +112 -188
  790. package/src/providers/manga/mangakakalot.ts +25 -66
  791. package/src/providers/manga/mangapill.ts +105 -149
  792. package/src/providers/manga/shared.ts +71 -0
  793. package/src/providers/meta/anilist-media.ts +230 -0
  794. package/src/providers/meta/anilist.ts +447 -889
  795. package/src/providers/meta/index.ts +1 -1
  796. package/src/providers/meta/mal.ts +154 -414
  797. package/src/providers/meta/shared.ts +129 -0
  798. package/src/providers/meta/tmdb.ts +192 -351
  799. package/src/providers/movies/himovies/create-himovies.ts +176 -442
  800. package/src/providers/movies/himovies/himovies.ts +5 -88
  801. package/src/providers/movies/index.ts +4 -8
  802. package/src/providers/movies/multimovies/create-multimovies.ts +214 -452
  803. package/src/providers/movies/multimovies/multimovies.ts +5 -58
  804. package/src/providers/movies/multistream/create-multistream.ts +141 -0
  805. package/src/providers/movies/multistream/multistream.ts +7 -0
  806. package/src/providers/movies/multistream/utils.ts +234 -410
  807. package/src/providers/movies/netflixmirror/create-netflixmirror.ts +26 -26
  808. package/src/providers/movies/netflixmirror/netflixmirror.ts +9 -15
  809. package/src/providers/movies/site-paths.ts +24 -0
  810. package/src/providers/movies/vegamovies/create-vegamovies.ts +402 -728
  811. package/src/providers/movies/vegamovies/vegamovies.ts +5 -62
  812. package/src/providers/provider-class.ts +39 -0
  813. package/src/registry-signing-keys.json +6 -0
  814. package/src/utils/ExtractorManager.ts +96 -242
  815. package/src/utils/ProviderManager.ts +124 -284
  816. package/src/utils/constants.ts +2 -10
  817. package/src/utils/create-extractor-context.ts +36 -28
  818. package/src/utils/create-provider-context.ts +51 -121
  819. package/src/utils/extension-integrity.ts +1 -2
  820. package/src/utils/extension-modules.ts +150 -43
  821. package/src/utils/fetch-with-timeout.ts +4 -2
  822. package/src/utils/meta-http.ts +20 -27
  823. package/src/utils/registry-schema.ts +46 -14
  824. package/src/utils/registry-signature-format.ts +37 -0
  825. package/src/utils/registry-signature.ts +26 -67
  826. package/src/utils/runtime-modules.ts +7 -0
  827. package/src/utils/tmdb.ts +140 -0
  828. package/src/utils/url-polyfill.ts +2 -46
  829. package/src/utils/utf8.ts +44 -0
  830. package/src/utils/utils.ts +16 -362
  831. package/android/src/main/AndroidManifestNew.xml +0 -3
  832. package/android/src/main/java/com/consumet/DdosGuardModule.kt +0 -179
  833. package/lib/commonjs/extractors/asianload.js +0 -75
  834. package/lib/commonjs/extractors/asianload.js.map +0 -1
  835. package/lib/commonjs/extractors/filemoon.js +0 -66
  836. package/lib/commonjs/extractors/filemoon.js.map +0 -1
  837. package/lib/commonjs/extractors/gdflix.js +0 -165
  838. package/lib/commonjs/extractors/gdflix.js.map +0 -1
  839. package/lib/commonjs/extractors/gogocdn.js +0 -128
  840. package/lib/commonjs/extractors/gogocdn.js.map +0 -1
  841. package/lib/commonjs/extractors/megaup.js +0 -113
  842. package/lib/commonjs/extractors/megaup.js.map +0 -1
  843. package/lib/commonjs/extractors/mixdrop.js +0 -37
  844. package/lib/commonjs/extractors/mixdrop.js.map +0 -1
  845. package/lib/commonjs/extractors/mp4player.js +0 -57
  846. package/lib/commonjs/extractors/mp4player.js.map +0 -1
  847. package/lib/commonjs/extractors/mp4upload.js +0 -38
  848. package/lib/commonjs/extractors/mp4upload.js.map +0 -1
  849. package/lib/commonjs/extractors/rapidcloud.js +0 -180
  850. package/lib/commonjs/extractors/rapidcloud.js.map +0 -1
  851. package/lib/commonjs/extractors/streamhub.js +0 -61
  852. package/lib/commonjs/extractors/streamhub.js.map +0 -1
  853. package/lib/commonjs/extractors/streamlare.js +0 -55
  854. package/lib/commonjs/extractors/streamlare.js.map +0 -1
  855. package/lib/commonjs/extractors/streamsb.js +0 -69
  856. package/lib/commonjs/extractors/streamsb.js.map +0 -1
  857. package/lib/commonjs/extractors/streamtape.js +0 -42
  858. package/lib/commonjs/extractors/streamtape.js.map +0 -1
  859. package/lib/commonjs/extractors/vidmoly.js +0 -54
  860. package/lib/commonjs/extractors/vidmoly.js.map +0 -1
  861. package/lib/commonjs/extractors/vizcloud.js +0 -67
  862. package/lib/commonjs/extractors/vizcloud.js.map +0 -1
  863. package/lib/commonjs/extractors/voe.js +0 -100
  864. package/lib/commonjs/extractors/voe.js.map +0 -1
  865. package/lib/commonjs/models/base-types.js +0 -2
  866. package/lib/commonjs/models/base-types.js.map +0 -1
  867. package/lib/commonjs/providers/anime/animekai/animekai.js +0 -118
  868. package/lib/commonjs/providers/anime/animekai/animekai.js.map +0 -1
  869. package/lib/commonjs/providers/anime/animekai/create-animekai.js +0 -518
  870. package/lib/commonjs/providers/anime/animekai/create-animekai.js.map +0 -1
  871. package/lib/commonjs/providers/anime/animeunity.js +0 -187
  872. package/lib/commonjs/providers/anime/animeunity.js.map +0 -1
  873. package/lib/commonjs/providers/meta/tmdb-api-key.js +0 -29
  874. package/lib/commonjs/providers/meta/tmdb-api-key.js.map +0 -1
  875. package/lib/commonjs/providers/movies/multistream/index.js +0 -222
  876. package/lib/commonjs/providers/movies/multistream/index.js.map +0 -1
  877. package/lib/commonjs/providers/movies/netflixmirror/disneymirror.js +0 -22
  878. package/lib/commonjs/providers/movies/netflixmirror/disneymirror.js.map +0 -1
  879. package/lib/commonjs/providers/movies/netflixmirror/netmirror-parser.js +0 -30
  880. package/lib/commonjs/providers/movies/netflixmirror/netmirror-parser.js.map +0 -1
  881. package/lib/commonjs/providers/movies/netflixmirror/primemirror.js +0 -22
  882. package/lib/commonjs/providers/movies/netflixmirror/primemirror.js.map +0 -1
  883. package/lib/commonjs/providers/movies/yflix/create-yflix.js +0 -418
  884. package/lib/commonjs/providers/movies/yflix/create-yflix.js.map +0 -1
  885. package/lib/commonjs/providers/movies/yflix/yflix.js +0 -66
  886. package/lib/commonjs/providers/movies/yflix/yflix.js.map +0 -1
  887. package/lib/commonjs/providers/provider-args.js +0 -17
  888. package/lib/commonjs/providers/provider-args.js.map +0 -1
  889. package/lib/commonjs/registry-signing-keys.js +0 -26
  890. package/lib/commonjs/registry-signing-keys.js.map +0 -1
  891. package/lib/commonjs/utils/extension-utils.js +0 -105
  892. package/lib/commonjs/utils/extension-utils.js.map +0 -1
  893. package/lib/commonjs/utils/index.js +0 -312
  894. package/lib/commonjs/utils/index.js.map +0 -1
  895. package/lib/commonjs/utils/provider-maps.js +0 -69
  896. package/lib/commonjs/utils/provider-maps.js.map +0 -1
  897. package/lib/commonjs/utils/queries.js +0 -45
  898. package/lib/commonjs/utils/queries.js.map +0 -1
  899. package/lib/module/extractors/asianload.js +0 -69
  900. package/lib/module/extractors/asianload.js.map +0 -1
  901. package/lib/module/extractors/filemoon.js +0 -62
  902. package/lib/module/extractors/filemoon.js.map +0 -1
  903. package/lib/module/extractors/gdflix.js +0 -161
  904. package/lib/module/extractors/gdflix.js.map +0 -1
  905. package/lib/module/extractors/gogocdn.js +0 -122
  906. package/lib/module/extractors/gogocdn.js.map +0 -1
  907. package/lib/module/extractors/megaup.js +0 -109
  908. package/lib/module/extractors/megaup.js.map +0 -1
  909. package/lib/module/extractors/mixdrop.js +0 -32
  910. package/lib/module/extractors/mixdrop.js.map +0 -1
  911. package/lib/module/extractors/mp4player.js +0 -52
  912. package/lib/module/extractors/mp4player.js.map +0 -1
  913. package/lib/module/extractors/mp4upload.js +0 -33
  914. package/lib/module/extractors/mp4upload.js.map +0 -1
  915. package/lib/module/extractors/rapidcloud.js +0 -174
  916. package/lib/module/extractors/rapidcloud.js.map +0 -1
  917. package/lib/module/extractors/streamhub.js +0 -56
  918. package/lib/module/extractors/streamhub.js.map +0 -1
  919. package/lib/module/extractors/streamlare.js +0 -50
  920. package/lib/module/extractors/streamlare.js.map +0 -1
  921. package/lib/module/extractors/streamsb.js +0 -64
  922. package/lib/module/extractors/streamsb.js.map +0 -1
  923. package/lib/module/extractors/streamtape.js +0 -37
  924. package/lib/module/extractors/streamtape.js.map +0 -1
  925. package/lib/module/extractors/vidmoly.js +0 -49
  926. package/lib/module/extractors/vidmoly.js.map +0 -1
  927. package/lib/module/extractors/vizcloud.js +0 -62
  928. package/lib/module/extractors/vizcloud.js.map +0 -1
  929. package/lib/module/extractors/voe.js +0 -95
  930. package/lib/module/extractors/voe.js.map +0 -1
  931. package/lib/module/models/base-types.js +0 -2
  932. package/lib/module/models/base-types.js.map +0 -1
  933. package/lib/module/providers/anime/animekai/animekai.js +0 -113
  934. package/lib/module/providers/anime/animekai/animekai.js.map +0 -1
  935. package/lib/module/providers/anime/animekai/create-animekai.js +0 -514
  936. package/lib/module/providers/anime/animekai/create-animekai.js.map +0 -1
  937. package/lib/module/providers/anime/animeunity.js +0 -183
  938. package/lib/module/providers/anime/animeunity.js.map +0 -1
  939. package/lib/module/providers/meta/tmdb-api-key.js +0 -24
  940. package/lib/module/providers/meta/tmdb-api-key.js.map +0 -1
  941. package/lib/module/providers/movies/multistream/index.js +0 -217
  942. package/lib/module/providers/movies/multistream/index.js.map +0 -1
  943. package/lib/module/providers/movies/netflixmirror/disneymirror.js +0 -17
  944. package/lib/module/providers/movies/netflixmirror/disneymirror.js.map +0 -1
  945. package/lib/module/providers/movies/netflixmirror/netmirror-parser.js +0 -25
  946. package/lib/module/providers/movies/netflixmirror/netmirror-parser.js.map +0 -1
  947. package/lib/module/providers/movies/netflixmirror/primemirror.js +0 -17
  948. package/lib/module/providers/movies/netflixmirror/primemirror.js.map +0 -1
  949. package/lib/module/providers/movies/yflix/create-yflix.js +0 -414
  950. package/lib/module/providers/movies/yflix/create-yflix.js.map +0 -1
  951. package/lib/module/providers/movies/yflix/yflix.js +0 -61
  952. package/lib/module/providers/movies/yflix/yflix.js.map +0 -1
  953. package/lib/module/providers/provider-args.js +0 -14
  954. package/lib/module/providers/provider-args.js.map +0 -1
  955. package/lib/module/registry-signing-keys.js +0 -22
  956. package/lib/module/registry-signing-keys.js.map +0 -1
  957. package/lib/module/utils/extension-utils.js +0 -100
  958. package/lib/module/utils/extension-utils.js.map +0 -1
  959. package/lib/module/utils/index.js +0 -21
  960. package/lib/module/utils/index.js.map +0 -1
  961. package/lib/module/utils/provider-maps.js +0 -65
  962. package/lib/module/utils/provider-maps.js.map +0 -1
  963. package/lib/module/utils/queries.js +0 -29
  964. package/lib/module/utils/queries.js.map +0 -1
  965. package/lib/typescript/commonjs/src/extractors/asianload.d.ts +0 -17
  966. package/lib/typescript/commonjs/src/extractors/asianload.d.ts.map +0 -1
  967. package/lib/typescript/commonjs/src/extractors/filemoon.d.ts +0 -14
  968. package/lib/typescript/commonjs/src/extractors/filemoon.d.ts.map +0 -1
  969. package/lib/typescript/commonjs/src/extractors/gdflix.d.ts +0 -7
  970. package/lib/typescript/commonjs/src/extractors/gdflix.d.ts.map +0 -1
  971. package/lib/typescript/commonjs/src/extractors/gogocdn.d.ts +0 -19
  972. package/lib/typescript/commonjs/src/extractors/gogocdn.d.ts.map +0 -1
  973. package/lib/typescript/commonjs/src/extractors/megaup.d.ts +0 -6
  974. package/lib/typescript/commonjs/src/extractors/megaup.d.ts.map +0 -1
  975. package/lib/typescript/commonjs/src/extractors/mixdrop.d.ts +0 -10
  976. package/lib/typescript/commonjs/src/extractors/mixdrop.d.ts.map +0 -1
  977. package/lib/typescript/commonjs/src/extractors/mp4player.d.ts +0 -15
  978. package/lib/typescript/commonjs/src/extractors/mp4player.d.ts.map +0 -1
  979. package/lib/typescript/commonjs/src/extractors/mp4upload.d.ts +0 -10
  980. package/lib/typescript/commonjs/src/extractors/mp4upload.d.ts.map +0 -1
  981. package/lib/typescript/commonjs/src/extractors/rapidcloud.d.ts +0 -17
  982. package/lib/typescript/commonjs/src/extractors/rapidcloud.d.ts.map +0 -1
  983. package/lib/typescript/commonjs/src/extractors/streamhub.d.ts +0 -14
  984. package/lib/typescript/commonjs/src/extractors/streamhub.d.ts.map +0 -1
  985. package/lib/typescript/commonjs/src/extractors/streamlare.d.ts +0 -13
  986. package/lib/typescript/commonjs/src/extractors/streamlare.d.ts.map +0 -1
  987. package/lib/typescript/commonjs/src/extractors/streamsb.d.ts +0 -14
  988. package/lib/typescript/commonjs/src/extractors/streamsb.d.ts.map +0 -1
  989. package/lib/typescript/commonjs/src/extractors/streamtape.d.ts +0 -10
  990. package/lib/typescript/commonjs/src/extractors/streamtape.d.ts.map +0 -1
  991. package/lib/typescript/commonjs/src/extractors/vidmoly.d.ts +0 -10
  992. package/lib/typescript/commonjs/src/extractors/vidmoly.d.ts.map +0 -1
  993. package/lib/typescript/commonjs/src/extractors/vizcloud.d.ts +0 -12
  994. package/lib/typescript/commonjs/src/extractors/vizcloud.d.ts.map +0 -1
  995. package/lib/typescript/commonjs/src/extractors/voe.d.ts +0 -15
  996. package/lib/typescript/commonjs/src/extractors/voe.d.ts.map +0 -1
  997. package/lib/typescript/commonjs/src/models/base-types.d.ts +0 -23
  998. package/lib/typescript/commonjs/src/models/base-types.d.ts.map +0 -1
  999. package/lib/typescript/commonjs/src/providers/anime/animekai/animekai.d.ts +0 -90
  1000. package/lib/typescript/commonjs/src/providers/anime/animekai/animekai.d.ts.map +0 -1
  1001. package/lib/typescript/commonjs/src/providers/anime/animekai/create-animekai.d.ts +0 -32
  1002. package/lib/typescript/commonjs/src/providers/anime/animekai/create-animekai.d.ts.map +0 -1
  1003. package/lib/typescript/commonjs/src/providers/anime/animeunity.d.ts +0 -39
  1004. package/lib/typescript/commonjs/src/providers/anime/animeunity.d.ts.map +0 -1
  1005. package/lib/typescript/commonjs/src/providers/meta/tmdb-api-key.d.ts +0 -7
  1006. package/lib/typescript/commonjs/src/providers/meta/tmdb-api-key.d.ts.map +0 -1
  1007. package/lib/typescript/commonjs/src/providers/movies/multistream/index.d.ts +0 -44
  1008. package/lib/typescript/commonjs/src/providers/movies/multistream/index.d.ts.map +0 -1
  1009. package/lib/typescript/commonjs/src/providers/movies/netflixmirror/disneymirror.d.ts +0 -12
  1010. package/lib/typescript/commonjs/src/providers/movies/netflixmirror/disneymirror.d.ts.map +0 -1
  1011. package/lib/typescript/commonjs/src/providers/movies/netflixmirror/netmirror-parser.d.ts +0 -21
  1012. package/lib/typescript/commonjs/src/providers/movies/netflixmirror/netmirror-parser.d.ts.map +0 -1
  1013. package/lib/typescript/commonjs/src/providers/movies/netflixmirror/primemirror.d.ts +0 -12
  1014. package/lib/typescript/commonjs/src/providers/movies/netflixmirror/primemirror.d.ts.map +0 -1
  1015. package/lib/typescript/commonjs/src/providers/movies/yflix/create-yflix.d.ts +0 -25
  1016. package/lib/typescript/commonjs/src/providers/movies/yflix/create-yflix.d.ts.map +0 -1
  1017. package/lib/typescript/commonjs/src/providers/movies/yflix/yflix.d.ts +0 -49
  1018. package/lib/typescript/commonjs/src/providers/movies/yflix/yflix.d.ts.map +0 -1
  1019. package/lib/typescript/commonjs/src/providers/provider-args.d.ts +0 -8
  1020. package/lib/typescript/commonjs/src/providers/provider-args.d.ts.map +0 -1
  1021. package/lib/typescript/commonjs/src/registry-signing-keys.d.ts +0 -18
  1022. package/lib/typescript/commonjs/src/registry-signing-keys.d.ts.map +0 -1
  1023. package/lib/typescript/commonjs/src/utils/extension-utils.d.ts +0 -31
  1024. package/lib/typescript/commonjs/src/utils/extension-utils.d.ts.map +0 -1
  1025. package/lib/typescript/commonjs/src/utils/index.d.ts +0 -19
  1026. package/lib/typescript/commonjs/src/utils/index.d.ts.map +0 -1
  1027. package/lib/typescript/commonjs/src/utils/provider-maps.d.ts +0 -39
  1028. package/lib/typescript/commonjs/src/utils/provider-maps.d.ts.map +0 -1
  1029. package/lib/typescript/commonjs/src/utils/queries.d.ts +0 -22
  1030. package/lib/typescript/commonjs/src/utils/queries.d.ts.map +0 -1
  1031. package/lib/typescript/module/src/extractors/asianload.d.ts +0 -17
  1032. package/lib/typescript/module/src/extractors/asianload.d.ts.map +0 -1
  1033. package/lib/typescript/module/src/extractors/filemoon.d.ts +0 -14
  1034. package/lib/typescript/module/src/extractors/filemoon.d.ts.map +0 -1
  1035. package/lib/typescript/module/src/extractors/gdflix.d.ts +0 -7
  1036. package/lib/typescript/module/src/extractors/gdflix.d.ts.map +0 -1
  1037. package/lib/typescript/module/src/extractors/gogocdn.d.ts +0 -19
  1038. package/lib/typescript/module/src/extractors/gogocdn.d.ts.map +0 -1
  1039. package/lib/typescript/module/src/extractors/megaup.d.ts +0 -6
  1040. package/lib/typescript/module/src/extractors/megaup.d.ts.map +0 -1
  1041. package/lib/typescript/module/src/extractors/mixdrop.d.ts +0 -10
  1042. package/lib/typescript/module/src/extractors/mixdrop.d.ts.map +0 -1
  1043. package/lib/typescript/module/src/extractors/mp4player.d.ts +0 -15
  1044. package/lib/typescript/module/src/extractors/mp4player.d.ts.map +0 -1
  1045. package/lib/typescript/module/src/extractors/mp4upload.d.ts +0 -10
  1046. package/lib/typescript/module/src/extractors/mp4upload.d.ts.map +0 -1
  1047. package/lib/typescript/module/src/extractors/rapidcloud.d.ts +0 -17
  1048. package/lib/typescript/module/src/extractors/rapidcloud.d.ts.map +0 -1
  1049. package/lib/typescript/module/src/extractors/streamhub.d.ts +0 -14
  1050. package/lib/typescript/module/src/extractors/streamhub.d.ts.map +0 -1
  1051. package/lib/typescript/module/src/extractors/streamlare.d.ts +0 -13
  1052. package/lib/typescript/module/src/extractors/streamlare.d.ts.map +0 -1
  1053. package/lib/typescript/module/src/extractors/streamsb.d.ts +0 -14
  1054. package/lib/typescript/module/src/extractors/streamsb.d.ts.map +0 -1
  1055. package/lib/typescript/module/src/extractors/streamtape.d.ts +0 -10
  1056. package/lib/typescript/module/src/extractors/streamtape.d.ts.map +0 -1
  1057. package/lib/typescript/module/src/extractors/vidmoly.d.ts +0 -10
  1058. package/lib/typescript/module/src/extractors/vidmoly.d.ts.map +0 -1
  1059. package/lib/typescript/module/src/extractors/vizcloud.d.ts +0 -12
  1060. package/lib/typescript/module/src/extractors/vizcloud.d.ts.map +0 -1
  1061. package/lib/typescript/module/src/extractors/voe.d.ts +0 -15
  1062. package/lib/typescript/module/src/extractors/voe.d.ts.map +0 -1
  1063. package/lib/typescript/module/src/models/base-types.d.ts +0 -23
  1064. package/lib/typescript/module/src/models/base-types.d.ts.map +0 -1
  1065. package/lib/typescript/module/src/providers/anime/animekai/animekai.d.ts +0 -90
  1066. package/lib/typescript/module/src/providers/anime/animekai/animekai.d.ts.map +0 -1
  1067. package/lib/typescript/module/src/providers/anime/animekai/create-animekai.d.ts +0 -32
  1068. package/lib/typescript/module/src/providers/anime/animekai/create-animekai.d.ts.map +0 -1
  1069. package/lib/typescript/module/src/providers/anime/animeunity.d.ts +0 -39
  1070. package/lib/typescript/module/src/providers/anime/animeunity.d.ts.map +0 -1
  1071. package/lib/typescript/module/src/providers/meta/tmdb-api-key.d.ts +0 -7
  1072. package/lib/typescript/module/src/providers/meta/tmdb-api-key.d.ts.map +0 -1
  1073. package/lib/typescript/module/src/providers/movies/multistream/index.d.ts +0 -44
  1074. package/lib/typescript/module/src/providers/movies/multistream/index.d.ts.map +0 -1
  1075. package/lib/typescript/module/src/providers/movies/netflixmirror/disneymirror.d.ts +0 -12
  1076. package/lib/typescript/module/src/providers/movies/netflixmirror/disneymirror.d.ts.map +0 -1
  1077. package/lib/typescript/module/src/providers/movies/netflixmirror/netmirror-parser.d.ts +0 -21
  1078. package/lib/typescript/module/src/providers/movies/netflixmirror/netmirror-parser.d.ts.map +0 -1
  1079. package/lib/typescript/module/src/providers/movies/netflixmirror/primemirror.d.ts +0 -12
  1080. package/lib/typescript/module/src/providers/movies/netflixmirror/primemirror.d.ts.map +0 -1
  1081. package/lib/typescript/module/src/providers/movies/yflix/create-yflix.d.ts +0 -25
  1082. package/lib/typescript/module/src/providers/movies/yflix/create-yflix.d.ts.map +0 -1
  1083. package/lib/typescript/module/src/providers/movies/yflix/yflix.d.ts +0 -49
  1084. package/lib/typescript/module/src/providers/movies/yflix/yflix.d.ts.map +0 -1
  1085. package/lib/typescript/module/src/providers/provider-args.d.ts +0 -8
  1086. package/lib/typescript/module/src/providers/provider-args.d.ts.map +0 -1
  1087. package/lib/typescript/module/src/registry-signing-keys.d.ts +0 -18
  1088. package/lib/typescript/module/src/registry-signing-keys.d.ts.map +0 -1
  1089. package/lib/typescript/module/src/utils/extension-utils.d.ts +0 -31
  1090. package/lib/typescript/module/src/utils/extension-utils.d.ts.map +0 -1
  1091. package/lib/typescript/module/src/utils/index.d.ts +0 -19
  1092. package/lib/typescript/module/src/utils/index.d.ts.map +0 -1
  1093. package/lib/typescript/module/src/utils/provider-maps.d.ts +0 -39
  1094. package/lib/typescript/module/src/utils/provider-maps.d.ts.map +0 -1
  1095. package/lib/typescript/module/src/utils/queries.d.ts +0 -22
  1096. package/lib/typescript/module/src/utils/queries.d.ts.map +0 -1
  1097. package/src/extractors/asianload.ts +0 -89
  1098. package/src/extractors/filemoon.ts +0 -60
  1099. package/src/extractors/gdflix.ts +0 -165
  1100. package/src/extractors/gogocdn.ts +0 -155
  1101. package/src/extractors/megaup.ts +0 -125
  1102. package/src/extractors/mixdrop.ts +0 -35
  1103. package/src/extractors/mp4player.ts +0 -57
  1104. package/src/extractors/mp4upload.ts +0 -35
  1105. package/src/extractors/rapidcloud.ts +0 -200
  1106. package/src/extractors/streamhub.ts +0 -62
  1107. package/src/extractors/streamlare.ts +0 -65
  1108. package/src/extractors/streamsb.ts +0 -77
  1109. package/src/extractors/streamtape.ts +0 -42
  1110. package/src/extractors/vidmoly.ts +0 -52
  1111. package/src/extractors/vizcloud.ts +0 -70
  1112. package/src/extractors/voe.ts +0 -107
  1113. package/src/models/base-types.ts +0 -23
  1114. package/src/providers/anime/animekai/animekai.ts +0 -126
  1115. package/src/providers/anime/animekai/create-animekai.ts +0 -589
  1116. package/src/providers/anime/animeunity.ts +0 -226
  1117. package/src/providers/meta/tmdb-api-key.ts +0 -27
  1118. package/src/providers/movies/multistream/index.ts +0 -244
  1119. package/src/providers/movies/netflixmirror/disneymirror.ts +0 -16
  1120. package/src/providers/movies/netflixmirror/netmirror-parser.ts +0 -43
  1121. package/src/providers/movies/netflixmirror/primemirror.ts +0 -16
  1122. package/src/providers/movies/yflix/create-yflix.ts +0 -496
  1123. package/src/providers/movies/yflix/yflix.ts +0 -85
  1124. package/src/providers/provider-args.ts +0 -15
  1125. package/src/registry-signing-keys.ts +0 -20
  1126. package/src/utils/extension-utils.ts +0 -130
  1127. package/src/utils/index.ts +0 -96
  1128. package/src/utils/provider-maps.ts +0 -80
  1129. package/src/utils/queries.ts +0 -37
@@ -3,239 +3,181 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.get111MoviesSourcesAndServers = get111MoviesSourcesAndServers;
7
- exports.getDummySourcesAndServers = getDummySourcesAndServers;
8
- exports.getHexaSourcesAndServers = getHexaSourcesAndServers;
9
6
  exports.getMultiServers = getMultiServers;
10
7
  exports.getMultiSources = getMultiSources;
11
- exports.getVideasySourcesAndServers = getVideasySourcesAndServers;
12
- exports.getVidsrcSourcesAndServers = getVidsrcSourcesAndServers;
13
- var _cheerio = require("cheerio");
14
- var _urlPolyfill = require("../../../utils/url-polyfill.js");
15
- var _cryptoJs = _interopRequireDefault(require("crypto-js"));
16
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
17
- async function getDummySourcesAndServers(id) {
18
- // Simulate some async work
19
- await new Promise(resolve => setTimeout(resolve, 100));
8
+ exports.toMediaId = exports.toEpisodeId = exports.parseId = void 0;
9
+ var _encDec = require("../../common/enc-dec.js");
10
+ var _servers = require("../../common/servers.js");
11
+ /**
12
+ * MultiStream ids, built and read only here: `<tmdbId>$movie` for a movie (its media id and its one
13
+ * episode id), `<tmdbId>$tv` for a show, and `<tmdbId>$tv$<episode>$<season>$<tmdbEpisodeId>` for a
14
+ * show's episode (the TMDB episode id keeps ids unique).
15
+ */
16
+ const toMediaId = (tmdbId, type) => `${tmdbId}$${type}`;
17
+ exports.toMediaId = toMediaId;
18
+ const toEpisodeId = (tmdbId, episode, season, tmdbEpisodeId) => `${tmdbId}$tv$${episode}$${season}$${tmdbEpisodeId}`;
19
+ exports.toEpisodeId = toEpisodeId;
20
+ const parseId = id => {
21
+ const [tmdbId = '', type = '', episode, season] = id.split('$');
20
22
  return {
21
- servers: [{
22
- name: 'DummyServer1',
23
- url: 'https://dummy.com/server1/stream.m3u8'
24
- }, {
25
- name: 'DummyServer2',
26
- url: 'https://dummy.com/server2/stream.m3u8'
27
- }],
28
- sources: [{
29
- url: 'https://dummy.com/server1/stream.m3u8',
30
- isM3U8: true,
31
- quality: 'default',
32
- name: 'DummyServer1'
33
- }, {
34
- url: 'https://dummy.com/server2/stream.m3u8',
35
- isM3U8: true,
36
- quality: 'default',
37
- name: 'DummyServer2'
38
- }],
39
- subtitles: [{
40
- url: 'https://dummy.com/subs/en.vtt',
41
- lang: 'English'
42
- }]
23
+ tmdbId,
24
+ type,
25
+ episode,
26
+ season
43
27
  };
44
- }
45
- function getParts(id) {
46
- const parts = id.split('$');
47
- const [tmdbId, type, episode, season] = parts;
48
- return [tmdbId, type, episode, season];
49
- }
50
- async function getVidsrcSourcesAndServers(axios, id) {
51
- const [tmdbId, type, episode, season] = getParts(id);
28
+ };
29
+
30
+ /**
31
+ * What one site gives for an episode: its servers, and the sources and subtitles they play. A
32
+ * scraper names its servers and their sources by the site's own labels; scrapeSite prefixes them.
33
+ */
34
+ exports.parseId = parseId;
35
+ const scrapeVidsrc = async ({
36
+ axios,
37
+ load,
38
+ USER_AGENT
39
+ }, id) => {
40
+ const {
41
+ tmdbId,
42
+ type,
43
+ episode,
44
+ season
45
+ } = parseId(id);
52
46
  const baseURL = 'https://vidsrc-embed.ru/embed/';
53
47
  const headers = {
54
- 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36',
48
+ 'User-Agent': USER_AGENT,
55
49
  'Referer': 'https://vidsrc-embed.ru/'
56
50
  };
57
51
  const servers = [];
58
52
  const sources = [];
59
53
  const url = type === 'tv' ? `${baseURL}tv?tmdb=${tmdbId}&season=${season}&episode=${episode}` : `${baseURL}movie?tmdb=${tmdbId}`;
60
- try {
61
- // Step 1: Fetch embed iframe
62
- const {
63
- data: html1
64
- } = await axios.get(url, {
65
- headers
66
- });
67
- const match1 = html1.match(/src="(.*?)"/)?.[1];
68
- if (!match1) throw new Error('No source iframe found');
69
- const allUrlRCP = [];
70
- // Construct the RCP URL
71
- const urlRCP = match1.startsWith('http') ? match1 : match1.startsWith('/embed') ? baseURL.split('/embed')[0] + match1 : 'https:' + match1;
72
- const $ = (0, _cheerio.load)(html1);
73
- $('.serversList .server').each((i, el) => {
74
- const name = $(el).text().trim();
75
- const hash = $(el).attr('data-hash');
76
- allUrlRCP.push({
77
- name,
78
- url: `${urlRCP.split('rcp')[0]}rcp/${hash}`
54
+
55
+ // The embed page links an RCP player page per server; each RCP page loads a PRORCP page whose
56
+ // script names the m3u8.
57
+ const {
58
+ data: html1
59
+ } = await axios.get(url, {
60
+ headers
61
+ });
62
+ const match1 = html1.match(/src="(.*?)"/)?.[1];
63
+ if (!match1) throw new Error('No source iframe found');
64
+ const urlRCP = match1.startsWith('http') ? match1 : match1.startsWith('/embed') ? baseURL.split('/embed')[0] + match1 : 'https:' + match1;
65
+ const $ = load(html1);
66
+ const rcpPages = $('.serversList .server').get().map(el => ({
67
+ name: $(el).text().trim(),
68
+ url: `${urlRCP.split('rcp')[0]}rcp/${$(el).attr('data-hash')}`
69
+ }));
70
+ await Promise.all(rcpPages.map(async ({
71
+ name,
72
+ url: rcpUrl
73
+ }) => {
74
+ try {
75
+ const {
76
+ data: html2
77
+ } = await axios.get(rcpUrl, {
78
+ headers: {
79
+ ...headers,
80
+ Referer: url
81
+ }
82
+ });
83
+ const match2 = html2.match(/src.*['"](\/(?:src|pro)rcp.*?)['"]/)?.[1];
84
+ if (!match2) return;
85
+ const {
86
+ data: html3
87
+ } = await axios.get(rcpUrl.split('rcp')[0] + match2, {
88
+ headers: {
89
+ ...headers,
90
+ Referer: rcpUrl
91
+ }
79
92
  });
80
- });
81
- // Step 2: Fetch all URLs from allUrlRCP and process them
82
- await Promise.all(allUrlRCP.map(async ({
83
- name,
84
- url: rcpUrl
85
- }) => {
86
- try {
87
- // console.log(`Fetching RCP for ${name} from ${rcpUrl}`);
88
- const {
89
- data: html2
90
- } = await axios.get(rcpUrl, {
91
- headers: {
92
- ...headers,
93
- Referer: url
94
- }
93
+ const m3u8 = html3.match(/file:\s*['"]([^'"]+\.m3u8)['"]/)?.[1];
94
+ if (m3u8) {
95
+ servers.push({
96
+ name,
97
+ url: m3u8
95
98
  });
96
- // console.log(`Found RCP for ${name}: ${html2}`);
97
- const match2 = html2.match(/src.*['"](\/(?:src|pro)rcp.*?)['"]/)?.[1];
98
- if (!match2) return;
99
- const urlPRORCP = rcpUrl.split('rcp')[0] + match2;
100
-
101
- // Step 3: Fetch M3U8 file URL
102
- // console.log(`Fetching M3U8 for ${name} from ${urlPRORCP}`);
103
- const {
104
- data: html3
105
- } = await axios.get(urlPRORCP, {
106
- headers: {
107
- ...headers,
108
- Referer: rcpUrl
109
- }
99
+ sources.push({
100
+ url: m3u8,
101
+ isM3U8: true,
102
+ quality: 'default',
103
+ name
110
104
  });
111
- const match3 = html3.match(/file:\s*['"]([^'"]+\.m3u8)['"]/)?.[1];
112
- // console.log(`Found M3U8 for ${name}: ${match3}`);
113
- if (match3) {
114
- servers.push({
115
- name: name,
116
- url: match3
117
- });
118
- sources.push({
119
- url: match3,
120
- isM3U8: match3.includes('.m3u8'),
121
- quality: 'default',
122
- name: name
123
- });
124
- }
125
- } catch (error) {
126
- // Silently continue on error for individual servers
127
- return;
128
105
  }
129
- }));
130
- return {
131
- servers,
132
- sources,
133
- headers: {
134
- Referer: urlRCP.split('rcp')[0]
135
- }
136
- };
137
- } catch (error) {
138
- throw new Error(`Failed to fetch Vidsrc stream: ${error.message}`);
139
- }
140
- }
141
- async function get111MoviesSourcesAndServers(axios, id) {
142
- const [tmdbId, type, episode, season] = getParts(id);
106
+ } catch {
107
+ // A server whose pages fail is left out; the others still play.
108
+ }
109
+ }));
110
+ return {
111
+ servers,
112
+ sources,
113
+ headers: {
114
+ Referer: urlRCP.split('rcp')[0]
115
+ }
116
+ };
117
+ };
118
+ const scrape111Movies = async ({
119
+ axios,
120
+ CryptoJS,
121
+ USER_AGENT
122
+ }, id) => {
123
+ const {
124
+ tmdbId,
125
+ type,
126
+ episode,
127
+ season
128
+ } = parseId(id);
143
129
  const baseUrl = 'https://111movies.com';
144
- const userAgent = 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Mobile Safari/537.36';
145
- const defaultDomain = (() => {
146
- const u = new _urlPolyfill.URL(baseUrl);
147
- return `${u.protocol}//${u.host}/`;
148
- })();
149
130
  const headers = {
150
- 'Referer': defaultDomain,
151
- 'User-Agent': userAgent,
152
- // 'Content-Type': 'image/gif',
131
+ 'Referer': `${baseUrl}/`,
132
+ 'User-Agent': USER_AGENT,
153
133
  'X-Requested-With': 'XMLHttpRequest'
154
134
  };
155
- function customEncode(input) {
135
+
136
+ // URL-safe base64 with the site's own alphabet.
137
+ const customEncode = input => {
156
138
  const src = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_';
157
139
  const dst = 'BdNqfj2X1RalybZHxP50e8UGz4Tv6mg3QS-7JnAWIsiKrCpFktVM9D_chuYOoEwL';
158
-
159
- // Normal base64 url-safe
160
- let b64 = _cryptoJs.default.enc.Base64.stringify(_cryptoJs.default.enc.Utf8.parse(input));
161
- b64 = b64.replace(/\+/g, '-').replace(/\//g, '_').replace(/[=]+$/, '');
162
-
163
- // Translate characters
140
+ const b64 = CryptoJS.enc.Base64.stringify(CryptoJS.enc.Utf8.parse(input)).replace(/\+/g, '-').replace(/\//g, '_').replace(/[=]+$/, '');
164
141
  let result = '';
165
142
  for (const ch of b64) {
166
143
  const idx = src.indexOf(ch);
167
144
  result += idx >= 0 ? dst[idx] : ch;
168
145
  }
169
146
  return result;
170
- }
171
- let url;
172
- if (type === 'tv') {
173
- url = `${baseUrl}/tv/${tmdbId}/${season}/${episode}`;
174
- } else {
175
- url = `${baseUrl}/movie/${tmdbId}`;
176
- }
177
- const res = await axios.get(url, {
147
+ };
148
+ const url = type === 'tv' ? `${baseUrl}/tv/${tmdbId}/${season}/${episode}` : `${baseUrl}/movie/${tmdbId}`;
149
+ const html = (await axios.get(url, {
178
150
  headers
179
- });
180
- const html = res.data;
151
+ })).data;
152
+ const rawData = html.match(/\{"data":"(.*?)"/)?.[1];
153
+ if (!rawData) throw new Error('No data found in the response');
181
154
 
182
- // Extract raw data
183
- const match = html.match(/\{\"data\":\"(.*?)\"/);
184
- if (!match) {
185
- console.error('No data found!');
186
- throw new Error('No data found in the response');
187
- }
188
- const rawData = match[1];
189
-
190
- // AES CBC encrypt
191
- const keyHex = '912660f3d9f3f35cee36396d31ed73366ab53c22c70710ce029697d17762997e';
192
- const ivHex = 'f91f2863783814f51c56f341d6ce1677';
193
- const aesKey = _cryptoJs.default.enc.Hex.parse(keyHex);
194
- const aesIv = _cryptoJs.default.enc.Hex.parse(ivHex);
195
- const padded = _cryptoJs.default.enc.Utf8.parse(rawData);
196
- const encrypted = _cryptoJs.default.AES.encrypt(padded, aesKey, {
197
- iv: aesIv,
198
- mode: _cryptoJs.default.mode.CBC,
199
- padding: _cryptoJs.default.pad.Pkcs7
155
+ // The page's data, AES-CBC encrypted with the site's key, hex-encoded, XORed and re-encoded,
156
+ // names the episode's server list.
157
+ const encrypted = CryptoJS.AES.encrypt(CryptoJS.enc.Utf8.parse(rawData), CryptoJS.enc.Hex.parse('912660f3d9f3f35cee36396d31ed73366ab53c22c70710ce029697d17762997e'), {
158
+ iv: CryptoJS.enc.Hex.parse('f91f2863783814f51c56f341d6ce1677'),
159
+ mode: CryptoJS.mode.CBC,
160
+ padding: CryptoJS.pad.Pkcs7
200
161
  });
201
-
202
- // Python used .hex(), CryptoJS AES output is base64 → convert to hex
203
- // AES ciphertext in hex (same as Python's .hex())
204
- const aesEncryptedHex = encrypted.ciphertext.toString(_cryptoJs.default.enc.Hex);
205
-
206
- // XOR key as a Uint8Array instead of Buffer
207
- const xorKey = new Uint8Array([0xbe, 0x43, 0x0a]);
162
+ const aesEncryptedHex = encrypted.ciphertext.toString(CryptoJS.enc.Hex);
163
+ const xorKey = [0xbe, 0x43, 0x0a];
208
164
  let xorResult = '';
209
165
  for (let i = 0; i < aesEncryptedHex.length; i++) {
210
- const charCode = aesEncryptedHex.charCodeAt(i);
211
- xorResult += String.fromCharCode(charCode ^ xorKey[i % xorKey.length]);
166
+ xorResult += String.fromCharCode(aesEncryptedHex.charCodeAt(i) ^ xorKey[i % xorKey.length]);
212
167
  }
213
-
214
- // Encode final
215
- const encodedFinal = customEncode(xorResult);
216
-
217
- // API call
218
168
  const staticPath = 'to/1000003134441812/c945be05/2f30b6e198562e7015537bb71a738ff8245942a7/y/2c20617150078ad280239d1cc3a8b6ee9331acef9b0bdc6b742435597c38edb4/c8ddbffe-3efb-53e1-b883-3b6ce90ba310';
219
- const apiServers = `https://111movies.com/${staticPath}/${encodedFinal}/sr`;
220
169
  const {
221
170
  data: serversData
222
- } = await axios.post(apiServers, {}, {
171
+ } = await axios.post(`${baseUrl}/${staticPath}/${customEncode(xorResult)}/sr`, {}, {
223
172
  headers
224
173
  });
225
- // const servers = serverRes.data;
226
-
227
- if (!Array.isArray(serversData) || serversData.length === 0) {
228
- console.error('No servers found!');
229
- throw new Error('No servers found in the response');
230
- }
174
+ if (!Array.isArray(serversData) || serversData.length === 0) throw new Error('No servers found in the response');
231
175
  const servers = serversData.map(s => ({
232
176
  name: s.name,
233
- url: `https://111movies.com/${staticPath}/${s.data}`
177
+ url: `${baseUrl}/${staticPath}/${s.data}`
234
178
  }));
235
179
  const sources = [];
236
180
  let subtitles = [];
237
-
238
- // console.log(subtitles);
239
181
  for (const server of servers) {
240
182
  try {
241
183
  const {
@@ -243,14 +185,12 @@ async function get111MoviesSourcesAndServers(axios, id) {
243
185
  } = await axios.post(server.url, {}, {
244
186
  headers
245
187
  });
246
- if (streamData.tracks && streamData.tracks.length > 0) {
247
- const newSubs = streamData.tracks.map(sub => ({
188
+ if (streamData.tracks?.length > 0) {
189
+ const allSubs = [...subtitles, ...streamData.tracks.map(sub => ({
248
190
  url: sub.file,
249
191
  lang: sub.label
250
- }));
251
- const allSubs = [...subtitles, ...newSubs];
252
- const uniqueSubs = allSubs.filter((sub, index, self) => index === self.findIndex(s => s.lang === sub.lang));
253
- subtitles = uniqueSubs;
192
+ }))];
193
+ subtitles = allSubs.filter((sub, index) => index === allSubs.findIndex(s => s.lang === sub.lang));
254
194
  }
255
195
  sources.push({
256
196
  url: streamData.url,
@@ -258,8 +198,8 @@ async function get111MoviesSourcesAndServers(axios, id) {
258
198
  quality: 'default',
259
199
  name: server.name
260
200
  });
261
- } catch (err) {
262
- // ignore bad ones
201
+ } catch {
202
+ // A server that fails to answer is left out of the sources; the others still play.
263
203
  }
264
204
  }
265
205
  return {
@@ -267,238 +207,222 @@ async function get111MoviesSourcesAndServers(axios, id) {
267
207
  sources,
268
208
  subtitles
269
209
  };
270
- }
271
- async function getVideasySourcesAndServers(axios, id) {
272
- const servers = [{
273
- name: 'neon-org',
274
- url: 'https://api.videasy.net/myflixerzupcloud/sources-with-title'
275
- }, {
276
- name: 'sage-org',
277
- url: 'https://api.videasy.net/1movies/sources-with-title'
278
- }, {
279
- name: 'cypher-org',
280
- url: 'https://api.videasy.net/moviebox/sources-with-title'
281
- }, {
282
- name: 'yoru-org',
283
- url: 'https://api.videasy.net/cdn/sources-with-title'
284
- }, {
285
- name: 'reyna-org',
286
- url: 'https://api.videasy.net/primewire/sources-with-title'
287
- }, {
288
- name: 'omen-org',
289
- url: 'https://api.videasy.net/onionplay/sources-with-title'
290
- }, {
291
- name: 'breach-org',
292
- url: 'https://api.videasy.net/m4uhd/sources-with-title'
293
- }, {
294
- name: 'vyse-org',
295
- url: 'https://api.videasy.net/hdmovie/sources-with-title'
296
- }, {
297
- name: 'killjoy-ger',
298
- url: 'https://api.videasy.net/meine/sources-with-title?language=german'
299
- }, {
300
- name: 'harbor-ita',
301
- url: 'https://api.videasy.net/meine/sources-with-title?language=italian'
302
- }, {
303
- name: 'chamber-fr',
304
- url: 'https://api.videasy.net/meine/sources-with-title?language=french'
305
- }, {
306
- name: 'fade-hin',
307
- url: 'https://api.videasy.net/hdmovie/sources-with-title'
308
- }, {
309
- name: 'gekko-lat',
310
- url: 'https://api.videasy.net/cuevana-latino/sources-with-title'
311
- }, {
312
- name: 'kayo-spa',
313
- url: 'https://api.videasy.net/cuevana-spanish/sources-with-title'
314
- }, {
315
- name: 'raze-por',
316
- url: 'https://api.videasy.net/superflix/sources-with-title'
317
- }, {
318
- name: 'phoenix-por',
319
- url: 'https://api.videasy.net/overflix/sources-with-title'
320
- }, {
321
- name: 'astra-por',
322
- url: 'https://api.videasy.net/visioncine/sources-with-title'
323
- }];
210
+ };
211
+ const VIDEASY_SERVERS = [{
212
+ name: 'neon-org',
213
+ url: 'https://api.videasy.net/myflixerzupcloud/sources-with-title'
214
+ }, {
215
+ name: 'sage-org',
216
+ url: 'https://api.videasy.net/1movies/sources-with-title'
217
+ }, {
218
+ name: 'cypher-org',
219
+ url: 'https://api.videasy.net/moviebox/sources-with-title'
220
+ }, {
221
+ name: 'yoru-org',
222
+ url: 'https://api.videasy.net/cdn/sources-with-title'
223
+ }, {
224
+ name: 'reyna-org',
225
+ url: 'https://api.videasy.net/primewire/sources-with-title'
226
+ }, {
227
+ name: 'omen-org',
228
+ url: 'https://api.videasy.net/onionplay/sources-with-title'
229
+ }, {
230
+ name: 'breach-org',
231
+ url: 'https://api.videasy.net/m4uhd/sources-with-title'
232
+ }, {
233
+ name: 'vyse-org',
234
+ url: 'https://api.videasy.net/hdmovie/sources-with-title'
235
+ }, {
236
+ name: 'killjoy-ger',
237
+ url: 'https://api.videasy.net/meine/sources-with-title?language=german'
238
+ }, {
239
+ name: 'harbor-ita',
240
+ url: 'https://api.videasy.net/meine/sources-with-title?language=italian'
241
+ }, {
242
+ name: 'chamber-fr',
243
+ url: 'https://api.videasy.net/meine/sources-with-title?language=french'
244
+ }, {
245
+ name: 'fade-hin',
246
+ url: 'https://api.videasy.net/hdmovie/sources-with-title'
247
+ }, {
248
+ name: 'gekko-lat',
249
+ url: 'https://api.videasy.net/cuevana-latino/sources-with-title'
250
+ }, {
251
+ name: 'kayo-spa',
252
+ url: 'https://api.videasy.net/cuevana-spanish/sources-with-title'
253
+ }, {
254
+ name: 'raze-por',
255
+ url: 'https://api.videasy.net/superflix/sources-with-title'
256
+ }, {
257
+ name: 'phoenix-por',
258
+ url: 'https://api.videasy.net/overflix/sources-with-title'
259
+ }, {
260
+ name: 'astra-por',
261
+ url: 'https://api.videasy.net/visioncine/sources-with-title'
262
+ }];
263
+
264
+ /** The sources and subtitles of enc-dec.app's decrypted answer, each source under the label `name` gives it. */
265
+ const decryptedMedia = (result, name) => ({
266
+ sources: (Array.isArray(result?.sources) ? result.sources : []).map(source => ({
267
+ url: source.url,
268
+ isM3U8: source.url?.includes('.m3u8') || false,
269
+ quality: source.quality || 'default',
270
+ name: name(source)
271
+ })),
272
+ subtitles: (Array.isArray(result?.subtitles) ? result.subtitles : []).map(subtitle => ({
273
+ url: subtitle.url,
274
+ lang: subtitle.lang || subtitle.language || 'Unknown'
275
+ }))
276
+ });
277
+ const scrapeVideasy = async ({
278
+ axios
279
+ }, id) => {
280
+ const {
281
+ tmdbId,
282
+ type,
283
+ episode,
284
+ season
285
+ } = parseId(id);
324
286
  const sources = [];
325
287
  const subtitles = [];
326
- const [tmdbId, type, episode, season] = getParts(id);
327
- await Promise.all(servers.map(async server => {
288
+ await Promise.all(VIDEASY_SERVERS.map(async server => {
328
289
  try {
329
- console.log('step 1');
330
- const url = type === 'tv' ? `${server.url}?mediaType=tv&tmdbId=${tmdbId}&seasonId=${season}&episodeId=${episode}` : `${server.url}?mediaType=movie&tmdbId=${tmdbId}`;
331
- console.log('step 2');
290
+ // Some servers' URLs already have a query (`?language=german`).
291
+ const query = type === 'tv' ? `mediaType=tv&tmdbId=${tmdbId}&seasonId=${season}&episodeId=${episode}` : `mediaType=movie&tmdbId=${tmdbId}`;
292
+ const url = `${server.url}${server.url.includes('?') ? '&' : '?'}${query}`;
332
293
  const {
333
294
  data: encData
334
295
  } = await axios.get(url);
335
- console.log('step 3');
336
296
  const {
337
297
  data: decData
338
- } = await axios.post('https://enc-dec.app/api/dec-videasy', {
298
+ } = await axios.post(`${_encDec.ENC_DEC_API}/dec-videasy`, {
339
299
  text: encData,
340
300
  id: tmdbId
341
301
  });
342
- console.log('step 3');
343
- const result = decData.result;
344
- console.log(result);
345
- if (result && typeof result === 'object') {
346
- // Add sources from the decrypted data
347
- if (result.sources && Array.isArray(result.sources)) {
348
- result.sources.forEach(source => {
349
- sources.push({
350
- url: source.url,
351
- isM3U8: source.url?.includes('.m3u8') || false,
352
- quality: source.quality || 'default',
353
- name: server.name
354
- });
355
- });
356
- }
357
-
358
- // Add subtitles if available
359
- if (result.subtitles && Array.isArray(result.subtitles)) {
360
- result.subtitles.forEach(subtitle => {
361
- subtitles.push({
362
- url: subtitle.url,
363
- lang: subtitle.lang || subtitle.language || 'Unknown'
364
- });
365
- });
366
- }
367
- }
368
- } catch (err) {
369
- // ignore bad ones
370
- console.log(server.name, 'this failed');
302
+ const media = decryptedMedia(decData.result, () => server.name);
303
+ sources.push(...media.sources);
304
+ subtitles.push(...media.subtitles);
305
+ } catch {
306
+ // A server that fails is left out of the sources; the others still play.
371
307
  }
372
308
  }));
373
309
  return {
374
- servers,
310
+ servers: VIDEASY_SERVERS,
375
311
  sources,
376
312
  subtitles
377
313
  };
378
- }
379
- async function getHexaSourcesAndServers(axios, id) {
380
- const sources = [];
381
- const subtitles = [];
382
- const servers = [];
383
- const [tmdbId, type, episode, season] = getParts(id);
384
- try {
385
- // Generate 32-byte hex key (64 hex characters)
386
- const key = _cryptoJs.default.lib.WordArray.random(32).toString(_cryptoJs.default.enc.Hex);
387
- const url = type === 'tv' ? `https://themoviedb.hexa.watch/api/tmdb/tv/${tmdbId}/season/${season}/episode/${episode}/images` : `https://themoviedb.hexa.watch/api/tmdb/movie/${tmdbId}/images`;
388
-
389
- // Get encrypted text with API key in header
390
- const {
391
- data: encData
392
- } = await axios.get(url, {
393
- headers: {
394
- 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36',
395
- 'Accept': 'plain/text',
396
- 'X-Api-Key': key
397
- }
398
- });
399
- // Decrypt using the API
400
- const {
401
- data: decData
402
- } = await axios.post('https://enc-dec.app/api/dec-hexa', {
403
- text: encData,
404
- key: key
405
- });
406
- const result = decData.result;
407
- if (result && typeof result === 'object') {
408
- // Add sources from the decrypted data
409
- if (result.sources && Array.isArray(result.sources)) {
410
- result.sources.forEach(source => {
411
- sources.push({
412
- url: source.url,
413
- isM3U8: source.url?.includes('.m3u8') || false,
414
- quality: source.quality || 'default',
415
- name: `hexa-${source.server}`
416
- });
417
- servers.push({
418
- name: `hexa-${source.server}`,
419
- url: source.url
420
- });
421
- });
422
- }
423
-
424
- // Add subtitles if available
425
- if (result.subtitles && Array.isArray(result.subtitles)) {
426
- result.subtitles.forEach(subtitle => {
427
- subtitles.push({
428
- url: subtitle.url,
429
- lang: subtitle.lang || subtitle.language || 'Unknown'
430
- });
431
- });
432
- }
314
+ };
315
+ const scrapeHexa = async ({
316
+ axios,
317
+ CryptoJS,
318
+ USER_AGENT
319
+ }, id) => {
320
+ const {
321
+ tmdbId,
322
+ type,
323
+ episode,
324
+ season
325
+ } = parseId(id);
326
+ // Hexa encrypts its answer with a key the client picks: 32 random bytes as hex.
327
+ const key = CryptoJS.lib.WordArray.random(32).toString(CryptoJS.enc.Hex);
328
+ const url = type === 'tv' ? `https://themoviedb.hexa.watch/api/tmdb/tv/${tmdbId}/season/${season}/episode/${episode}/images` : `https://themoviedb.hexa.watch/api/tmdb/movie/${tmdbId}/images`;
329
+ const {
330
+ data: encData
331
+ } = await axios.get(url, {
332
+ headers: {
333
+ 'User-Agent': USER_AGENT,
334
+ 'Accept': 'plain/text',
335
+ 'X-Api-Key': key
433
336
  }
434
- } catch (err) {
435
- // ignore errors
436
- console.log(err);
437
- }
337
+ });
338
+ const {
339
+ data: decData
340
+ } = await axios.post(`${_encDec.ENC_DEC_API}/dec-hexa`, {
341
+ text: encData,
342
+ key
343
+ });
344
+ const media = decryptedMedia(decData.result, source => source.server);
438
345
  return {
439
- servers,
440
- sources,
441
- subtitles
346
+ servers: media.sources.map(source => ({
347
+ name: source.name,
348
+ url: source.url
349
+ })),
350
+ ...media
442
351
  };
443
- }
444
- async function getMultiServers(axios, id) {
445
- try {
446
- const servers = [];
352
+ };
447
353
 
448
- // Fetch from all sources, handle errors individually
449
- const results = await Promise.allSettled([
450
- // getDummySourcesAndServers(id),
451
- get111MoviesSourcesAndServers(axios, id), getVidsrcSourcesAndServers(axios, id), getVideasySourcesAndServers(axios, id), getHexaSourcesAndServers(axios, id)]);
354
+ /**
355
+ * The sites MultiStream reads, in the order their servers are listed. A server's name starts with
356
+ * its site's (`videasy-neon-org`), which is how getMultiSources knows the one site to ask.
357
+ */
358
+ const SITES = [{
359
+ name: '111movies',
360
+ scrape: scrape111Movies
361
+ }, {
362
+ name: 'vidsrc',
363
+ scrape: scrapeVidsrc
364
+ }, {
365
+ name: 'videasy',
366
+ scrape: scrapeVideasy
367
+ }, {
368
+ name: 'hexa',
369
+ scrape: scrapeHexa
370
+ }];
452
371
 
453
- // Add servers from successful results only
454
- results.forEach(result => {
455
- if (result.status === 'fulfilled') {
456
- servers.push(...result.value.servers);
457
- }
458
- });
459
- return servers;
460
- } catch (error) {
461
- throw new Error(`Failed to fetch Multistream servers: ${error.message}`);
462
- }
372
+ /** A site's answer, its servers and their sources named `<site>-<label>` (serverName). */
373
+ const scrapeSite = async (ctx, site, id) => {
374
+ const scraped = await site.scrape(ctx, id);
375
+ return {
376
+ ...scraped,
377
+ servers: scraped.servers.map(server => ({
378
+ ...server,
379
+ name: (0, _servers.serverName)(site.name, server.name)
380
+ })),
381
+ sources: scraped.sources.map(source => ({
382
+ ...source,
383
+ name: (0, _servers.serverName)(site.name, source.name)
384
+ }))
385
+ };
386
+ };
387
+
388
+ /** The answers of `sites` for the episode; a site that fails is left out, unless they all fail. */
389
+ const scrape = async (ctx, id, sites) => {
390
+ const settled = await Promise.allSettled(sites.map(site => scrapeSite(ctx, site, id)));
391
+ const results = settled.flatMap(result => result.status === 'fulfilled' ? [result.value] : []);
392
+ const failure = settled.find(result => result.status === 'rejected');
393
+ if (!results.length && failure) throw failure.reason;
394
+ return results;
395
+ };
396
+ async function getMultiServers(ctx, id) {
397
+ return (await scrape(ctx, id, SITES)).flatMap(result => result.servers);
463
398
  }
464
- async function getMultiSources(axios, id, server) {
465
- try {
466
- // Fetch from all sources, handle errors individually
467
- const results = await Promise.allSettled([
468
- // getDummySourcesAndServers(id),
469
- get111MoviesSourcesAndServers(axios, id), getVidsrcSourcesAndServers(axios, id), getVideasySourcesAndServers(axios, id), getHexaSourcesAndServers(axios, id)]);
470
- const allSources = [];
471
- const allSubtitles = [];
472
399
 
473
- // Collect sources and subtitles from successful results only
474
- results.forEach(result => {
475
- if (result.status === 'fulfilled') {
476
- const {
477
- servers: _,
478
- ...sourceData
479
- } = result.value;
480
- if (sourceData.sources) {
481
- allSources.push(...sourceData.sources);
482
- }
483
- if (sourceData.subtitles) {
484
- allSubtitles.push(...sourceData.subtitles);
485
- }
486
- }
487
- });
488
- console.log({
489
- allSources,
490
- allSubtitles
491
- });
492
- const matchedSources = allSources.filter(source => source.name === server);
493
- if (matchedSources.length === 0) {
494
- throw new Error(`No sources found for server: ${server}`);
495
- }
496
- return {
497
- sources: matchedSources,
498
- subtitles: allSubtitles
499
- };
500
- } catch (error) {
501
- throw new Error(`Failed to fetch MultiSources: ${error.message}`);
400
+ /**
401
+ * The sources of one server (`pickServer`'s rule; the first server when omitted), the headers its
402
+ * site needs, and the subtitles of the sites asked. Only the sites whose servers `server` can name
403
+ * are asked: those whose name starts with it, or that it starts with. Every site without one.
404
+ */
405
+ async function getMultiSources(ctx, id, server) {
406
+ const wanted = server?.toLowerCase();
407
+ const sites = wanted ? SITES.filter(({
408
+ name
409
+ }) => name.startsWith(wanted) || wanted.startsWith(name)) : SITES;
410
+ if (!sites.length) {
411
+ throw new Error(`Server '${server}' not found; server names start with ${SITES.map(({
412
+ name
413
+ }) => name).join(', ')}`);
502
414
  }
415
+ const results = await scrape(ctx, id, sites);
416
+ const picked = (0, _servers.pickServer)(results.flatMap(result => result.servers), server);
417
+ const site = results.find(result => result.servers.includes(picked));
418
+ const sources = site.sources.filter(source => source.name === picked.name);
419
+ if (sources.length === 0) throw new Error(`No sources found for server: ${picked.name}`);
420
+ return {
421
+ ...(site.headers ? {
422
+ headers: site.headers
423
+ } : {}),
424
+ sources,
425
+ subtitles: results.flatMap(result => result.subtitles ?? [])
426
+ };
503
427
  }
504
428
  //# sourceMappingURL=utils.js.map