react-native-consumet 3.0.1 → 5.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 (1166) 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/TestSupport.kt +12 -6
  7. package/android/src/androidTest/java/com/consumet/WebViewContractTest.kt +70 -22
  8. package/android/src/main/AndroidManifest.xml +2 -3
  9. package/android/src/main/java/com/consumet/ConsumetModule.kt +0 -11
  10. package/android/src/main/java/com/consumet/DeobfuscatorModule.kt +6 -11
  11. package/android/src/main/java/com/consumet/HttpClients.kt +26 -0
  12. package/android/src/main/java/com/consumet/HttpRequestModule.kt +134 -198
  13. package/android/src/main/java/com/consumet/RequestHeaders.kt +39 -0
  14. package/android/src/main/java/com/consumet/WebViewTask.kt +33 -23
  15. package/ios/Consumet.mm +340 -432
  16. package/ios/RCConsumetSynchronyCache.m +3 -1
  17. package/ios/generated/ReactCodegen/RNConsumetSpec/RNConsumetSpec-generated.mm +0 -14
  18. package/ios/generated/ReactCodegen/RNConsumetSpec/RNConsumetSpec.h +0 -6
  19. package/ios/generated/ReactCodegen/RNConsumetSpecJSI.h +0 -18
  20. package/lib/commonjs/NativeConsumet.ts +50 -52
  21. package/lib/commonjs/extension-registry.json +48 -188
  22. package/lib/commonjs/extension-registry.json.sig +1 -1
  23. package/lib/commonjs/extractors/file-hosts.js +42 -0
  24. package/lib/commonjs/extractors/file-hosts.js.map +1 -0
  25. package/lib/commonjs/extractors/flixcloud.js +25 -60
  26. package/lib/commonjs/extractors/flixcloud.js.map +1 -1
  27. package/lib/commonjs/extractors/gofile.js +123 -97
  28. package/lib/commonjs/extractors/gofile.js.map +1 -1
  29. package/lib/commonjs/extractors/hls.js +46 -0
  30. package/lib/commonjs/extractors/hls.js.map +1 -0
  31. package/lib/commonjs/extractors/hubcloud.js +131 -288
  32. package/lib/commonjs/extractors/hubcloud.js.map +1 -1
  33. package/lib/commonjs/extractors/index.js +4 -116
  34. package/lib/commonjs/extractors/index.js.map +1 -1
  35. package/lib/commonjs/extractors/kwik.js +15 -49
  36. package/lib/commonjs/extractors/kwik.js.map +1 -1
  37. package/lib/commonjs/extractors/megacloud.js +67 -140
  38. package/lib/commonjs/extractors/megacloud.js.map +1 -1
  39. package/lib/commonjs/extractors/megaplay.js +78 -128
  40. package/lib/commonjs/extractors/megaplay.js.map +1 -1
  41. package/lib/commonjs/extractors/packer.js +40 -0
  42. package/lib/commonjs/extractors/packer.js.map +1 -0
  43. package/lib/commonjs/extractors/streamwish.js +47 -103
  44. package/lib/commonjs/extractors/streamwish.js.map +1 -1
  45. package/lib/commonjs/extractors/url.js +11 -0
  46. package/lib/commonjs/extractors/url.js.map +1 -0
  47. package/lib/commonjs/extractors/vidhide.js +32 -59
  48. package/lib/commonjs/extractors/vidhide.js.map +1 -1
  49. package/lib/commonjs/index.js +123 -217
  50. package/lib/commonjs/index.js.map +1 -1
  51. package/lib/commonjs/models/anime-parser.js +4 -17
  52. package/lib/commonjs/models/anime-parser.js.map +1 -1
  53. package/lib/commonjs/models/base-parser.js.map +1 -1
  54. package/lib/commonjs/models/base-provider.js +6 -33
  55. package/lib/commonjs/models/base-provider.js.map +1 -1
  56. package/lib/commonjs/models/index.js +25 -52
  57. package/lib/commonjs/models/index.js.map +1 -1
  58. package/lib/commonjs/models/lightnovel-parser.js.map +1 -1
  59. package/lib/commonjs/models/manga-parser.js.map +1 -1
  60. package/lib/commonjs/models/meta-error.js +10 -4
  61. package/lib/commonjs/models/meta-error.js.map +1 -1
  62. package/lib/commonjs/models/movie-parser.js.map +1 -1
  63. package/lib/commonjs/models/provider-error.js +54 -0
  64. package/lib/commonjs/models/provider-error.js.map +1 -0
  65. package/lib/commonjs/models/types.js +13 -22
  66. package/lib/commonjs/models/types.js.map +1 -1
  67. package/lib/commonjs/models/video-extractor.js +0 -10
  68. package/lib/commonjs/models/video-extractor.js.map +1 -1
  69. package/lib/commonjs/providers/anime/anikoto/anikoto.js +3 -182
  70. package/lib/commonjs/providers/anime/anikoto/anikoto.js.map +1 -1
  71. package/lib/commonjs/providers/anime/anikoto/create-anikoto.js +319 -436
  72. package/lib/commonjs/providers/anime/anikoto/create-anikoto.js.map +1 -1
  73. package/lib/commonjs/providers/anime/anikoto/hianime.js +77 -0
  74. package/lib/commonjs/providers/anime/anikoto/hianime.js.map +1 -0
  75. package/lib/commonjs/providers/anime/animepahe/animepahe.js +2 -66
  76. package/lib/commonjs/providers/anime/animepahe/animepahe.js.map +1 -1
  77. package/lib/commonjs/providers/anime/animepahe/create-animepahe.js +259 -190
  78. package/lib/commonjs/providers/anime/animepahe/create-animepahe.js.map +1 -1
  79. package/lib/commonjs/providers/anime/helpers.js +16 -0
  80. package/lib/commonjs/providers/anime/helpers.js.map +1 -0
  81. package/lib/commonjs/providers/anime/index.js +1 -13
  82. package/lib/commonjs/providers/anime/index.js.map +1 -1
  83. package/lib/commonjs/providers/anime/reanime/create-reanime.js +42 -62
  84. package/lib/commonjs/providers/anime/reanime/create-reanime.js.map +1 -1
  85. package/lib/commonjs/providers/anime/reanime/reanime.js +2 -27
  86. package/lib/commonjs/providers/anime/reanime/reanime.js.map +1 -1
  87. package/lib/commonjs/providers/common/concurrency.js +38 -0
  88. package/lib/commonjs/providers/common/concurrency.js.map +1 -0
  89. package/lib/commonjs/providers/common/enc-dec.js +9 -0
  90. package/lib/commonjs/providers/common/enc-dec.js.map +1 -0
  91. package/lib/commonjs/providers/common/errors.js +77 -0
  92. package/lib/commonjs/providers/common/errors.js.map +1 -0
  93. package/lib/commonjs/providers/common/media-status.js +20 -0
  94. package/lib/commonjs/providers/common/media-status.js.map +1 -0
  95. package/lib/commonjs/providers/common/search.js +15 -0
  96. package/lib/commonjs/providers/common/search.js.map +1 -0
  97. package/lib/commonjs/providers/common/servers.js +45 -0
  98. package/lib/commonjs/providers/common/servers.js.map +1 -0
  99. package/lib/commonjs/providers/common/ttl-cache.js +59 -0
  100. package/lib/commonjs/providers/common/ttl-cache.js.map +1 -0
  101. package/lib/commonjs/providers/index.js +2 -3
  102. package/lib/commonjs/providers/index.js.map +1 -1
  103. package/lib/commonjs/providers/light-novels/novelupdates.js +49 -98
  104. package/lib/commonjs/providers/light-novels/novelupdates.js.map +1 -1
  105. package/lib/commonjs/providers/light-novels/readlightnovels.js +51 -93
  106. package/lib/commonjs/providers/light-novels/readlightnovels.js.map +1 -1
  107. package/lib/commonjs/providers/manga/asurascans.js +43 -56
  108. package/lib/commonjs/providers/manga/asurascans.js.map +1 -1
  109. package/lib/commonjs/providers/manga/flamescans.js +11 -33
  110. package/lib/commonjs/providers/manga/flamescans.js.map +1 -1
  111. package/lib/commonjs/providers/manga/mangadex.js +18 -17
  112. package/lib/commonjs/providers/manga/mangadex.js.map +1 -1
  113. package/lib/commonjs/providers/manga/mangahere.js +107 -169
  114. package/lib/commonjs/providers/manga/mangahere.js.map +1 -1
  115. package/lib/commonjs/providers/manga/mangakakalot.js +26 -56
  116. package/lib/commonjs/providers/manga/mangakakalot.js.map +1 -1
  117. package/lib/commonjs/providers/manga/mangapill.js +82 -120
  118. package/lib/commonjs/providers/manga/mangapill.js.map +1 -1
  119. package/lib/commonjs/providers/manga/shared.js +72 -0
  120. package/lib/commonjs/providers/manga/shared.js.map +1 -0
  121. package/lib/commonjs/providers/meta/anilist-media.js +252 -0
  122. package/lib/commonjs/providers/meta/anilist-media.js.map +1 -0
  123. package/lib/commonjs/providers/meta/anilist.js +435 -842
  124. package/lib/commonjs/providers/meta/anilist.js.map +1 -1
  125. package/lib/commonjs/providers/meta/index.js +2 -2
  126. package/lib/commonjs/providers/meta/index.js.map +1 -1
  127. package/lib/commonjs/providers/meta/mal.js +139 -323
  128. package/lib/commonjs/providers/meta/mal.js.map +1 -1
  129. package/lib/commonjs/providers/meta/shared.js +132 -0
  130. package/lib/commonjs/providers/meta/shared.js.map +1 -0
  131. package/lib/commonjs/providers/meta/tmdb.js +251 -298
  132. package/lib/commonjs/providers/meta/tmdb.js.map +1 -1
  133. package/lib/commonjs/providers/movies/index.js +7 -15
  134. package/lib/commonjs/providers/movies/index.js.map +1 -1
  135. package/lib/commonjs/providers/movies/multimovies/create-multimovies.js +217 -409
  136. package/lib/commonjs/providers/movies/multimovies/create-multimovies.js.map +1 -1
  137. package/lib/commonjs/providers/movies/multimovies/multimovies.js +2 -42
  138. package/lib/commonjs/providers/movies/multimovies/multimovies.js.map +1 -1
  139. package/lib/commonjs/providers/movies/multistream/create-multistream.js +130 -0
  140. package/lib/commonjs/providers/movies/multistream/create-multistream.js.map +1 -0
  141. package/lib/commonjs/providers/movies/multistream/multistream.js +12 -0
  142. package/lib/commonjs/providers/movies/multistream/multistream.js.map +1 -0
  143. package/lib/commonjs/providers/movies/multistream/utils.js +330 -406
  144. package/lib/commonjs/providers/movies/multistream/utils.js.map +1 -1
  145. package/lib/commonjs/providers/movies/netflixmirror/create-netflixmirror.js +69 -15
  146. package/lib/commonjs/providers/movies/netflixmirror/create-netflixmirror.js.map +1 -1
  147. package/lib/commonjs/providers/movies/netflixmirror/netflixmirror.js +6 -15
  148. package/lib/commonjs/providers/movies/netflixmirror/netflixmirror.js.map +1 -1
  149. package/lib/commonjs/providers/movies/site-paths.js +34 -0
  150. package/lib/commonjs/providers/movies/site-paths.js.map +1 -0
  151. package/lib/commonjs/providers/movies/vegamovies/create-vegamovies.js +474 -654
  152. package/lib/commonjs/providers/movies/vegamovies/create-vegamovies.js.map +1 -1
  153. package/lib/commonjs/providers/movies/vegamovies/vegamovies.js +2 -44
  154. package/lib/commonjs/providers/movies/vegamovies/vegamovies.js.map +1 -1
  155. package/lib/commonjs/providers/provider-class.js +28 -0
  156. package/lib/commonjs/providers/provider-class.js.map +1 -0
  157. package/lib/commonjs/registry-signing-keys.json +6 -0
  158. package/lib/commonjs/utils/ExtractorManager.js +156 -215
  159. package/lib/commonjs/utils/ExtractorManager.js.map +1 -1
  160. package/lib/commonjs/utils/ProviderManager.js +127 -241
  161. package/lib/commonjs/utils/ProviderManager.js.map +1 -1
  162. package/lib/commonjs/utils/constants.js +3 -9
  163. package/lib/commonjs/utils/constants.js.map +1 -1
  164. package/lib/commonjs/utils/create-extractor-context.js +29 -17
  165. package/lib/commonjs/utils/create-extractor-context.js.map +1 -1
  166. package/lib/commonjs/utils/create-provider-context.js +32 -98
  167. package/lib/commonjs/utils/create-provider-context.js.map +1 -1
  168. package/lib/commonjs/utils/extension-integrity.js +2 -2
  169. package/lib/commonjs/utils/extension-integrity.js.map +1 -1
  170. package/lib/commonjs/utils/extension-modules.js +274 -44
  171. package/lib/commonjs/utils/extension-modules.js.map +1 -1
  172. package/lib/commonjs/utils/fetch-with-timeout.js +3 -2
  173. package/lib/commonjs/utils/fetch-with-timeout.js.map +1 -1
  174. package/lib/commonjs/utils/meta-http.js +18 -28
  175. package/lib/commonjs/utils/meta-http.js.map +1 -1
  176. package/lib/commonjs/utils/registry-schema.js +50 -16
  177. package/lib/commonjs/utils/registry-schema.js.map +1 -1
  178. package/lib/commonjs/utils/registry-signature-format.js +43 -0
  179. package/lib/commonjs/utils/registry-signature-format.js.map +1 -0
  180. package/lib/commonjs/utils/registry-signature.js +27 -62
  181. package/lib/commonjs/utils/registry-signature.js.map +1 -1
  182. package/lib/commonjs/utils/runtime-modules.js +14 -0
  183. package/lib/commonjs/utils/runtime-modules.js.map +1 -0
  184. package/lib/commonjs/utils/tmdb.js +185 -0
  185. package/lib/commonjs/utils/tmdb.js.map +1 -0
  186. package/lib/commonjs/utils/url-polyfill.js +13 -59
  187. package/lib/commonjs/utils/url-polyfill.js.map +1 -1
  188. package/lib/commonjs/utils/utf8.js +52 -0
  189. package/lib/commonjs/utils/utf8.js.map +1 -0
  190. package/lib/commonjs/utils/utils.js +23 -326
  191. package/lib/commonjs/utils/utils.js.map +1 -1
  192. package/lib/module/NativeConsumet.ts +50 -52
  193. package/lib/module/extension-registry.json +48 -188
  194. package/lib/module/extension-registry.json.sig +1 -1
  195. package/lib/module/extractors/file-hosts.js +32 -0
  196. package/lib/module/extractors/file-hosts.js.map +1 -0
  197. package/lib/module/extractors/flixcloud.js +23 -57
  198. package/lib/module/extractors/flixcloud.js.map +1 -1
  199. package/lib/module/extractors/gofile.js +123 -97
  200. package/lib/module/extractors/gofile.js.map +1 -1
  201. package/lib/module/extractors/hls.js +41 -0
  202. package/lib/module/extractors/hls.js.map +1 -0
  203. package/lib/module/extractors/hubcloud.js +132 -288
  204. package/lib/module/extractors/hubcloud.js.map +1 -1
  205. package/lib/module/extractors/index.js +4 -20
  206. package/lib/module/extractors/index.js.map +1 -1
  207. package/lib/module/extractors/kwik.js +16 -49
  208. package/lib/module/extractors/kwik.js.map +1 -1
  209. package/lib/module/extractors/megacloud.js +68 -140
  210. package/lib/module/extractors/megacloud.js.map +1 -1
  211. package/lib/module/extractors/megaplay.js +78 -128
  212. package/lib/module/extractors/megaplay.js.map +1 -1
  213. package/lib/module/extractors/packer.js +36 -0
  214. package/lib/module/extractors/packer.js.map +1 -0
  215. package/lib/module/extractors/streamwish.js +47 -103
  216. package/lib/module/extractors/streamwish.js.map +1 -1
  217. package/lib/module/extractors/url.js +7 -0
  218. package/lib/module/extractors/url.js.map +1 -0
  219. package/lib/module/extractors/vidhide.js +32 -59
  220. package/lib/module/extractors/vidhide.js.map +1 -1
  221. package/lib/module/index.js +20 -49
  222. package/lib/module/index.js.map +1 -1
  223. package/lib/module/models/anime-parser.js +4 -17
  224. package/lib/module/models/anime-parser.js.map +1 -1
  225. package/lib/module/models/base-parser.js.map +1 -1
  226. package/lib/module/models/base-provider.js +6 -33
  227. package/lib/module/models/base-provider.js.map +1 -1
  228. package/lib/module/models/index.js +9 -10
  229. package/lib/module/models/index.js.map +1 -1
  230. package/lib/module/models/lightnovel-parser.js.map +1 -1
  231. package/lib/module/models/manga-parser.js.map +1 -1
  232. package/lib/module/models/meta-error.js +11 -4
  233. package/lib/module/models/meta-error.js.map +1 -1
  234. package/lib/module/models/movie-parser.js.map +1 -1
  235. package/lib/module/models/provider-error.js +49 -0
  236. package/lib/module/models/provider-error.js.map +1 -0
  237. package/lib/module/models/types.js +12 -21
  238. package/lib/module/models/types.js.map +1 -1
  239. package/lib/module/models/video-extractor.js +1 -9
  240. package/lib/module/models/video-extractor.js.map +1 -1
  241. package/lib/module/providers/anime/anikoto/anikoto.js +2 -181
  242. package/lib/module/providers/anime/anikoto/anikoto.js.map +1 -1
  243. package/lib/module/providers/anime/anikoto/create-anikoto.js +320 -436
  244. package/lib/module/providers/anime/anikoto/create-anikoto.js.map +1 -1
  245. package/lib/module/providers/anime/anikoto/hianime.js +69 -0
  246. package/lib/module/providers/anime/anikoto/hianime.js.map +1 -0
  247. package/lib/module/providers/anime/animepahe/animepahe.js +2 -66
  248. package/lib/module/providers/anime/animepahe/animepahe.js.map +1 -1
  249. package/lib/module/providers/anime/animepahe/create-animepahe.js +260 -190
  250. package/lib/module/providers/anime/animepahe/create-animepahe.js.map +1 -1
  251. package/lib/module/providers/anime/helpers.js +12 -0
  252. package/lib/module/providers/anime/helpers.js.map +1 -0
  253. package/lib/module/providers/anime/index.js +1 -13
  254. package/lib/module/providers/anime/index.js.map +1 -1
  255. package/lib/module/providers/anime/reanime/create-reanime.js +40 -60
  256. package/lib/module/providers/anime/reanime/create-reanime.js.map +1 -1
  257. package/lib/module/providers/anime/reanime/reanime.js +2 -26
  258. package/lib/module/providers/anime/reanime/reanime.js.map +1 -1
  259. package/lib/module/providers/common/concurrency.js +34 -0
  260. package/lib/module/providers/common/concurrency.js.map +1 -0
  261. package/lib/module/providers/common/enc-dec.js +5 -0
  262. package/lib/module/providers/common/enc-dec.js.map +1 -0
  263. package/lib/module/providers/common/errors.js +70 -0
  264. package/lib/module/providers/common/errors.js.map +1 -0
  265. package/lib/module/providers/common/media-status.js +17 -0
  266. package/lib/module/providers/common/media-status.js.map +1 -0
  267. package/lib/module/providers/common/search.js +11 -0
  268. package/lib/module/providers/common/search.js.map +1 -0
  269. package/lib/module/providers/common/servers.js +40 -0
  270. package/lib/module/providers/common/servers.js.map +1 -0
  271. package/lib/module/providers/common/ttl-cache.js +54 -0
  272. package/lib/module/providers/common/ttl-cache.js.map +1 -0
  273. package/lib/module/providers/index.js +5 -6
  274. package/lib/module/providers/index.js.map +1 -1
  275. package/lib/module/providers/light-novels/novelupdates.js +51 -99
  276. package/lib/module/providers/light-novels/novelupdates.js.map +1 -1
  277. package/lib/module/providers/light-novels/readlightnovels.js +52 -93
  278. package/lib/module/providers/light-novels/readlightnovels.js.map +1 -1
  279. package/lib/module/providers/manga/asurascans.js +43 -56
  280. package/lib/module/providers/manga/asurascans.js.map +1 -1
  281. package/lib/module/providers/manga/flamescans.js +12 -34
  282. package/lib/module/providers/manga/flamescans.js.map +1 -1
  283. package/lib/module/providers/manga/mangadex.js +19 -18
  284. package/lib/module/providers/manga/mangadex.js.map +1 -1
  285. package/lib/module/providers/manga/mangahere.js +108 -170
  286. package/lib/module/providers/manga/mangahere.js.map +1 -1
  287. package/lib/module/providers/manga/mangakakalot.js +27 -57
  288. package/lib/module/providers/manga/mangakakalot.js.map +1 -1
  289. package/lib/module/providers/manga/mangapill.js +83 -122
  290. package/lib/module/providers/manga/mangapill.js.map +1 -1
  291. package/lib/module/providers/manga/shared.js +63 -0
  292. package/lib/module/providers/manga/shared.js.map +1 -0
  293. package/lib/module/providers/meta/anilist-media.js +239 -0
  294. package/lib/module/providers/meta/anilist-media.js.map +1 -0
  295. package/lib/module/providers/meta/anilist.js +429 -837
  296. package/lib/module/providers/meta/anilist.js.map +1 -1
  297. package/lib/module/providers/meta/index.js +1 -1
  298. package/lib/module/providers/meta/index.js.map +1 -1
  299. package/lib/module/providers/meta/mal.js +136 -322
  300. package/lib/module/providers/meta/mal.js.map +1 -1
  301. package/lib/module/providers/meta/shared.js +124 -0
  302. package/lib/module/providers/meta/shared.js.map +1 -0
  303. package/lib/module/providers/meta/tmdb.js +251 -299
  304. package/lib/module/providers/meta/tmdb.js.map +1 -1
  305. package/lib/module/providers/movies/index.js +5 -13
  306. package/lib/module/providers/movies/index.js.map +1 -1
  307. package/lib/module/providers/movies/multimovies/create-multimovies.js +218 -409
  308. package/lib/module/providers/movies/multimovies/create-multimovies.js.map +1 -1
  309. package/lib/module/providers/movies/multimovies/multimovies.js +2 -42
  310. package/lib/module/providers/movies/multimovies/multimovies.js.map +1 -1
  311. package/lib/module/providers/movies/multistream/create-multistream.js +127 -0
  312. package/lib/module/providers/movies/multistream/create-multistream.js.map +1 -0
  313. package/lib/module/providers/movies/multistream/multistream.js +9 -0
  314. package/lib/module/providers/movies/multistream/multistream.js.map +1 -0
  315. package/lib/module/providers/movies/multistream/utils.js +325 -397
  316. package/lib/module/providers/movies/multistream/utils.js.map +1 -1
  317. package/lib/module/providers/movies/netflixmirror/create-netflixmirror.js +69 -15
  318. package/lib/module/providers/movies/netflixmirror/create-netflixmirror.js.map +1 -1
  319. package/lib/module/providers/movies/netflixmirror/netflixmirror.js +6 -14
  320. package/lib/module/providers/movies/netflixmirror/netflixmirror.js.map +1 -1
  321. package/lib/module/providers/movies/site-paths.js +28 -0
  322. package/lib/module/providers/movies/site-paths.js.map +1 -0
  323. package/lib/module/providers/movies/vegamovies/create-vegamovies.js +474 -654
  324. package/lib/module/providers/movies/vegamovies/create-vegamovies.js.map +1 -1
  325. package/lib/module/providers/movies/vegamovies/vegamovies.js +2 -44
  326. package/lib/module/providers/movies/vegamovies/vegamovies.js.map +1 -1
  327. package/lib/module/providers/provider-class.js +25 -0
  328. package/lib/module/providers/provider-class.js.map +1 -0
  329. package/lib/module/registry-signing-keys.json +6 -0
  330. package/lib/module/utils/ExtractorManager.js +155 -215
  331. package/lib/module/utils/ExtractorManager.js.map +1 -1
  332. package/lib/module/utils/ProviderManager.js +128 -241
  333. package/lib/module/utils/ProviderManager.js.map +1 -1
  334. package/lib/module/utils/constants.js +2 -8
  335. package/lib/module/utils/constants.js.map +1 -1
  336. package/lib/module/utils/create-extractor-context.js +28 -18
  337. package/lib/module/utils/create-extractor-context.js.map +1 -1
  338. package/lib/module/utils/create-provider-context.js +33 -98
  339. package/lib/module/utils/create-provider-context.js.map +1 -1
  340. package/lib/module/utils/extension-integrity.js +1 -1
  341. package/lib/module/utils/extension-integrity.js.map +1 -1
  342. package/lib/module/utils/extension-modules.js +270 -44
  343. package/lib/module/utils/extension-modules.js.map +1 -1
  344. package/lib/module/utils/fetch-with-timeout.js +3 -2
  345. package/lib/module/utils/fetch-with-timeout.js.map +1 -1
  346. package/lib/module/utils/meta-http.js +17 -26
  347. package/lib/module/utils/meta-http.js.map +1 -1
  348. package/lib/module/utils/registry-schema.js +48 -15
  349. package/lib/module/utils/registry-schema.js.map +1 -1
  350. package/lib/module/utils/registry-signature-format.js +37 -0
  351. package/lib/module/utils/registry-signature-format.js.map +1 -0
  352. package/lib/module/utils/registry-signature.js +23 -58
  353. package/lib/module/utils/registry-signature.js.map +1 -1
  354. package/lib/module/utils/runtime-modules.js +10 -0
  355. package/lib/module/utils/runtime-modules.js.map +1 -0
  356. package/lib/module/utils/tmdb.js +172 -0
  357. package/lib/module/utils/tmdb.js.map +1 -0
  358. package/lib/module/utils/url-polyfill.js +1 -47
  359. package/lib/module/utils/url-polyfill.js.map +1 -1
  360. package/lib/module/utils/utf8.js +45 -0
  361. package/lib/module/utils/utf8.js.map +1 -0
  362. package/lib/module/utils/utils.js +16 -281
  363. package/lib/module/utils/utils.js.map +1 -1
  364. package/lib/typescript/commonjs/src/NativeConsumet.d.ts +44 -79
  365. package/lib/typescript/commonjs/src/NativeConsumet.d.ts.map +1 -1
  366. package/lib/typescript/commonjs/src/extractors/file-hosts.d.ts +18 -0
  367. package/lib/typescript/commonjs/src/extractors/file-hosts.d.ts.map +1 -0
  368. package/lib/typescript/commonjs/src/extractors/flixcloud.d.ts +9 -9
  369. package/lib/typescript/commonjs/src/extractors/flixcloud.d.ts.map +1 -1
  370. package/lib/typescript/commonjs/src/extractors/gofile.d.ts +5 -6
  371. package/lib/typescript/commonjs/src/extractors/gofile.d.ts.map +1 -1
  372. package/lib/typescript/commonjs/src/extractors/hls.d.ts +14 -0
  373. package/lib/typescript/commonjs/src/extractors/hls.d.ts.map +1 -0
  374. package/lib/typescript/commonjs/src/extractors/hubcloud.d.ts +8 -4
  375. package/lib/typescript/commonjs/src/extractors/hubcloud.d.ts.map +1 -1
  376. package/lib/typescript/commonjs/src/extractors/index.d.ts +4 -20
  377. package/lib/typescript/commonjs/src/extractors/index.d.ts.map +1 -1
  378. package/lib/typescript/commonjs/src/extractors/kwik.d.ts +6 -7
  379. package/lib/typescript/commonjs/src/extractors/kwik.d.ts.map +1 -1
  380. package/lib/typescript/commonjs/src/extractors/megacloud.d.ts +7 -5
  381. package/lib/typescript/commonjs/src/extractors/megacloud.d.ts.map +1 -1
  382. package/lib/typescript/commonjs/src/extractors/megaplay.d.ts +6 -7
  383. package/lib/typescript/commonjs/src/extractors/megaplay.d.ts.map +1 -1
  384. package/lib/typescript/commonjs/src/extractors/packer.d.ts +3 -0
  385. package/lib/typescript/commonjs/src/extractors/packer.d.ts.map +1 -0
  386. package/lib/typescript/commonjs/src/extractors/streamwish.d.ts +5 -7
  387. package/lib/typescript/commonjs/src/extractors/streamwish.d.ts.map +1 -1
  388. package/lib/typescript/commonjs/src/extractors/url.d.ts +4 -0
  389. package/lib/typescript/commonjs/src/extractors/url.d.ts.map +1 -0
  390. package/lib/typescript/commonjs/src/extractors/vidhide.d.ts +5 -7
  391. package/lib/typescript/commonjs/src/extractors/vidhide.d.ts.map +1 -1
  392. package/lib/typescript/commonjs/src/index.d.ts +17 -20
  393. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  394. package/lib/typescript/commonjs/src/models/anime-parser.d.ts +10 -21
  395. package/lib/typescript/commonjs/src/models/anime-parser.d.ts.map +1 -1
  396. package/lib/typescript/commonjs/src/models/base-parser.d.ts +0 -5
  397. package/lib/typescript/commonjs/src/models/base-parser.d.ts.map +1 -1
  398. package/lib/typescript/commonjs/src/models/base-provider.d.ts +7 -31
  399. package/lib/typescript/commonjs/src/models/base-provider.d.ts.map +1 -1
  400. package/lib/typescript/commonjs/src/models/extension-manifest.d.ts +5 -1
  401. package/lib/typescript/commonjs/src/models/extension-manifest.d.ts.map +1 -1
  402. package/lib/typescript/commonjs/src/models/extractor-context.d.ts +5 -34
  403. package/lib/typescript/commonjs/src/models/extractor-context.d.ts.map +1 -1
  404. package/lib/typescript/commonjs/src/models/index.d.ts +13 -15
  405. package/lib/typescript/commonjs/src/models/index.d.ts.map +1 -1
  406. package/lib/typescript/commonjs/src/models/lightnovel-parser.d.ts +5 -12
  407. package/lib/typescript/commonjs/src/models/lightnovel-parser.d.ts.map +1 -1
  408. package/lib/typescript/commonjs/src/models/manga-parser.d.ts +2 -10
  409. package/lib/typescript/commonjs/src/models/manga-parser.d.ts.map +1 -1
  410. package/lib/typescript/commonjs/src/models/meta-error.d.ts +9 -3
  411. package/lib/typescript/commonjs/src/models/meta-error.d.ts.map +1 -1
  412. package/lib/typescript/commonjs/src/models/movie-parser.d.ts +8 -24
  413. package/lib/typescript/commonjs/src/models/movie-parser.d.ts.map +1 -1
  414. package/lib/typescript/commonjs/src/models/provider-context.d.ts +11 -138
  415. package/lib/typescript/commonjs/src/models/provider-context.d.ts.map +1 -1
  416. package/lib/typescript/commonjs/src/models/provider-error.d.ts +32 -0
  417. package/lib/typescript/commonjs/src/models/provider-error.d.ts.map +1 -0
  418. package/lib/typescript/commonjs/src/models/types.d.ts +43 -39
  419. package/lib/typescript/commonjs/src/models/types.d.ts.map +1 -1
  420. package/lib/typescript/commonjs/src/models/video-extractor.d.ts +7 -38
  421. package/lib/typescript/commonjs/src/models/video-extractor.d.ts.map +1 -1
  422. package/lib/typescript/commonjs/src/providers/anime/anikoto/anikoto.d.ts +4 -148
  423. package/lib/typescript/commonjs/src/providers/anime/anikoto/anikoto.d.ts.map +1 -1
  424. package/lib/typescript/commonjs/src/providers/anime/anikoto/create-anikoto.d.ts +2 -2
  425. package/lib/typescript/commonjs/src/providers/anime/anikoto/create-anikoto.d.ts.map +1 -1
  426. package/lib/typescript/commonjs/src/providers/anime/anikoto/hianime.d.ts +24 -0
  427. package/lib/typescript/commonjs/src/providers/anime/anikoto/hianime.d.ts.map +1 -0
  428. package/lib/typescript/commonjs/src/providers/anime/animepahe/animepahe.d.ts +4 -40
  429. package/lib/typescript/commonjs/src/providers/anime/animepahe/animepahe.d.ts.map +1 -1
  430. package/lib/typescript/commonjs/src/providers/anime/animepahe/create-animepahe.d.ts +4 -4
  431. package/lib/typescript/commonjs/src/providers/anime/animepahe/create-animepahe.d.ts.map +1 -1
  432. package/lib/typescript/commonjs/src/providers/anime/helpers.d.ts +6 -0
  433. package/lib/typescript/commonjs/src/providers/anime/helpers.d.ts.map +1 -0
  434. package/lib/typescript/commonjs/src/providers/anime/index.d.ts +3 -18
  435. package/lib/typescript/commonjs/src/providers/anime/index.d.ts.map +1 -1
  436. package/lib/typescript/commonjs/src/providers/anime/reanime/create-reanime.d.ts +2 -2
  437. package/lib/typescript/commonjs/src/providers/anime/reanime/create-reanime.d.ts.map +1 -1
  438. package/lib/typescript/commonjs/src/providers/anime/reanime/reanime.d.ts +4 -23
  439. package/lib/typescript/commonjs/src/providers/anime/reanime/reanime.d.ts.map +1 -1
  440. package/lib/typescript/commonjs/src/providers/common/concurrency.d.ts +8 -0
  441. package/lib/typescript/commonjs/src/providers/common/concurrency.d.ts.map +1 -0
  442. package/lib/typescript/commonjs/src/providers/common/enc-dec.d.ts +3 -0
  443. package/lib/typescript/commonjs/src/providers/common/enc-dec.d.ts.map +1 -0
  444. package/lib/typescript/commonjs/src/providers/common/errors.d.ts +36 -0
  445. package/lib/typescript/commonjs/src/providers/common/errors.d.ts.map +1 -0
  446. package/lib/typescript/commonjs/src/providers/common/media-status.d.ts +7 -0
  447. package/lib/typescript/commonjs/src/providers/common/media-status.d.ts.map +1 -0
  448. package/lib/typescript/commonjs/src/providers/common/search.d.ts +4 -0
  449. package/lib/typescript/commonjs/src/providers/common/search.d.ts.map +1 -0
  450. package/lib/typescript/commonjs/src/providers/common/servers.d.ts +17 -0
  451. package/lib/typescript/commonjs/src/providers/common/servers.d.ts.map +1 -0
  452. package/lib/typescript/commonjs/src/providers/common/ttl-cache.d.ts +21 -0
  453. package/lib/typescript/commonjs/src/providers/common/ttl-cache.d.ts.map +1 -0
  454. package/lib/typescript/commonjs/src/providers/index.d.ts +5 -6
  455. package/lib/typescript/commonjs/src/providers/index.d.ts.map +1 -1
  456. package/lib/typescript/commonjs/src/providers/light-novels/novelupdates.d.ts +11 -12
  457. package/lib/typescript/commonjs/src/providers/light-novels/novelupdates.d.ts.map +1 -1
  458. package/lib/typescript/commonjs/src/providers/light-novels/readlightnovels.d.ts +3 -11
  459. package/lib/typescript/commonjs/src/providers/light-novels/readlightnovels.d.ts.map +1 -1
  460. package/lib/typescript/commonjs/src/providers/manga/asurascans.d.ts +1 -5
  461. package/lib/typescript/commonjs/src/providers/manga/asurascans.d.ts.map +1 -1
  462. package/lib/typescript/commonjs/src/providers/manga/flamescans.d.ts +2 -4
  463. package/lib/typescript/commonjs/src/providers/manga/flamescans.d.ts.map +1 -1
  464. package/lib/typescript/commonjs/src/providers/manga/mangadex.d.ts +6 -4
  465. package/lib/typescript/commonjs/src/providers/manga/mangadex.d.ts.map +1 -1
  466. package/lib/typescript/commonjs/src/providers/manga/mangahere.d.ts +4 -4
  467. package/lib/typescript/commonjs/src/providers/manga/mangahere.d.ts.map +1 -1
  468. package/lib/typescript/commonjs/src/providers/manga/mangakakalot.d.ts +4 -13
  469. package/lib/typescript/commonjs/src/providers/manga/mangakakalot.d.ts.map +1 -1
  470. package/lib/typescript/commonjs/src/providers/manga/mangapill.d.ts +1 -8
  471. package/lib/typescript/commonjs/src/providers/manga/mangapill.d.ts.map +1 -1
  472. package/lib/typescript/commonjs/src/providers/manga/shared.d.ts +28 -0
  473. package/lib/typescript/commonjs/src/providers/manga/shared.d.ts.map +1 -0
  474. package/lib/typescript/commonjs/src/providers/meta/anilist-media.d.ts +188 -0
  475. package/lib/typescript/commonjs/src/providers/meta/anilist-media.d.ts.map +1 -0
  476. package/lib/typescript/commonjs/src/providers/meta/anilist.d.ts +90 -131
  477. package/lib/typescript/commonjs/src/providers/meta/anilist.d.ts.map +1 -1
  478. package/lib/typescript/commonjs/src/providers/meta/index.d.ts +1 -2
  479. package/lib/typescript/commonjs/src/providers/meta/index.d.ts.map +1 -1
  480. package/lib/typescript/commonjs/src/providers/meta/mal.d.ts +12 -18
  481. package/lib/typescript/commonjs/src/providers/meta/mal.d.ts.map +1 -1
  482. package/lib/typescript/commonjs/src/providers/meta/shared.d.ts +48 -0
  483. package/lib/typescript/commonjs/src/providers/meta/shared.d.ts.map +1 -0
  484. package/lib/typescript/commonjs/src/providers/meta/tmdb.d.ts +77 -26
  485. package/lib/typescript/commonjs/src/providers/meta/tmdb.d.ts.map +1 -1
  486. package/lib/typescript/commonjs/src/providers/movies/index.d.ts +8 -20
  487. package/lib/typescript/commonjs/src/providers/movies/index.d.ts.map +1 -1
  488. package/lib/typescript/commonjs/src/providers/movies/multimovies/create-multimovies.d.ts +8 -3
  489. package/lib/typescript/commonjs/src/providers/movies/multimovies/create-multimovies.d.ts.map +1 -1
  490. package/lib/typescript/commonjs/src/providers/movies/multimovies/multimovies.d.ts +4 -25
  491. package/lib/typescript/commonjs/src/providers/movies/multimovies/multimovies.d.ts.map +1 -1
  492. package/lib/typescript/commonjs/src/providers/movies/multistream/create-multistream.d.ts +26 -0
  493. package/lib/typescript/commonjs/src/providers/movies/multistream/create-multistream.d.ts.map +1 -0
  494. package/lib/typescript/commonjs/src/providers/movies/multistream/multistream.d.ts +6 -0
  495. package/lib/typescript/commonjs/src/providers/movies/multistream/multistream.d.ts.map +1 -0
  496. package/lib/typescript/commonjs/src/providers/movies/multistream/utils.d.ts +21 -19
  497. package/lib/typescript/commonjs/src/providers/movies/multistream/utils.d.ts.map +1 -1
  498. package/lib/typescript/commonjs/src/providers/movies/netflixmirror/create-netflixmirror.d.ts +40 -8
  499. package/lib/typescript/commonjs/src/providers/movies/netflixmirror/create-netflixmirror.d.ts.map +1 -1
  500. package/lib/typescript/commonjs/src/providers/movies/netflixmirror/netflixmirror.d.ts +8 -11
  501. package/lib/typescript/commonjs/src/providers/movies/netflixmirror/netflixmirror.d.ts.map +1 -1
  502. package/lib/typescript/commonjs/src/providers/movies/site-paths.d.ts +12 -0
  503. package/lib/typescript/commonjs/src/providers/movies/site-paths.d.ts.map +1 -0
  504. package/lib/typescript/commonjs/src/providers/movies/vegamovies/create-vegamovies.d.ts +9 -3
  505. package/lib/typescript/commonjs/src/providers/movies/vegamovies/create-vegamovies.d.ts.map +1 -1
  506. package/lib/typescript/commonjs/src/providers/movies/vegamovies/vegamovies.d.ts +4 -27
  507. package/lib/typescript/commonjs/src/providers/movies/vegamovies/vegamovies.d.ts.map +1 -1
  508. package/lib/typescript/commonjs/src/providers/provider-class.d.ts +23 -0
  509. package/lib/typescript/commonjs/src/providers/provider-class.d.ts.map +1 -0
  510. package/lib/typescript/commonjs/src/utils/ExtractorManager.d.ts +57 -49
  511. package/lib/typescript/commonjs/src/utils/ExtractorManager.d.ts.map +1 -1
  512. package/lib/typescript/commonjs/src/utils/ProviderManager.d.ts +50 -69
  513. package/lib/typescript/commonjs/src/utils/ProviderManager.d.ts.map +1 -1
  514. package/lib/typescript/commonjs/src/utils/constants.d.ts +2 -7
  515. package/lib/typescript/commonjs/src/utils/constants.d.ts.map +1 -1
  516. package/lib/typescript/commonjs/src/utils/create-extractor-context.d.ts +17 -5
  517. package/lib/typescript/commonjs/src/utils/create-extractor-context.d.ts.map +1 -1
  518. package/lib/typescript/commonjs/src/utils/create-provider-context.d.ts +12 -8
  519. package/lib/typescript/commonjs/src/utils/create-provider-context.d.ts.map +1 -1
  520. package/lib/typescript/commonjs/src/utils/extension-integrity.d.ts.map +1 -1
  521. package/lib/typescript/commonjs/src/utils/extension-modules.d.ts +74 -24
  522. package/lib/typescript/commonjs/src/utils/extension-modules.d.ts.map +1 -1
  523. package/lib/typescript/commonjs/src/utils/fetch-with-timeout.d.ts +1 -1
  524. package/lib/typescript/commonjs/src/utils/fetch-with-timeout.d.ts.map +1 -1
  525. package/lib/typescript/commonjs/src/utils/meta-http.d.ts +2 -13
  526. package/lib/typescript/commonjs/src/utils/meta-http.d.ts.map +1 -1
  527. package/lib/typescript/commonjs/src/utils/registry-schema.d.ts +27 -1
  528. package/lib/typescript/commonjs/src/utils/registry-schema.d.ts.map +1 -1
  529. package/lib/typescript/commonjs/src/utils/registry-signature-format.d.ts +15 -0
  530. package/lib/typescript/commonjs/src/utils/registry-signature-format.d.ts.map +1 -0
  531. package/lib/typescript/commonjs/src/utils/registry-signature.d.ts +10 -4
  532. package/lib/typescript/commonjs/src/utils/registry-signature.d.ts.map +1 -1
  533. package/lib/typescript/commonjs/src/utils/runtime-modules.d.ts +8 -0
  534. package/lib/typescript/commonjs/src/utils/runtime-modules.d.ts.map +1 -0
  535. package/lib/typescript/commonjs/src/utils/tmdb.d.ts +86 -0
  536. package/lib/typescript/commonjs/src/utils/tmdb.d.ts.map +1 -0
  537. package/lib/typescript/commonjs/src/utils/url-polyfill.d.ts.map +1 -1
  538. package/lib/typescript/commonjs/src/utils/utf8.d.ts +7 -0
  539. package/lib/typescript/commonjs/src/utils/utf8.d.ts.map +1 -0
  540. package/lib/typescript/commonjs/src/utils/utils.d.ts +12 -36
  541. package/lib/typescript/commonjs/src/utils/utils.d.ts.map +1 -1
  542. package/lib/typescript/module/src/NativeConsumet.d.ts +44 -79
  543. package/lib/typescript/module/src/NativeConsumet.d.ts.map +1 -1
  544. package/lib/typescript/module/src/extractors/file-hosts.d.ts +18 -0
  545. package/lib/typescript/module/src/extractors/file-hosts.d.ts.map +1 -0
  546. package/lib/typescript/module/src/extractors/flixcloud.d.ts +9 -9
  547. package/lib/typescript/module/src/extractors/flixcloud.d.ts.map +1 -1
  548. package/lib/typescript/module/src/extractors/gofile.d.ts +5 -6
  549. package/lib/typescript/module/src/extractors/gofile.d.ts.map +1 -1
  550. package/lib/typescript/module/src/extractors/hls.d.ts +14 -0
  551. package/lib/typescript/module/src/extractors/hls.d.ts.map +1 -0
  552. package/lib/typescript/module/src/extractors/hubcloud.d.ts +8 -4
  553. package/lib/typescript/module/src/extractors/hubcloud.d.ts.map +1 -1
  554. package/lib/typescript/module/src/extractors/index.d.ts +4 -20
  555. package/lib/typescript/module/src/extractors/index.d.ts.map +1 -1
  556. package/lib/typescript/module/src/extractors/kwik.d.ts +6 -7
  557. package/lib/typescript/module/src/extractors/kwik.d.ts.map +1 -1
  558. package/lib/typescript/module/src/extractors/megacloud.d.ts +7 -5
  559. package/lib/typescript/module/src/extractors/megacloud.d.ts.map +1 -1
  560. package/lib/typescript/module/src/extractors/megaplay.d.ts +6 -7
  561. package/lib/typescript/module/src/extractors/megaplay.d.ts.map +1 -1
  562. package/lib/typescript/module/src/extractors/packer.d.ts +3 -0
  563. package/lib/typescript/module/src/extractors/packer.d.ts.map +1 -0
  564. package/lib/typescript/module/src/extractors/streamwish.d.ts +5 -7
  565. package/lib/typescript/module/src/extractors/streamwish.d.ts.map +1 -1
  566. package/lib/typescript/module/src/extractors/url.d.ts +4 -0
  567. package/lib/typescript/module/src/extractors/url.d.ts.map +1 -0
  568. package/lib/typescript/module/src/extractors/vidhide.d.ts +5 -7
  569. package/lib/typescript/module/src/extractors/vidhide.d.ts.map +1 -1
  570. package/lib/typescript/module/src/index.d.ts +17 -20
  571. package/lib/typescript/module/src/index.d.ts.map +1 -1
  572. package/lib/typescript/module/src/models/anime-parser.d.ts +10 -21
  573. package/lib/typescript/module/src/models/anime-parser.d.ts.map +1 -1
  574. package/lib/typescript/module/src/models/base-parser.d.ts +0 -5
  575. package/lib/typescript/module/src/models/base-parser.d.ts.map +1 -1
  576. package/lib/typescript/module/src/models/base-provider.d.ts +7 -31
  577. package/lib/typescript/module/src/models/base-provider.d.ts.map +1 -1
  578. package/lib/typescript/module/src/models/extension-manifest.d.ts +5 -1
  579. package/lib/typescript/module/src/models/extension-manifest.d.ts.map +1 -1
  580. package/lib/typescript/module/src/models/extractor-context.d.ts +5 -34
  581. package/lib/typescript/module/src/models/extractor-context.d.ts.map +1 -1
  582. package/lib/typescript/module/src/models/index.d.ts +13 -15
  583. package/lib/typescript/module/src/models/index.d.ts.map +1 -1
  584. package/lib/typescript/module/src/models/lightnovel-parser.d.ts +5 -12
  585. package/lib/typescript/module/src/models/lightnovel-parser.d.ts.map +1 -1
  586. package/lib/typescript/module/src/models/manga-parser.d.ts +2 -10
  587. package/lib/typescript/module/src/models/manga-parser.d.ts.map +1 -1
  588. package/lib/typescript/module/src/models/meta-error.d.ts +9 -3
  589. package/lib/typescript/module/src/models/meta-error.d.ts.map +1 -1
  590. package/lib/typescript/module/src/models/movie-parser.d.ts +8 -24
  591. package/lib/typescript/module/src/models/movie-parser.d.ts.map +1 -1
  592. package/lib/typescript/module/src/models/provider-context.d.ts +11 -138
  593. package/lib/typescript/module/src/models/provider-context.d.ts.map +1 -1
  594. package/lib/typescript/module/src/models/provider-error.d.ts +32 -0
  595. package/lib/typescript/module/src/models/provider-error.d.ts.map +1 -0
  596. package/lib/typescript/module/src/models/types.d.ts +43 -39
  597. package/lib/typescript/module/src/models/types.d.ts.map +1 -1
  598. package/lib/typescript/module/src/models/video-extractor.d.ts +7 -38
  599. package/lib/typescript/module/src/models/video-extractor.d.ts.map +1 -1
  600. package/lib/typescript/module/src/providers/anime/anikoto/anikoto.d.ts +4 -148
  601. package/lib/typescript/module/src/providers/anime/anikoto/anikoto.d.ts.map +1 -1
  602. package/lib/typescript/module/src/providers/anime/anikoto/create-anikoto.d.ts +2 -2
  603. package/lib/typescript/module/src/providers/anime/anikoto/create-anikoto.d.ts.map +1 -1
  604. package/lib/typescript/module/src/providers/anime/anikoto/hianime.d.ts +24 -0
  605. package/lib/typescript/module/src/providers/anime/anikoto/hianime.d.ts.map +1 -0
  606. package/lib/typescript/module/src/providers/anime/animepahe/animepahe.d.ts +4 -40
  607. package/lib/typescript/module/src/providers/anime/animepahe/animepahe.d.ts.map +1 -1
  608. package/lib/typescript/module/src/providers/anime/animepahe/create-animepahe.d.ts +4 -4
  609. package/lib/typescript/module/src/providers/anime/animepahe/create-animepahe.d.ts.map +1 -1
  610. package/lib/typescript/module/src/providers/anime/helpers.d.ts +6 -0
  611. package/lib/typescript/module/src/providers/anime/helpers.d.ts.map +1 -0
  612. package/lib/typescript/module/src/providers/anime/index.d.ts +3 -18
  613. package/lib/typescript/module/src/providers/anime/index.d.ts.map +1 -1
  614. package/lib/typescript/module/src/providers/anime/reanime/create-reanime.d.ts +2 -2
  615. package/lib/typescript/module/src/providers/anime/reanime/create-reanime.d.ts.map +1 -1
  616. package/lib/typescript/module/src/providers/anime/reanime/reanime.d.ts +4 -23
  617. package/lib/typescript/module/src/providers/anime/reanime/reanime.d.ts.map +1 -1
  618. package/lib/typescript/module/src/providers/common/concurrency.d.ts +8 -0
  619. package/lib/typescript/module/src/providers/common/concurrency.d.ts.map +1 -0
  620. package/lib/typescript/module/src/providers/common/enc-dec.d.ts +3 -0
  621. package/lib/typescript/module/src/providers/common/enc-dec.d.ts.map +1 -0
  622. package/lib/typescript/module/src/providers/common/errors.d.ts +36 -0
  623. package/lib/typescript/module/src/providers/common/errors.d.ts.map +1 -0
  624. package/lib/typescript/module/src/providers/common/media-status.d.ts +7 -0
  625. package/lib/typescript/module/src/providers/common/media-status.d.ts.map +1 -0
  626. package/lib/typescript/module/src/providers/common/search.d.ts +4 -0
  627. package/lib/typescript/module/src/providers/common/search.d.ts.map +1 -0
  628. package/lib/typescript/module/src/providers/common/servers.d.ts +17 -0
  629. package/lib/typescript/module/src/providers/common/servers.d.ts.map +1 -0
  630. package/lib/typescript/module/src/providers/common/ttl-cache.d.ts +21 -0
  631. package/lib/typescript/module/src/providers/common/ttl-cache.d.ts.map +1 -0
  632. package/lib/typescript/module/src/providers/index.d.ts +5 -6
  633. package/lib/typescript/module/src/providers/index.d.ts.map +1 -1
  634. package/lib/typescript/module/src/providers/light-novels/novelupdates.d.ts +11 -12
  635. package/lib/typescript/module/src/providers/light-novels/novelupdates.d.ts.map +1 -1
  636. package/lib/typescript/module/src/providers/light-novels/readlightnovels.d.ts +3 -11
  637. package/lib/typescript/module/src/providers/light-novels/readlightnovels.d.ts.map +1 -1
  638. package/lib/typescript/module/src/providers/manga/asurascans.d.ts +1 -5
  639. package/lib/typescript/module/src/providers/manga/asurascans.d.ts.map +1 -1
  640. package/lib/typescript/module/src/providers/manga/flamescans.d.ts +2 -4
  641. package/lib/typescript/module/src/providers/manga/flamescans.d.ts.map +1 -1
  642. package/lib/typescript/module/src/providers/manga/mangadex.d.ts +6 -4
  643. package/lib/typescript/module/src/providers/manga/mangadex.d.ts.map +1 -1
  644. package/lib/typescript/module/src/providers/manga/mangahere.d.ts +4 -4
  645. package/lib/typescript/module/src/providers/manga/mangahere.d.ts.map +1 -1
  646. package/lib/typescript/module/src/providers/manga/mangakakalot.d.ts +4 -13
  647. package/lib/typescript/module/src/providers/manga/mangakakalot.d.ts.map +1 -1
  648. package/lib/typescript/module/src/providers/manga/mangapill.d.ts +1 -8
  649. package/lib/typescript/module/src/providers/manga/mangapill.d.ts.map +1 -1
  650. package/lib/typescript/module/src/providers/manga/shared.d.ts +28 -0
  651. package/lib/typescript/module/src/providers/manga/shared.d.ts.map +1 -0
  652. package/lib/typescript/module/src/providers/meta/anilist-media.d.ts +188 -0
  653. package/lib/typescript/module/src/providers/meta/anilist-media.d.ts.map +1 -0
  654. package/lib/typescript/module/src/providers/meta/anilist.d.ts +90 -131
  655. package/lib/typescript/module/src/providers/meta/anilist.d.ts.map +1 -1
  656. package/lib/typescript/module/src/providers/meta/index.d.ts +1 -2
  657. package/lib/typescript/module/src/providers/meta/index.d.ts.map +1 -1
  658. package/lib/typescript/module/src/providers/meta/mal.d.ts +12 -18
  659. package/lib/typescript/module/src/providers/meta/mal.d.ts.map +1 -1
  660. package/lib/typescript/module/src/providers/meta/shared.d.ts +48 -0
  661. package/lib/typescript/module/src/providers/meta/shared.d.ts.map +1 -0
  662. package/lib/typescript/module/src/providers/meta/tmdb.d.ts +77 -26
  663. package/lib/typescript/module/src/providers/meta/tmdb.d.ts.map +1 -1
  664. package/lib/typescript/module/src/providers/movies/index.d.ts +8 -20
  665. package/lib/typescript/module/src/providers/movies/index.d.ts.map +1 -1
  666. package/lib/typescript/module/src/providers/movies/multimovies/create-multimovies.d.ts +8 -3
  667. package/lib/typescript/module/src/providers/movies/multimovies/create-multimovies.d.ts.map +1 -1
  668. package/lib/typescript/module/src/providers/movies/multimovies/multimovies.d.ts +4 -25
  669. package/lib/typescript/module/src/providers/movies/multimovies/multimovies.d.ts.map +1 -1
  670. package/lib/typescript/module/src/providers/movies/multistream/create-multistream.d.ts +26 -0
  671. package/lib/typescript/module/src/providers/movies/multistream/create-multistream.d.ts.map +1 -0
  672. package/lib/typescript/module/src/providers/movies/multistream/multistream.d.ts +6 -0
  673. package/lib/typescript/module/src/providers/movies/multistream/multistream.d.ts.map +1 -0
  674. package/lib/typescript/module/src/providers/movies/multistream/utils.d.ts +21 -19
  675. package/lib/typescript/module/src/providers/movies/multistream/utils.d.ts.map +1 -1
  676. package/lib/typescript/module/src/providers/movies/netflixmirror/create-netflixmirror.d.ts +40 -8
  677. package/lib/typescript/module/src/providers/movies/netflixmirror/create-netflixmirror.d.ts.map +1 -1
  678. package/lib/typescript/module/src/providers/movies/netflixmirror/netflixmirror.d.ts +8 -11
  679. package/lib/typescript/module/src/providers/movies/netflixmirror/netflixmirror.d.ts.map +1 -1
  680. package/lib/typescript/module/src/providers/movies/site-paths.d.ts +12 -0
  681. package/lib/typescript/module/src/providers/movies/site-paths.d.ts.map +1 -0
  682. package/lib/typescript/module/src/providers/movies/vegamovies/create-vegamovies.d.ts +9 -3
  683. package/lib/typescript/module/src/providers/movies/vegamovies/create-vegamovies.d.ts.map +1 -1
  684. package/lib/typescript/module/src/providers/movies/vegamovies/vegamovies.d.ts +4 -27
  685. package/lib/typescript/module/src/providers/movies/vegamovies/vegamovies.d.ts.map +1 -1
  686. package/lib/typescript/module/src/providers/provider-class.d.ts +23 -0
  687. package/lib/typescript/module/src/providers/provider-class.d.ts.map +1 -0
  688. package/lib/typescript/module/src/utils/ExtractorManager.d.ts +57 -49
  689. package/lib/typescript/module/src/utils/ExtractorManager.d.ts.map +1 -1
  690. package/lib/typescript/module/src/utils/ProviderManager.d.ts +50 -69
  691. package/lib/typescript/module/src/utils/ProviderManager.d.ts.map +1 -1
  692. package/lib/typescript/module/src/utils/constants.d.ts +2 -7
  693. package/lib/typescript/module/src/utils/constants.d.ts.map +1 -1
  694. package/lib/typescript/module/src/utils/create-extractor-context.d.ts +17 -5
  695. package/lib/typescript/module/src/utils/create-extractor-context.d.ts.map +1 -1
  696. package/lib/typescript/module/src/utils/create-provider-context.d.ts +12 -8
  697. package/lib/typescript/module/src/utils/create-provider-context.d.ts.map +1 -1
  698. package/lib/typescript/module/src/utils/extension-integrity.d.ts.map +1 -1
  699. package/lib/typescript/module/src/utils/extension-modules.d.ts +74 -24
  700. package/lib/typescript/module/src/utils/extension-modules.d.ts.map +1 -1
  701. package/lib/typescript/module/src/utils/fetch-with-timeout.d.ts +1 -1
  702. package/lib/typescript/module/src/utils/fetch-with-timeout.d.ts.map +1 -1
  703. package/lib/typescript/module/src/utils/meta-http.d.ts +2 -13
  704. package/lib/typescript/module/src/utils/meta-http.d.ts.map +1 -1
  705. package/lib/typescript/module/src/utils/registry-schema.d.ts +27 -1
  706. package/lib/typescript/module/src/utils/registry-schema.d.ts.map +1 -1
  707. package/lib/typescript/module/src/utils/registry-signature-format.d.ts +15 -0
  708. package/lib/typescript/module/src/utils/registry-signature-format.d.ts.map +1 -0
  709. package/lib/typescript/module/src/utils/registry-signature.d.ts +10 -4
  710. package/lib/typescript/module/src/utils/registry-signature.d.ts.map +1 -1
  711. package/lib/typescript/module/src/utils/runtime-modules.d.ts +8 -0
  712. package/lib/typescript/module/src/utils/runtime-modules.d.ts.map +1 -0
  713. package/lib/typescript/module/src/utils/tmdb.d.ts +86 -0
  714. package/lib/typescript/module/src/utils/tmdb.d.ts.map +1 -0
  715. package/lib/typescript/module/src/utils/url-polyfill.d.ts.map +1 -1
  716. package/lib/typescript/module/src/utils/utf8.d.ts +7 -0
  717. package/lib/typescript/module/src/utils/utf8.d.ts.map +1 -0
  718. package/lib/typescript/module/src/utils/utils.d.ts +12 -36
  719. package/lib/typescript/module/src/utils/utils.d.ts.map +1 -1
  720. package/package.json +8 -10
  721. package/src/NativeConsumet.ts +50 -52
  722. package/src/extension-registry.json +48 -188
  723. package/src/extension-registry.json.sig +1 -1
  724. package/src/extractors/file-hosts.ts +29 -0
  725. package/src/extractors/flixcloud.ts +23 -53
  726. package/src/extractors/gofile.ts +140 -128
  727. package/src/extractors/hls.ts +43 -0
  728. package/src/extractors/hubcloud.ts +147 -331
  729. package/src/extractors/index.ts +4 -20
  730. package/src/extractors/kwik.ts +17 -56
  731. package/src/extractors/megacloud.ts +50 -153
  732. package/src/extractors/megaplay.ts +77 -147
  733. package/src/extractors/packer.ts +40 -0
  734. package/src/extractors/streamwish.ts +50 -122
  735. package/src/extractors/url.ts +6 -0
  736. package/src/extractors/vidhide.ts +29 -81
  737. package/src/index.tsx +51 -228
  738. package/src/models/anime-parser.ts +12 -21
  739. package/src/models/base-parser.ts +0 -5
  740. package/src/models/base-provider.ts +7 -31
  741. package/src/models/extension-manifest.ts +7 -1
  742. package/src/models/extractor-context.ts +5 -46
  743. package/src/models/index.ts +13 -119
  744. package/src/models/lightnovel-parser.ts +5 -12
  745. package/src/models/manga-parser.ts +2 -10
  746. package/src/models/meta-error.ts +12 -5
  747. package/src/models/movie-parser.ts +9 -24
  748. package/src/models/provider-context.ts +11 -149
  749. package/src/models/provider-error.ts +57 -0
  750. package/src/models/types.ts +40 -41
  751. package/src/models/video-extractor.ts +7 -43
  752. package/src/providers/anime/anikoto/anikoto.ts +5 -218
  753. package/src/providers/anime/anikoto/create-anikoto.ts +321 -510
  754. package/src/providers/anime/anikoto/hianime.ts +67 -0
  755. package/src/providers/anime/animepahe/animepahe.ts +5 -78
  756. package/src/providers/anime/animepahe/create-animepahe.ts +253 -212
  757. package/src/providers/anime/helpers.ts +9 -0
  758. package/src/providers/anime/index.ts +0 -12
  759. package/src/providers/anime/reanime/create-reanime.ts +37 -62
  760. package/src/providers/anime/reanime/reanime.ts +5 -44
  761. package/src/providers/common/concurrency.ts +32 -0
  762. package/src/providers/common/enc-dec.ts +2 -0
  763. package/src/providers/common/errors.ts +84 -0
  764. package/src/providers/common/media-status.ts +20 -0
  765. package/src/providers/common/search.ts +6 -0
  766. package/src/providers/common/servers.ts +40 -0
  767. package/src/providers/common/ttl-cache.ts +65 -0
  768. package/src/providers/index.ts +5 -7
  769. package/src/providers/light-novels/novelupdates.ts +55 -125
  770. package/src/providers/light-novels/readlightnovels.ts +81 -117
  771. package/src/providers/manga/asurascans.ts +46 -64
  772. package/src/providers/manga/flamescans.ts +11 -44
  773. package/src/providers/manga/mangadex.ts +15 -23
  774. package/src/providers/manga/mangahere.ts +112 -188
  775. package/src/providers/manga/mangakakalot.ts +25 -66
  776. package/src/providers/manga/mangapill.ts +105 -149
  777. package/src/providers/manga/shared.ts +71 -0
  778. package/src/providers/meta/anilist-media.ts +235 -0
  779. package/src/providers/meta/anilist.ts +460 -892
  780. package/src/providers/meta/index.ts +1 -1
  781. package/src/providers/meta/mal.ts +156 -416
  782. package/src/providers/meta/shared.ts +136 -0
  783. package/src/providers/meta/tmdb.ts +334 -358
  784. package/src/providers/movies/index.ts +4 -12
  785. package/src/providers/movies/multimovies/create-multimovies.ts +215 -452
  786. package/src/providers/movies/multimovies/multimovies.ts +5 -58
  787. package/src/providers/movies/multistream/create-multistream.ts +141 -0
  788. package/src/providers/movies/multistream/multistream.ts +7 -0
  789. package/src/providers/movies/multistream/utils.ts +234 -410
  790. package/src/providers/movies/netflixmirror/create-netflixmirror.ts +72 -34
  791. package/src/providers/movies/netflixmirror/netflixmirror.ts +9 -15
  792. package/src/providers/movies/site-paths.ts +25 -0
  793. package/src/providers/movies/vegamovies/create-vegamovies.ts +450 -725
  794. package/src/providers/movies/vegamovies/vegamovies.ts +5 -62
  795. package/src/providers/provider-class.ts +39 -0
  796. package/src/registry-signing-keys.json +6 -0
  797. package/src/utils/ExtractorManager.ts +177 -237
  798. package/src/utils/ProviderManager.ts +170 -278
  799. package/src/utils/constants.ts +2 -10
  800. package/src/utils/create-extractor-context.ts +36 -28
  801. package/src/utils/create-provider-context.ts +51 -121
  802. package/src/utils/extension-integrity.ts +1 -2
  803. package/src/utils/extension-modules.ts +281 -61
  804. package/src/utils/fetch-with-timeout.ts +4 -2
  805. package/src/utils/meta-http.ts +20 -27
  806. package/src/utils/registry-schema.ts +48 -15
  807. package/src/utils/registry-signature-format.ts +37 -0
  808. package/src/utils/registry-signature.ts +26 -67
  809. package/src/utils/runtime-modules.ts +7 -0
  810. package/src/utils/tmdb.ts +186 -0
  811. package/src/utils/url-polyfill.ts +2 -46
  812. package/src/utils/utf8.ts +44 -0
  813. package/src/utils/utils.ts +16 -362
  814. package/android/src/main/AndroidManifestNew.xml +0 -3
  815. package/android/src/main/java/com/consumet/DdosGuardModule.kt +0 -179
  816. package/lib/commonjs/extractors/asianload.js +0 -75
  817. package/lib/commonjs/extractors/asianload.js.map +0 -1
  818. package/lib/commonjs/extractors/filemoon.js +0 -66
  819. package/lib/commonjs/extractors/filemoon.js.map +0 -1
  820. package/lib/commonjs/extractors/gdflix.js +0 -165
  821. package/lib/commonjs/extractors/gdflix.js.map +0 -1
  822. package/lib/commonjs/extractors/gogocdn.js +0 -128
  823. package/lib/commonjs/extractors/gogocdn.js.map +0 -1
  824. package/lib/commonjs/extractors/megaup.js +0 -113
  825. package/lib/commonjs/extractors/megaup.js.map +0 -1
  826. package/lib/commonjs/extractors/mixdrop.js +0 -37
  827. package/lib/commonjs/extractors/mixdrop.js.map +0 -1
  828. package/lib/commonjs/extractors/mp4player.js +0 -57
  829. package/lib/commonjs/extractors/mp4player.js.map +0 -1
  830. package/lib/commonjs/extractors/mp4upload.js +0 -38
  831. package/lib/commonjs/extractors/mp4upload.js.map +0 -1
  832. package/lib/commonjs/extractors/rapidcloud.js +0 -180
  833. package/lib/commonjs/extractors/rapidcloud.js.map +0 -1
  834. package/lib/commonjs/extractors/streamhub.js +0 -61
  835. package/lib/commonjs/extractors/streamhub.js.map +0 -1
  836. package/lib/commonjs/extractors/streamlare.js +0 -55
  837. package/lib/commonjs/extractors/streamlare.js.map +0 -1
  838. package/lib/commonjs/extractors/streamsb.js +0 -69
  839. package/lib/commonjs/extractors/streamsb.js.map +0 -1
  840. package/lib/commonjs/extractors/streamtape.js +0 -42
  841. package/lib/commonjs/extractors/streamtape.js.map +0 -1
  842. package/lib/commonjs/extractors/vidmoly.js +0 -54
  843. package/lib/commonjs/extractors/vidmoly.js.map +0 -1
  844. package/lib/commonjs/extractors/vizcloud.js +0 -67
  845. package/lib/commonjs/extractors/vizcloud.js.map +0 -1
  846. package/lib/commonjs/extractors/voe.js +0 -100
  847. package/lib/commonjs/extractors/voe.js.map +0 -1
  848. package/lib/commonjs/models/base-types.js +0 -2
  849. package/lib/commonjs/models/base-types.js.map +0 -1
  850. package/lib/commonjs/providers/anime/animekai/animekai.js +0 -118
  851. package/lib/commonjs/providers/anime/animekai/animekai.js.map +0 -1
  852. package/lib/commonjs/providers/anime/animekai/create-animekai.js +0 -518
  853. package/lib/commonjs/providers/anime/animekai/create-animekai.js.map +0 -1
  854. package/lib/commonjs/providers/anime/animeunity.js +0 -187
  855. package/lib/commonjs/providers/anime/animeunity.js.map +0 -1
  856. package/lib/commonjs/providers/anime/anineko/anineko.js +0 -41
  857. package/lib/commonjs/providers/anime/anineko/anineko.js.map +0 -1
  858. package/lib/commonjs/providers/anime/anineko/create-anineko.js +0 -449
  859. package/lib/commonjs/providers/anime/anineko/create-anineko.js.map +0 -1
  860. package/lib/commonjs/providers/anime/zoro/create-zoro.js +0 -586
  861. package/lib/commonjs/providers/anime/zoro/create-zoro.js.map +0 -1
  862. package/lib/commonjs/providers/anime/zoro/zoro.js +0 -193
  863. package/lib/commonjs/providers/anime/zoro/zoro.js.map +0 -1
  864. package/lib/commonjs/providers/meta/tmdb-api-key.js +0 -29
  865. package/lib/commonjs/providers/meta/tmdb-api-key.js.map +0 -1
  866. package/lib/commonjs/providers/movies/himovies/create-himovies.js +0 -436
  867. package/lib/commonjs/providers/movies/himovies/create-himovies.js.map +0 -1
  868. package/lib/commonjs/providers/movies/himovies/himovies.js +0 -79
  869. package/lib/commonjs/providers/movies/himovies/himovies.js.map +0 -1
  870. package/lib/commonjs/providers/movies/multistream/index.js +0 -222
  871. package/lib/commonjs/providers/movies/multistream/index.js.map +0 -1
  872. package/lib/commonjs/providers/movies/netflixmirror/disneymirror.js +0 -22
  873. package/lib/commonjs/providers/movies/netflixmirror/disneymirror.js.map +0 -1
  874. package/lib/commonjs/providers/movies/netflixmirror/netmirror-parser.js +0 -30
  875. package/lib/commonjs/providers/movies/netflixmirror/netmirror-parser.js.map +0 -1
  876. package/lib/commonjs/providers/movies/netflixmirror/primemirror.js +0 -22
  877. package/lib/commonjs/providers/movies/netflixmirror/primemirror.js.map +0 -1
  878. package/lib/commonjs/providers/movies/yflix/create-yflix.js +0 -418
  879. package/lib/commonjs/providers/movies/yflix/create-yflix.js.map +0 -1
  880. package/lib/commonjs/providers/movies/yflix/yflix.js +0 -66
  881. package/lib/commonjs/providers/movies/yflix/yflix.js.map +0 -1
  882. package/lib/commonjs/providers/provider-args.js +0 -17
  883. package/lib/commonjs/providers/provider-args.js.map +0 -1
  884. package/lib/commonjs/registry-signing-keys.js +0 -26
  885. package/lib/commonjs/registry-signing-keys.js.map +0 -1
  886. package/lib/commonjs/utils/extension-utils.js +0 -105
  887. package/lib/commonjs/utils/extension-utils.js.map +0 -1
  888. package/lib/commonjs/utils/index.js +0 -312
  889. package/lib/commonjs/utils/index.js.map +0 -1
  890. package/lib/commonjs/utils/provider-maps.js +0 -69
  891. package/lib/commonjs/utils/provider-maps.js.map +0 -1
  892. package/lib/commonjs/utils/queries.js +0 -45
  893. package/lib/commonjs/utils/queries.js.map +0 -1
  894. package/lib/module/extractors/asianload.js +0 -69
  895. package/lib/module/extractors/asianload.js.map +0 -1
  896. package/lib/module/extractors/filemoon.js +0 -62
  897. package/lib/module/extractors/filemoon.js.map +0 -1
  898. package/lib/module/extractors/gdflix.js +0 -161
  899. package/lib/module/extractors/gdflix.js.map +0 -1
  900. package/lib/module/extractors/gogocdn.js +0 -122
  901. package/lib/module/extractors/gogocdn.js.map +0 -1
  902. package/lib/module/extractors/megaup.js +0 -109
  903. package/lib/module/extractors/megaup.js.map +0 -1
  904. package/lib/module/extractors/mixdrop.js +0 -32
  905. package/lib/module/extractors/mixdrop.js.map +0 -1
  906. package/lib/module/extractors/mp4player.js +0 -52
  907. package/lib/module/extractors/mp4player.js.map +0 -1
  908. package/lib/module/extractors/mp4upload.js +0 -33
  909. package/lib/module/extractors/mp4upload.js.map +0 -1
  910. package/lib/module/extractors/rapidcloud.js +0 -174
  911. package/lib/module/extractors/rapidcloud.js.map +0 -1
  912. package/lib/module/extractors/streamhub.js +0 -56
  913. package/lib/module/extractors/streamhub.js.map +0 -1
  914. package/lib/module/extractors/streamlare.js +0 -50
  915. package/lib/module/extractors/streamlare.js.map +0 -1
  916. package/lib/module/extractors/streamsb.js +0 -64
  917. package/lib/module/extractors/streamsb.js.map +0 -1
  918. package/lib/module/extractors/streamtape.js +0 -37
  919. package/lib/module/extractors/streamtape.js.map +0 -1
  920. package/lib/module/extractors/vidmoly.js +0 -49
  921. package/lib/module/extractors/vidmoly.js.map +0 -1
  922. package/lib/module/extractors/vizcloud.js +0 -62
  923. package/lib/module/extractors/vizcloud.js.map +0 -1
  924. package/lib/module/extractors/voe.js +0 -95
  925. package/lib/module/extractors/voe.js.map +0 -1
  926. package/lib/module/models/base-types.js +0 -2
  927. package/lib/module/models/base-types.js.map +0 -1
  928. package/lib/module/providers/anime/animekai/animekai.js +0 -113
  929. package/lib/module/providers/anime/animekai/animekai.js.map +0 -1
  930. package/lib/module/providers/anime/animekai/create-animekai.js +0 -514
  931. package/lib/module/providers/anime/animekai/create-animekai.js.map +0 -1
  932. package/lib/module/providers/anime/animeunity.js +0 -183
  933. package/lib/module/providers/anime/animeunity.js.map +0 -1
  934. package/lib/module/providers/anime/anineko/anineko.js +0 -36
  935. package/lib/module/providers/anime/anineko/anineko.js.map +0 -1
  936. package/lib/module/providers/anime/anineko/create-anineko.js +0 -445
  937. package/lib/module/providers/anime/anineko/create-anineko.js.map +0 -1
  938. package/lib/module/providers/anime/zoro/create-zoro.js +0 -582
  939. package/lib/module/providers/anime/zoro/create-zoro.js.map +0 -1
  940. package/lib/module/providers/anime/zoro/zoro.js +0 -189
  941. package/lib/module/providers/anime/zoro/zoro.js.map +0 -1
  942. package/lib/module/providers/meta/tmdb-api-key.js +0 -24
  943. package/lib/module/providers/meta/tmdb-api-key.js.map +0 -1
  944. package/lib/module/providers/movies/himovies/create-himovies.js +0 -432
  945. package/lib/module/providers/movies/himovies/create-himovies.js.map +0 -1
  946. package/lib/module/providers/movies/himovies/himovies.js +0 -75
  947. package/lib/module/providers/movies/himovies/himovies.js.map +0 -1
  948. package/lib/module/providers/movies/multistream/index.js +0 -217
  949. package/lib/module/providers/movies/multistream/index.js.map +0 -1
  950. package/lib/module/providers/movies/netflixmirror/disneymirror.js +0 -17
  951. package/lib/module/providers/movies/netflixmirror/disneymirror.js.map +0 -1
  952. package/lib/module/providers/movies/netflixmirror/netmirror-parser.js +0 -25
  953. package/lib/module/providers/movies/netflixmirror/netmirror-parser.js.map +0 -1
  954. package/lib/module/providers/movies/netflixmirror/primemirror.js +0 -17
  955. package/lib/module/providers/movies/netflixmirror/primemirror.js.map +0 -1
  956. package/lib/module/providers/movies/yflix/create-yflix.js +0 -414
  957. package/lib/module/providers/movies/yflix/create-yflix.js.map +0 -1
  958. package/lib/module/providers/movies/yflix/yflix.js +0 -61
  959. package/lib/module/providers/movies/yflix/yflix.js.map +0 -1
  960. package/lib/module/providers/provider-args.js +0 -14
  961. package/lib/module/providers/provider-args.js.map +0 -1
  962. package/lib/module/registry-signing-keys.js +0 -22
  963. package/lib/module/registry-signing-keys.js.map +0 -1
  964. package/lib/module/utils/extension-utils.js +0 -100
  965. package/lib/module/utils/extension-utils.js.map +0 -1
  966. package/lib/module/utils/index.js +0 -21
  967. package/lib/module/utils/index.js.map +0 -1
  968. package/lib/module/utils/provider-maps.js +0 -65
  969. package/lib/module/utils/provider-maps.js.map +0 -1
  970. package/lib/module/utils/queries.js +0 -29
  971. package/lib/module/utils/queries.js.map +0 -1
  972. package/lib/typescript/commonjs/src/extractors/asianload.d.ts +0 -17
  973. package/lib/typescript/commonjs/src/extractors/asianload.d.ts.map +0 -1
  974. package/lib/typescript/commonjs/src/extractors/filemoon.d.ts +0 -14
  975. package/lib/typescript/commonjs/src/extractors/filemoon.d.ts.map +0 -1
  976. package/lib/typescript/commonjs/src/extractors/gdflix.d.ts +0 -7
  977. package/lib/typescript/commonjs/src/extractors/gdflix.d.ts.map +0 -1
  978. package/lib/typescript/commonjs/src/extractors/gogocdn.d.ts +0 -19
  979. package/lib/typescript/commonjs/src/extractors/gogocdn.d.ts.map +0 -1
  980. package/lib/typescript/commonjs/src/extractors/megaup.d.ts +0 -6
  981. package/lib/typescript/commonjs/src/extractors/megaup.d.ts.map +0 -1
  982. package/lib/typescript/commonjs/src/extractors/mixdrop.d.ts +0 -10
  983. package/lib/typescript/commonjs/src/extractors/mixdrop.d.ts.map +0 -1
  984. package/lib/typescript/commonjs/src/extractors/mp4player.d.ts +0 -15
  985. package/lib/typescript/commonjs/src/extractors/mp4player.d.ts.map +0 -1
  986. package/lib/typescript/commonjs/src/extractors/mp4upload.d.ts +0 -10
  987. package/lib/typescript/commonjs/src/extractors/mp4upload.d.ts.map +0 -1
  988. package/lib/typescript/commonjs/src/extractors/rapidcloud.d.ts +0 -17
  989. package/lib/typescript/commonjs/src/extractors/rapidcloud.d.ts.map +0 -1
  990. package/lib/typescript/commonjs/src/extractors/streamhub.d.ts +0 -14
  991. package/lib/typescript/commonjs/src/extractors/streamhub.d.ts.map +0 -1
  992. package/lib/typescript/commonjs/src/extractors/streamlare.d.ts +0 -13
  993. package/lib/typescript/commonjs/src/extractors/streamlare.d.ts.map +0 -1
  994. package/lib/typescript/commonjs/src/extractors/streamsb.d.ts +0 -14
  995. package/lib/typescript/commonjs/src/extractors/streamsb.d.ts.map +0 -1
  996. package/lib/typescript/commonjs/src/extractors/streamtape.d.ts +0 -10
  997. package/lib/typescript/commonjs/src/extractors/streamtape.d.ts.map +0 -1
  998. package/lib/typescript/commonjs/src/extractors/vidmoly.d.ts +0 -10
  999. package/lib/typescript/commonjs/src/extractors/vidmoly.d.ts.map +0 -1
  1000. package/lib/typescript/commonjs/src/extractors/vizcloud.d.ts +0 -12
  1001. package/lib/typescript/commonjs/src/extractors/vizcloud.d.ts.map +0 -1
  1002. package/lib/typescript/commonjs/src/extractors/voe.d.ts +0 -15
  1003. package/lib/typescript/commonjs/src/extractors/voe.d.ts.map +0 -1
  1004. package/lib/typescript/commonjs/src/models/base-types.d.ts +0 -23
  1005. package/lib/typescript/commonjs/src/models/base-types.d.ts.map +0 -1
  1006. package/lib/typescript/commonjs/src/providers/anime/animekai/animekai.d.ts +0 -90
  1007. package/lib/typescript/commonjs/src/providers/anime/animekai/animekai.d.ts.map +0 -1
  1008. package/lib/typescript/commonjs/src/providers/anime/animekai/create-animekai.d.ts +0 -32
  1009. package/lib/typescript/commonjs/src/providers/anime/animekai/create-animekai.d.ts.map +0 -1
  1010. package/lib/typescript/commonjs/src/providers/anime/animeunity.d.ts +0 -39
  1011. package/lib/typescript/commonjs/src/providers/anime/animeunity.d.ts.map +0 -1
  1012. package/lib/typescript/commonjs/src/providers/anime/anineko/anineko.d.ts +0 -28
  1013. package/lib/typescript/commonjs/src/providers/anime/anineko/anineko.d.ts.map +0 -1
  1014. package/lib/typescript/commonjs/src/providers/anime/anineko/create-anineko.d.ts +0 -52
  1015. package/lib/typescript/commonjs/src/providers/anime/anineko/create-anineko.d.ts.map +0 -1
  1016. package/lib/typescript/commonjs/src/providers/anime/zoro/create-zoro.d.ts +0 -49
  1017. package/lib/typescript/commonjs/src/providers/anime/zoro/create-zoro.d.ts.map +0 -1
  1018. package/lib/typescript/commonjs/src/providers/anime/zoro/zoro.d.ts +0 -139
  1019. package/lib/typescript/commonjs/src/providers/anime/zoro/zoro.d.ts.map +0 -1
  1020. package/lib/typescript/commonjs/src/providers/meta/tmdb-api-key.d.ts +0 -7
  1021. package/lib/typescript/commonjs/src/providers/meta/tmdb-api-key.d.ts.map +0 -1
  1022. package/lib/typescript/commonjs/src/providers/movies/himovies/create-himovies.d.ts +0 -24
  1023. package/lib/typescript/commonjs/src/providers/movies/himovies/create-himovies.d.ts.map +0 -1
  1024. package/lib/typescript/commonjs/src/providers/movies/himovies/himovies.d.ts +0 -50
  1025. package/lib/typescript/commonjs/src/providers/movies/himovies/himovies.d.ts.map +0 -1
  1026. package/lib/typescript/commonjs/src/providers/movies/multistream/index.d.ts +0 -44
  1027. package/lib/typescript/commonjs/src/providers/movies/multistream/index.d.ts.map +0 -1
  1028. package/lib/typescript/commonjs/src/providers/movies/netflixmirror/disneymirror.d.ts +0 -12
  1029. package/lib/typescript/commonjs/src/providers/movies/netflixmirror/disneymirror.d.ts.map +0 -1
  1030. package/lib/typescript/commonjs/src/providers/movies/netflixmirror/netmirror-parser.d.ts +0 -21
  1031. package/lib/typescript/commonjs/src/providers/movies/netflixmirror/netmirror-parser.d.ts.map +0 -1
  1032. package/lib/typescript/commonjs/src/providers/movies/netflixmirror/primemirror.d.ts +0 -12
  1033. package/lib/typescript/commonjs/src/providers/movies/netflixmirror/primemirror.d.ts.map +0 -1
  1034. package/lib/typescript/commonjs/src/providers/movies/yflix/create-yflix.d.ts +0 -25
  1035. package/lib/typescript/commonjs/src/providers/movies/yflix/create-yflix.d.ts.map +0 -1
  1036. package/lib/typescript/commonjs/src/providers/movies/yflix/yflix.d.ts +0 -49
  1037. package/lib/typescript/commonjs/src/providers/movies/yflix/yflix.d.ts.map +0 -1
  1038. package/lib/typescript/commonjs/src/providers/provider-args.d.ts +0 -8
  1039. package/lib/typescript/commonjs/src/providers/provider-args.d.ts.map +0 -1
  1040. package/lib/typescript/commonjs/src/registry-signing-keys.d.ts +0 -18
  1041. package/lib/typescript/commonjs/src/registry-signing-keys.d.ts.map +0 -1
  1042. package/lib/typescript/commonjs/src/utils/extension-utils.d.ts +0 -31
  1043. package/lib/typescript/commonjs/src/utils/extension-utils.d.ts.map +0 -1
  1044. package/lib/typescript/commonjs/src/utils/index.d.ts +0 -19
  1045. package/lib/typescript/commonjs/src/utils/index.d.ts.map +0 -1
  1046. package/lib/typescript/commonjs/src/utils/provider-maps.d.ts +0 -39
  1047. package/lib/typescript/commonjs/src/utils/provider-maps.d.ts.map +0 -1
  1048. package/lib/typescript/commonjs/src/utils/queries.d.ts +0 -22
  1049. package/lib/typescript/commonjs/src/utils/queries.d.ts.map +0 -1
  1050. package/lib/typescript/module/src/extractors/asianload.d.ts +0 -17
  1051. package/lib/typescript/module/src/extractors/asianload.d.ts.map +0 -1
  1052. package/lib/typescript/module/src/extractors/filemoon.d.ts +0 -14
  1053. package/lib/typescript/module/src/extractors/filemoon.d.ts.map +0 -1
  1054. package/lib/typescript/module/src/extractors/gdflix.d.ts +0 -7
  1055. package/lib/typescript/module/src/extractors/gdflix.d.ts.map +0 -1
  1056. package/lib/typescript/module/src/extractors/gogocdn.d.ts +0 -19
  1057. package/lib/typescript/module/src/extractors/gogocdn.d.ts.map +0 -1
  1058. package/lib/typescript/module/src/extractors/megaup.d.ts +0 -6
  1059. package/lib/typescript/module/src/extractors/megaup.d.ts.map +0 -1
  1060. package/lib/typescript/module/src/extractors/mixdrop.d.ts +0 -10
  1061. package/lib/typescript/module/src/extractors/mixdrop.d.ts.map +0 -1
  1062. package/lib/typescript/module/src/extractors/mp4player.d.ts +0 -15
  1063. package/lib/typescript/module/src/extractors/mp4player.d.ts.map +0 -1
  1064. package/lib/typescript/module/src/extractors/mp4upload.d.ts +0 -10
  1065. package/lib/typescript/module/src/extractors/mp4upload.d.ts.map +0 -1
  1066. package/lib/typescript/module/src/extractors/rapidcloud.d.ts +0 -17
  1067. package/lib/typescript/module/src/extractors/rapidcloud.d.ts.map +0 -1
  1068. package/lib/typescript/module/src/extractors/streamhub.d.ts +0 -14
  1069. package/lib/typescript/module/src/extractors/streamhub.d.ts.map +0 -1
  1070. package/lib/typescript/module/src/extractors/streamlare.d.ts +0 -13
  1071. package/lib/typescript/module/src/extractors/streamlare.d.ts.map +0 -1
  1072. package/lib/typescript/module/src/extractors/streamsb.d.ts +0 -14
  1073. package/lib/typescript/module/src/extractors/streamsb.d.ts.map +0 -1
  1074. package/lib/typescript/module/src/extractors/streamtape.d.ts +0 -10
  1075. package/lib/typescript/module/src/extractors/streamtape.d.ts.map +0 -1
  1076. package/lib/typescript/module/src/extractors/vidmoly.d.ts +0 -10
  1077. package/lib/typescript/module/src/extractors/vidmoly.d.ts.map +0 -1
  1078. package/lib/typescript/module/src/extractors/vizcloud.d.ts +0 -12
  1079. package/lib/typescript/module/src/extractors/vizcloud.d.ts.map +0 -1
  1080. package/lib/typescript/module/src/extractors/voe.d.ts +0 -15
  1081. package/lib/typescript/module/src/extractors/voe.d.ts.map +0 -1
  1082. package/lib/typescript/module/src/models/base-types.d.ts +0 -23
  1083. package/lib/typescript/module/src/models/base-types.d.ts.map +0 -1
  1084. package/lib/typescript/module/src/providers/anime/animekai/animekai.d.ts +0 -90
  1085. package/lib/typescript/module/src/providers/anime/animekai/animekai.d.ts.map +0 -1
  1086. package/lib/typescript/module/src/providers/anime/animekai/create-animekai.d.ts +0 -32
  1087. package/lib/typescript/module/src/providers/anime/animekai/create-animekai.d.ts.map +0 -1
  1088. package/lib/typescript/module/src/providers/anime/animeunity.d.ts +0 -39
  1089. package/lib/typescript/module/src/providers/anime/animeunity.d.ts.map +0 -1
  1090. package/lib/typescript/module/src/providers/anime/anineko/anineko.d.ts +0 -28
  1091. package/lib/typescript/module/src/providers/anime/anineko/anineko.d.ts.map +0 -1
  1092. package/lib/typescript/module/src/providers/anime/anineko/create-anineko.d.ts +0 -52
  1093. package/lib/typescript/module/src/providers/anime/anineko/create-anineko.d.ts.map +0 -1
  1094. package/lib/typescript/module/src/providers/anime/zoro/create-zoro.d.ts +0 -49
  1095. package/lib/typescript/module/src/providers/anime/zoro/create-zoro.d.ts.map +0 -1
  1096. package/lib/typescript/module/src/providers/anime/zoro/zoro.d.ts +0 -139
  1097. package/lib/typescript/module/src/providers/anime/zoro/zoro.d.ts.map +0 -1
  1098. package/lib/typescript/module/src/providers/meta/tmdb-api-key.d.ts +0 -7
  1099. package/lib/typescript/module/src/providers/meta/tmdb-api-key.d.ts.map +0 -1
  1100. package/lib/typescript/module/src/providers/movies/himovies/create-himovies.d.ts +0 -24
  1101. package/lib/typescript/module/src/providers/movies/himovies/create-himovies.d.ts.map +0 -1
  1102. package/lib/typescript/module/src/providers/movies/himovies/himovies.d.ts +0 -50
  1103. package/lib/typescript/module/src/providers/movies/himovies/himovies.d.ts.map +0 -1
  1104. package/lib/typescript/module/src/providers/movies/multistream/index.d.ts +0 -44
  1105. package/lib/typescript/module/src/providers/movies/multistream/index.d.ts.map +0 -1
  1106. package/lib/typescript/module/src/providers/movies/netflixmirror/disneymirror.d.ts +0 -12
  1107. package/lib/typescript/module/src/providers/movies/netflixmirror/disneymirror.d.ts.map +0 -1
  1108. package/lib/typescript/module/src/providers/movies/netflixmirror/netmirror-parser.d.ts +0 -21
  1109. package/lib/typescript/module/src/providers/movies/netflixmirror/netmirror-parser.d.ts.map +0 -1
  1110. package/lib/typescript/module/src/providers/movies/netflixmirror/primemirror.d.ts +0 -12
  1111. package/lib/typescript/module/src/providers/movies/netflixmirror/primemirror.d.ts.map +0 -1
  1112. package/lib/typescript/module/src/providers/movies/yflix/create-yflix.d.ts +0 -25
  1113. package/lib/typescript/module/src/providers/movies/yflix/create-yflix.d.ts.map +0 -1
  1114. package/lib/typescript/module/src/providers/movies/yflix/yflix.d.ts +0 -49
  1115. package/lib/typescript/module/src/providers/movies/yflix/yflix.d.ts.map +0 -1
  1116. package/lib/typescript/module/src/providers/provider-args.d.ts +0 -8
  1117. package/lib/typescript/module/src/providers/provider-args.d.ts.map +0 -1
  1118. package/lib/typescript/module/src/registry-signing-keys.d.ts +0 -18
  1119. package/lib/typescript/module/src/registry-signing-keys.d.ts.map +0 -1
  1120. package/lib/typescript/module/src/utils/extension-utils.d.ts +0 -31
  1121. package/lib/typescript/module/src/utils/extension-utils.d.ts.map +0 -1
  1122. package/lib/typescript/module/src/utils/index.d.ts +0 -19
  1123. package/lib/typescript/module/src/utils/index.d.ts.map +0 -1
  1124. package/lib/typescript/module/src/utils/provider-maps.d.ts +0 -39
  1125. package/lib/typescript/module/src/utils/provider-maps.d.ts.map +0 -1
  1126. package/lib/typescript/module/src/utils/queries.d.ts +0 -22
  1127. package/lib/typescript/module/src/utils/queries.d.ts.map +0 -1
  1128. package/src/extractors/asianload.ts +0 -89
  1129. package/src/extractors/filemoon.ts +0 -60
  1130. package/src/extractors/gdflix.ts +0 -165
  1131. package/src/extractors/gogocdn.ts +0 -155
  1132. package/src/extractors/megaup.ts +0 -125
  1133. package/src/extractors/mixdrop.ts +0 -35
  1134. package/src/extractors/mp4player.ts +0 -57
  1135. package/src/extractors/mp4upload.ts +0 -35
  1136. package/src/extractors/rapidcloud.ts +0 -200
  1137. package/src/extractors/streamhub.ts +0 -62
  1138. package/src/extractors/streamlare.ts +0 -65
  1139. package/src/extractors/streamsb.ts +0 -77
  1140. package/src/extractors/streamtape.ts +0 -42
  1141. package/src/extractors/vidmoly.ts +0 -52
  1142. package/src/extractors/vizcloud.ts +0 -70
  1143. package/src/extractors/voe.ts +0 -107
  1144. package/src/models/base-types.ts +0 -23
  1145. package/src/providers/anime/animekai/animekai.ts +0 -126
  1146. package/src/providers/anime/animekai/create-animekai.ts +0 -589
  1147. package/src/providers/anime/animeunity.ts +0 -226
  1148. package/src/providers/anime/anineko/anineko.ts +0 -54
  1149. package/src/providers/anime/anineko/create-anineko.ts +0 -490
  1150. package/src/providers/anime/zoro/create-zoro.ts +0 -645
  1151. package/src/providers/anime/zoro/zoro.ts +0 -201
  1152. package/src/providers/meta/tmdb-api-key.ts +0 -27
  1153. package/src/providers/movies/himovies/create-himovies.ts +0 -518
  1154. package/src/providers/movies/himovies/himovies.ts +0 -89
  1155. package/src/providers/movies/multistream/index.ts +0 -244
  1156. package/src/providers/movies/netflixmirror/disneymirror.ts +0 -16
  1157. package/src/providers/movies/netflixmirror/netmirror-parser.ts +0 -43
  1158. package/src/providers/movies/netflixmirror/primemirror.ts +0 -16
  1159. package/src/providers/movies/yflix/create-yflix.ts +0 -496
  1160. package/src/providers/movies/yflix/yflix.ts +0 -85
  1161. package/src/providers/provider-args.ts +0 -15
  1162. package/src/registry-signing-keys.ts +0 -20
  1163. package/src/utils/extension-utils.ts +0 -130
  1164. package/src/utils/index.ts +0 -96
  1165. package/src/utils/provider-maps.ts +0 -80
  1166. package/src/utils/queries.ts +0 -37
@@ -1,5 +1,24 @@
1
1
  "use strict";
2
2
 
3
+ import { mapLimit } from "../../common/concurrency.js";
4
+ import { toMediaStatus } from "../../common/media-status.js";
5
+ import { pickServer, serverName } from "../../common/servers.js";
6
+ import { PAGE_TTL_MS, ttlCache } from "../../common/ttl-cache.js";
7
+ import { IST_TZ_OFFSET, cardPage, linkedGenres, pageUrl, siteEpisodeId, toEpisodeId } from "./hianime.js";
8
+
9
+ // Kept at the top level, so they outlive one provider instance (apps build one per query), by
10
+ // request URL: an episode's server list (`/ajax/server/list`) when it lists servers, and the embed
11
+ // URL of a server's link (`/ajax/server?get=`) when it gives one. Servers, then sources, ask once.
12
+ const serverLists = ttlCache({
13
+ ttlMs: PAGE_TTL_MS,
14
+ maxEntries: 16,
15
+ keep: html => typeof html === 'string' && html.includes('data-link-id')
16
+ });
17
+ const embedUrls = ttlCache({
18
+ ttlMs: PAGE_TTL_MS,
19
+ maxEntries: 32,
20
+ keep: url => !!url
21
+ });
3
22
  export function createAniKoto(ctx, customBaseURL) {
4
23
  const {
5
24
  axios,
@@ -7,18 +26,16 @@ export function createAniKoto(ctx, customBaseURL) {
7
26
  extractors,
8
27
  enums,
9
28
  createCustomBaseUrl,
10
- PolyURL
29
+ PolyURL,
30
+ PolyURLSearchParams,
31
+ USER_AGENT
11
32
  } = ctx;
12
33
  const {
13
34
  MegaPlay
14
35
  } = extractors;
15
36
  const {
16
- StreamingServers: StreamingServersEnum,
17
- SubOrDub: SubOrDubEnum,
18
- MediaStatus: MediaStatusEnum
37
+ SubOrDub: SubOrDubEnum
19
38
  } = enums;
20
-
21
- // Provider configuration
22
39
  const baseUrl = createCustomBaseUrl('https://anikototv.to', customBaseURL);
23
40
  const config = {
24
41
  name: 'AniKoto',
@@ -31,81 +48,58 @@ export function createAniKoto(ctx, customBaseURL) {
31
48
  isDubAvailableSeparately: true
32
49
  };
33
50
  const defaultHeaders = {
34
- 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36'
51
+ 'User-Agent': USER_AGENT
35
52
  };
36
53
  const ajaxHeaders = referer => ({
37
54
  ...defaultHeaders,
38
55
  'X-Requested-With': 'XMLHttpRequest',
39
56
  'Referer': referer || config.baseUrl
40
57
  });
41
- const normalizePageNumber = page => {
42
- return page <= 0 ? 1 : page;
58
+ const scrapeCard = $ => {
59
+ const results = [];
60
+ $('.item').each((_, el) => {
61
+ const item = $(el);
62
+ const nameEl = item.find('.name.d-title, .name').first();
63
+ const title = nameEl.text().trim();
64
+ const href = item.find('a.name, .poster a').first().attr('href') || '';
65
+ const match = href.match(/\/watch\/([^/?#]+)/);
66
+ const id = match ? match[1] : href.replace(/^.*\/watch\//, '').replace(/\/.*$/, '');
67
+ const ratingStr = item.find('.m-item.rated span').first().text().trim();
68
+ if (id && title) {
69
+ results.push({
70
+ id,
71
+ title,
72
+ japaneseTitle: nameEl.attr('data-jp') || undefined,
73
+ image: item.find('.poster img, img').attr('src') || '',
74
+ url: href.startsWith('http') ? href : `${config.baseUrl}${href.startsWith('/') ? '' : '/'}${href}`,
75
+ type: item.find('.meta .right').first().text().trim() || 'TV',
76
+ sub: parseInt(item.find('.ep-status.sub').first().text().trim(), 10) || 0,
77
+ dub: parseInt(item.find('.ep-status.dub').first().text().trim(), 10) || 0,
78
+ rating: ratingStr ? parseFloat(ratingStr) : undefined
79
+ });
80
+ }
81
+ });
82
+ return results;
43
83
  };
44
84
 
45
- // Helper to scrape card lists across search, types, genres, statuses
46
- const scrapeCardPage = async (url, page = 1) => {
47
- try {
48
- const {
49
- data
50
- } = await axios.get(url, {
51
- headers: defaultHeaders
52
- });
53
- const $ = load(data);
54
- const results = [];
55
- $('.item').each((_, el) => {
56
- const item = $(el);
57
- const nameEl = item.find('.name.d-title, .name').first();
58
- const title = nameEl.text().trim();
59
- const japaneseTitle = nameEl.attr('data-jp') || undefined;
60
- const href = item.find('a.name, .poster a').first().attr('href') || '';
61
- const match = href.match(/\/watch\/([^/?#]+)/);
62
- const id = match ? match[1] : href.replace(/^.*\/watch\//, '').replace(/\/.*$/, '');
63
- const image = item.find('.poster img, img').attr('src') || '';
64
- const subText = item.find('.ep-status.sub').first().text().trim();
65
- const sub = parseInt(subText, 10) || 0;
66
- const dubText = item.find('.ep-status.dub').first().text().trim();
67
- const dub = parseInt(dubText, 10) || 0;
68
- const type = item.find('.meta .right').first().text().trim() || 'TV';
69
- const ratingStr = item.find('.m-item.rated span').first().text().trim();
70
- const rating = ratingStr ? parseFloat(ratingStr) : undefined;
71
- if (id && title) {
72
- results.push({
73
- id,
74
- title,
75
- japaneseTitle,
76
- image,
77
- url: href.startsWith('http') ? href : `${config.baseUrl}${href.startsWith('/') ? '' : '/'}${href}`,
78
- type,
79
- sub,
80
- dub,
81
- rating
82
- });
83
- }
84
- });
85
- const hasNextPage = $('.pagination .page-item .page-link[rel="next"]').length > 0 || $('.pagination .page-item.active').next('.page-item').find('.page-link').length > 0;
86
- const lastPageHref = $('.pagination .page-item a[title="Last"]').attr('href') || '';
87
- const lastPageMatch = lastPageHref.match(/page=(\d+)/);
88
- const totalPages = lastPageMatch ? parseInt(lastPageMatch[1], 10) : undefined;
89
- return {
90
- currentPage: page,
91
- hasNextPage,
92
- totalPages,
93
- results
94
- };
95
- } catch (err) {
96
- throw new Error(`[AniKoto] Failed to scrape card page: ${err.message}`);
97
- }
85
+ /** Page `page` of the listing at `path` (`/most-viewed`, `/search?keyword=…`). */
86
+ const scrapeCardPage = async (path, page) => {
87
+ const {
88
+ data
89
+ } = await axios.get(pageUrl(`${config.baseUrl}${path}`, page), {
90
+ headers: defaultHeaders
91
+ });
92
+ const $ = load(data);
93
+ return cardPage($, scrapeCard($), page);
98
94
  };
95
+ const search = async (query, page = 1) => scrapeCardPage(`/search?keyword=${encodeURIComponent(query)}`, page);
99
96
 
100
- // Main provider functions
101
- const search = async (query, page = 1) => {
102
- const normalizedPage = normalizePageNumber(page);
103
- return scrapeCardPage(`${config.baseUrl}/search?keyword=${encodeURIComponent(query)}&page=${normalizedPage}`, normalizedPage);
104
- };
97
+ /**
98
+ * Search with filters; each is optional. The site has no date filters: `_startDate` and
99
+ * `_endDate` are accepted and ignored.
100
+ */
105
101
  const fetchAdvancedSearch = async (page = 1, type, status, rated, score, season, language, _startDate, _endDate, sort, genres) => {
106
- const normalizedPage = normalizePageNumber(page);
107
- const params = new URLSearchParams();
108
- params.set('page', String(normalizedPage));
102
+ const params = new PolyURLSearchParams();
109
103
  if (type) params.set('type', type);
110
104
  if (status) params.set('status', status);
111
105
  if (rated) params.set('rated', rated);
@@ -113,395 +107,285 @@ export function createAniKoto(ctx, customBaseURL) {
113
107
  if (season) params.set('season', season);
114
108
  if (language) params.set('language', language);
115
109
  if (sort) params.set('sort', sort);
116
- if (genres && genres.length > 0) {
117
- for (const g of genres) {
118
- params.append('genres[]', g);
119
- }
120
- }
121
- return scrapeCardPage(`${config.baseUrl}/filter?${params.toString()}`, normalizedPage);
122
- };
123
- const fetchTopAiring = async (page = 1) => {
124
- const normalizedPage = normalizePageNumber(page);
125
- return scrapeCardPage(`${config.baseUrl}/status/currently-airing?page=${normalizedPage}`, normalizedPage);
126
- };
127
- const fetchMostPopular = async (page = 1) => {
128
- const normalizedPage = normalizePageNumber(page);
129
- return scrapeCardPage(`${config.baseUrl}/most-viewed?page=${normalizedPage}`, normalizedPage);
130
- };
131
- const fetchMostFavorite = async (page = 1) => {
132
- const normalizedPage = normalizePageNumber(page);
133
- return scrapeCardPage(`${config.baseUrl}/filter?sort=most_favorite&page=${normalizedPage}`, normalizedPage);
134
- };
135
- const fetchLatestCompleted = async (page = 1) => {
136
- const normalizedPage = normalizePageNumber(page);
137
- return scrapeCardPage(`${config.baseUrl}/status/finished-airing?page=${normalizedPage}`, normalizedPage);
138
- };
139
- const fetchRecentlyUpdated = async (page = 1) => {
140
- const normalizedPage = normalizePageNumber(page);
141
- return scrapeCardPage(`${config.baseUrl}/latest-updated?page=${normalizedPage}`, normalizedPage);
142
- };
143
- const fetchRecentlyAdded = async (page = 1) => {
144
- const normalizedPage = normalizePageNumber(page);
145
- return scrapeCardPage(`${config.baseUrl}/new-release?page=${normalizedPage}`, normalizedPage);
146
- };
147
- const fetchTopUpcoming = async (page = 1) => {
148
- const normalizedPage = normalizePageNumber(page);
149
- return scrapeCardPage(`${config.baseUrl}/status/not-yet-aired?page=${normalizedPage}`, normalizedPage);
150
- };
151
- const fetchStudio = async (studioId, page = 1) => {
152
- const normalizedPage = normalizePageNumber(page);
153
- return scrapeCardPage(`${config.baseUrl}/studio/${studioId}?page=${normalizedPage}`, normalizedPage);
154
- };
155
- const fetchSubbedAnime = async (page = 1) => {
156
- const normalizedPage = normalizePageNumber(page);
157
- return scrapeCardPage(`${config.baseUrl}/filter?language=1&page=${normalizedPage}`, normalizedPage);
158
- };
159
- const fetchDubbedAnime = async (page = 1) => {
160
- const normalizedPage = normalizePageNumber(page);
161
- return scrapeCardPage(`${config.baseUrl}/filter?language=2&page=${normalizedPage}`, normalizedPage);
162
- };
163
- const fetchMovie = async (page = 1) => {
164
- const normalizedPage = normalizePageNumber(page);
165
- return scrapeCardPage(`${config.baseUrl}/type/movie?page=${normalizedPage}`, normalizedPage);
166
- };
167
- const fetchTV = async (page = 1) => {
168
- const normalizedPage = normalizePageNumber(page);
169
- return scrapeCardPage(`${config.baseUrl}/type/tv?page=${normalizedPage}`, normalizedPage);
170
- };
171
- const fetchOVA = async (page = 1) => {
172
- const normalizedPage = normalizePageNumber(page);
173
- return scrapeCardPage(`${config.baseUrl}/type/ova?page=${normalizedPage}`, normalizedPage);
174
- };
175
- const fetchONA = async (page = 1) => {
176
- const normalizedPage = normalizePageNumber(page);
177
- return scrapeCardPage(`${config.baseUrl}/type/ona?page=${normalizedPage}`, normalizedPage);
178
- };
179
- const fetchSpecial = async (page = 1) => {
180
- const normalizedPage = normalizePageNumber(page);
181
- return scrapeCardPage(`${config.baseUrl}/type/special?page=${normalizedPage}`, normalizedPage);
182
- };
183
- const fetchGenres = async () => {
184
- try {
185
- const {
186
- data
187
- } = await axios.get(`${config.baseUrl}/home`, {
188
- headers: defaultHeaders
189
- });
190
- const $ = load(data);
191
- const genres = [];
192
- $('a[href*="/genre/"]').each((_, el) => {
193
- const g = $(el).text().trim();
194
- if (g && !genres.includes(g)) {
195
- genres.push(g);
196
- }
197
- });
198
- return genres.length > 0 ? genres : ['Action', 'Adventure', 'Comedy', 'Drama', 'Fantasy', 'Horror', 'Mystery', 'Romance', 'Sci-Fi', 'Slice of Life', 'Supernatural'];
199
- } catch {
200
- return ['Action', 'Adventure', 'Comedy', 'Drama', 'Fantasy', 'Horror', 'Mystery', 'Romance', 'Sci-Fi', 'Slice of Life', 'Supernatural'];
201
- }
202
- };
203
- const genreSearch = async (genre, page = 1) => {
204
- const normalizedPage = normalizePageNumber(page);
205
- const cleanGenre = genre.toLowerCase().replace(/\s+/g, '-');
206
- return scrapeCardPage(`${config.baseUrl}/genre/${cleanGenre}?page=${normalizedPage}`, normalizedPage);
110
+ for (const genre of genres ?? []) params.append('genres[]', genre);
111
+ const query = params.toString();
112
+ return scrapeCardPage(query ? `/filter?${query}` : '/filter', page);
207
113
  };
114
+ const fetchTopAiring = async (page = 1) => scrapeCardPage('/status/currently-airing', page);
115
+ const fetchMostPopular = async (page = 1) => scrapeCardPage('/most-viewed', page);
116
+ const fetchMostFavorite = async (page = 1) => scrapeCardPage('/filter?sort=most_favorite', page);
117
+ const fetchLatestCompleted = async (page = 1) => scrapeCardPage('/status/finished-airing', page);
118
+ const fetchRecentlyUpdated = async (page = 1) => scrapeCardPage('/latest-updated', page);
119
+ const fetchRecentlyAdded = async (page = 1) => scrapeCardPage('/new-release', page);
120
+ const fetchTopUpcoming = async (page = 1) => scrapeCardPage('/status/not-yet-aired', page);
121
+ /** @param studioId the studio's slug */
122
+ const fetchStudio = async (studioId, page = 1) => scrapeCardPage(`/studio/${studioId}`, page);
123
+ const fetchSubbedAnime = async (page = 1) => scrapeCardPage('/filter?language=1', page);
124
+ const fetchDubbedAnime = async (page = 1) => scrapeCardPage('/filter?language=2', page);
125
+ const fetchMovie = async (page = 1) => scrapeCardPage('/type/movie', page);
126
+ const fetchTV = async (page = 1) => scrapeCardPage('/type/tv', page);
127
+ const fetchOVA = async (page = 1) => scrapeCardPage('/type/ova', page);
128
+ const fetchONA = async (page = 1) => scrapeCardPage('/type/ona', page);
129
+ const fetchSpecial = async (page = 1) => scrapeCardPage('/type/special', page);
130
+
131
+ /** The genres the home page links to, by name; genreSearch takes them. */
132
+ const fetchGenres = async () => linkedGenres(load((await axios.get(`${config.baseUrl}/home`, {
133
+ headers: defaultHeaders
134
+ })).data));
135
+
136
+ /** @param genre a genre name or slug ("Slice of Life", "slice-of-life") */
137
+ const genreSearch = async (genre, page = 1) => scrapeCardPage(`/genre/${genre.toLowerCase().replace(/\s+/g, '-')}`, page);
138
+
139
+ /**
140
+ * The anime airing on a day.
141
+ * @param date `YYYY-MM-DD`; airing times are in IST (UTC+5:30)
142
+ */
208
143
  const fetchSchedule = async date => {
209
- try {
210
- const res = await axios.get(`${config.baseUrl}/ajax/schedule/date?date=${date}&tzOffset=-330`, {
211
- headers: ajaxHeaders()
212
- });
213
- const html = res.data?.result || res.data;
214
- const $ = load(html);
215
- const results = [];
216
- $('a.item').each((_, el) => {
217
- const item = $(el);
218
- const href = item.attr('href') || '';
219
- const match = href.match(/\/watch\/([^/?#]+)/);
220
- const id = match ? match[1] : href;
221
- const title = item.find('.title.d-title, .title').text().trim();
222
- const time = item.find('.time').text().trim();
223
- const episodeText = item.find('.ep span').text().trim();
224
- if (id && title) {
225
- results.push({
226
- id,
227
- title,
228
- url: href,
229
- time,
230
- episodeText
231
- });
232
- }
233
- });
234
- return results;
235
- } catch (err) {
236
- throw new Error(`[AniKoto] Failed to fetch schedule: ${err.message}`);
237
- }
144
+ const res = await axios.get(`${config.baseUrl}/ajax/schedule/date?date=${date}&tzOffset=${IST_TZ_OFFSET}`, {
145
+ headers: ajaxHeaders()
146
+ });
147
+ const $ = load(res.data?.result || res.data);
148
+ const results = [];
149
+ $('a.item').each((_, el) => {
150
+ const item = $(el);
151
+ const href = item.attr('href') || '';
152
+ const id = href.match(/\/watch\/([^/?#]+)/)?.[1] ?? href;
153
+ const title = item.find('.title.d-title, .title').text().trim();
154
+ if (id && title) {
155
+ results.push({
156
+ id,
157
+ title,
158
+ url: href,
159
+ time: item.find('.time').text().trim(),
160
+ episodeText: item.find('.ep span').text().trim()
161
+ });
162
+ }
163
+ });
164
+ return results;
238
165
  };
239
166
  const fetchSpotlight = async () => {
240
- try {
241
- const {
242
- data
243
- } = await axios.get(`${config.baseUrl}/home`, {
244
- headers: defaultHeaders
245
- });
246
- const $ = load(data);
247
- const results = [];
248
- $('.swiper-slide.item').each((_, el) => {
249
- const slide = $(el);
250
- const title = slide.find('.title.d-title, .title').text().trim();
251
- const japaneseTitle = slide.find('.title.d-title').attr('data-jp') || undefined;
252
- const href = slide.find('a[href*="/watch/"]').first().attr('href') || '';
253
- const match = href.match(/\/watch\/([^/?#]+)/);
254
- const id = match ? match[1] : '';
255
- const description = slide.find('.synopsis').text().trim() || undefined;
256
- const image = slide.find('img').attr('src') || '';
257
- if (id && title) {
258
- results.push({
259
- id,
260
- title,
261
- japaneseTitle,
262
- description,
263
- image,
264
- url: href.startsWith('http') ? href : `${config.baseUrl}${href}`
265
- });
266
- }
267
- });
268
- return results;
269
- } catch (err) {
270
- throw new Error(`[AniKoto] Failed to fetch spotlight: ${err.message}`);
271
- }
167
+ const {
168
+ data
169
+ } = await axios.get(`${config.baseUrl}/home`, {
170
+ headers: defaultHeaders
171
+ });
172
+ const $ = load(data);
173
+ const results = [];
174
+ $('.swiper-slide.item').each((_, el) => {
175
+ const slide = $(el);
176
+ const title = slide.find('.title.d-title, .title').text().trim();
177
+ const href = slide.find('a[href*="/watch/"]').first().attr('href') || '';
178
+ const id = href.match(/\/watch\/([^/?#]+)/)?.[1] ?? '';
179
+ if (id && title) {
180
+ results.push({
181
+ id,
182
+ title,
183
+ japaneseTitle: slide.find('.title.d-title').attr('data-jp') || undefined,
184
+ description: slide.find('.synopsis').text().trim() || undefined,
185
+ image: slide.find('img').attr('src') || '',
186
+ url: href.startsWith('http') ? href : `${config.baseUrl}${href}`
187
+ });
188
+ }
189
+ });
190
+ return results;
272
191
  };
273
192
  const fetchSearchSuggestions = async query => {
274
- try {
275
- const res = await axios.get(`${config.baseUrl}/ajax/anime/search?keyword=${encodeURIComponent(query)}`, {
276
- headers: ajaxHeaders()
193
+ const res = await axios.get(`${config.baseUrl}/ajax/anime/search?keyword=${encodeURIComponent(query)}`, {
194
+ headers: ajaxHeaders()
195
+ });
196
+ const $ = load(res.data?.result?.html || res.data?.result || res.data);
197
+ const suggestions = [];
198
+ $('a.item').each((_, el) => {
199
+ const item = $(el);
200
+ const href = item.attr('href') || '';
201
+ const id = href.match(/\/watch\/([^/?#]+)/)?.[1] ?? '';
202
+ const title = item.find('.name.d-title, .name').text().trim();
203
+ if (id && title) {
204
+ suggestions.push({
205
+ id,
206
+ title,
207
+ japaneseTitle: item.find('.name.d-title').attr('data-jp') || undefined,
208
+ image: item.find('.poster img, img').attr('src') || '',
209
+ url: href
210
+ });
211
+ }
212
+ });
213
+ return suggestions;
214
+ };
215
+
216
+ /** @param id the anime's slug, as in its /watch/ URL */
217
+ const fetchAnimeInfo = async id => {
218
+ const animeSlug = id.replace(/^\/watch\//, '').replace(/\/.*$/, '');
219
+ const watchUrl = `${config.baseUrl}/watch/${animeSlug}`;
220
+ const {
221
+ data: pageHtml
222
+ } = await axios.get(watchUrl, {
223
+ headers: defaultHeaders
224
+ });
225
+ const $ = load(pageHtml);
226
+ const title = $('#w-info .title.d-title, h1.title').first().text().trim();
227
+ const japaneseTitle = $('#w-info .title.d-title').attr('data-jp') || $('#w-info .names').text().split(';')[1]?.trim() || title;
228
+ const image = $('#w-info .poster img').attr('src') || $('meta[property="og:image"]').attr('content') || '';
229
+ const description = $('#w-info .synopsis .content, .synopsis').text().replace(/\[more\]/g, '').trim();
230
+
231
+ // The site's numeric anime id (e.g. 7174), which the episode list is fetched by.
232
+ const dataId = $('#watch-main').attr('data-id') || $('.layout-page-watchtv').attr('data-id') || $('#w-rating').attr('data-id') || $('[data-id]').first().attr('data-id');
233
+ let type = 'TV';
234
+ let premiered;
235
+ let aired;
236
+ let status;
237
+ const genres = [];
238
+ const studios = [];
239
+ const producers = [];
240
+ let duration;
241
+ let rating;
242
+ const linkTexts = (el, list, skip) => $(el).find('a').each((_, a) => {
243
+ const text = $(a).text().trim();
244
+ if (text && text !== skip && !list.includes(text)) list.push(text);
245
+ });
246
+ $('#w-info .bmeta .meta div').each((_, el) => {
247
+ const text = $(el).text();
248
+ const value = $(el).find('span').text().trim();
249
+ if (text.includes('Type:')) type = value;else if (text.includes('Premiered:')) premiered = value;else if (text.includes('Aired:')) aired = value;else if (text.includes('Status:')) status = toMediaStatus(value);else if (text.includes('Genres:')) linkTexts(el, genres);else if (text.includes('Studios:')) linkTexts(el, studios);else if (text.includes('Producers:')) linkTexts(el, producers, 'unknown');else if (text.includes('Duration:')) duration = value;else if (text.includes('MAL:')) rating = value ? parseFloat(value) : undefined;
250
+ });
251
+ const episodes = [];
252
+ if (dataId) {
253
+ const epRes = await axios.get(`${config.baseUrl}/ajax/episode/list/${dataId}`, {
254
+ headers: ajaxHeaders(watchUrl)
277
255
  });
278
- const html = res.data?.result?.html || res.data?.result || res.data;
279
- const $ = load(html);
280
- const suggestions = [];
281
- $('a.item').each((_, el) => {
282
- const item = $(el);
283
- const href = item.attr('href') || '';
284
- const match = href.match(/\/watch\/([^/?#]+)/);
285
- const id = match ? match[1] : '';
286
- const title = item.find('.name.d-title, .name').text().trim();
287
- const japaneseTitle = item.find('.name.d-title').attr('data-jp') || undefined;
288
- const image = item.find('.poster img, img').attr('src') || '';
289
- if (id && title) {
290
- suggestions.push({
291
- id,
292
- title,
293
- japaneseTitle,
294
- image,
295
- url: href
256
+ const $ep = load(epRes.data?.result || epRes.data);
257
+ $ep('li').each((_, li) => {
258
+ const listItem = $ep(li);
259
+ const anchor = listItem.find('a').first();
260
+ const dataIds = anchor.attr('data-ids') || anchor.attr('data-id') || '';
261
+ const numAttr = anchor.attr('data-num') || anchor.attr('data-slug') || anchor.find('b').text().trim();
262
+ const num = parseInt(numAttr, 10) || 1;
263
+ if (dataIds) {
264
+ episodes.push({
265
+ id: toEpisodeId(animeSlug, dataIds),
266
+ number: num,
267
+ title: listItem.attr('title') || anchor.find('.d-title').text().trim() || `Episode ${num}`,
268
+ url: `${config.baseUrl}/watch/${animeSlug}/ep-${num}`,
269
+ isFiller: anchor.hasClass('filler'),
270
+ isSubbed: anchor.attr('data-sub') === '1',
271
+ isDubbed: anchor.attr('data-dub') === '1'
296
272
  });
297
273
  }
298
274
  });
299
- return suggestions;
300
- } catch {
301
- return [];
302
275
  }
276
+ return {
277
+ id: animeSlug,
278
+ title,
279
+ japaneseTitle,
280
+ image,
281
+ description,
282
+ type,
283
+ status,
284
+ genres,
285
+ studios,
286
+ producers,
287
+ duration,
288
+ rating,
289
+ aired,
290
+ season: premiered,
291
+ totalEpisodes: episodes.length > 0 ? episodes.length : undefined,
292
+ episodes
293
+ };
303
294
  };
304
- const fetchAnimeInfo = async id => {
305
- try {
306
- const animeSlug = id.replace(/^\/watch\//, '').replace(/\/.*$/, '');
307
- const watchUrl = `${config.baseUrl}/watch/${animeSlug}`;
308
- const {
309
- data: pageHtml
310
- } = await axios.get(watchUrl, {
311
- headers: defaultHeaders
312
- });
313
- const $ = load(pageHtml);
314
- const title = $('#w-info .title.d-title, h1.title').first().text().trim();
315
- const japaneseTitle = $('#w-info .title.d-title').attr('data-jp') || $('#w-info .names').text().split(';')[1]?.trim() || title;
316
- const image = $('#w-info .poster img').attr('src') || $('meta[property="og:image"]').attr('content') || '';
317
- const description = $('#w-info .synopsis .content, .synopsis').text().replace(/\[more\]/g, '').trim();
318
295
 
319
- // Extract anime ID (data-id e.g. 7174)
320
- const dataId = $('#watch-main').attr('data-id') || $('.layout-page-watchtv').attr('data-id') || $('#w-rating').attr('data-id') || $('[data-id]').first().attr('data-id');
321
-
322
- // Extract metadata
323
- let type = 'TV';
324
- let premiered;
325
- let aired;
326
- let status = MediaStatusEnum.UNKNOWN;
327
- const genres = [];
328
- const studios = [];
329
- const producers = [];
330
- let duration;
331
- let rating;
332
- $('#w-info .bmeta .meta div').each((_, el) => {
333
- const text = $(el).text();
334
- if (text.includes('Type:')) {
335
- type = $(el).find('span').text().trim();
336
- } else if (text.includes('Premiered:')) {
337
- premiered = $(el).find('span').text().trim();
338
- } else if (text.includes('Aired:')) {
339
- aired = $(el).find('span').text().trim();
340
- } else if (text.includes('Status:')) {
341
- const s = $(el).find('span').text().trim().toLowerCase();
342
- if (s.includes('finished')) status = MediaStatusEnum.COMPLETED;else if (s.includes('airing') || s.includes('ongoing')) status = MediaStatusEnum.ONGOING;else if (s.includes('not yet')) status = MediaStatusEnum.NOT_YET_AIRED;
343
- } else if (text.includes('Genres:')) {
344
- $(el).find('a').each((_, a) => {
345
- const g = $(a).text().trim();
346
- if (g && !genres.includes(g)) genres.push(g);
347
- });
348
- } else if (text.includes('Studios:')) {
349
- $(el).find('a').each((_, a) => {
350
- const st = $(a).text().trim();
351
- if (st && !studios.includes(st)) studios.push(st);
352
- });
353
- } else if (text.includes('Producers:')) {
354
- $(el).find('a').each((_, a) => {
355
- const pr = $(a).text().trim();
356
- if (pr && pr !== 'unknown' && !producers.includes(pr)) producers.push(pr);
357
- });
358
- } else if (text.includes('Duration:')) {
359
- duration = $(el).find('span').text().trim();
360
- } else if (text.includes('MAL:')) {
361
- const r = $(el).find('span').text().trim();
362
- rating = r ? parseFloat(r) : undefined;
363
- }
296
+ /**
297
+ * The servers the episode's list has in `subOrDub`, in list order: each one's link id, name and
298
+ * label, and whether it is the dub (unknown when the list has no language groups).
299
+ */
300
+ const listServers = async (episodeId, subOrDub) => {
301
+ const dataIds = siteEpisodeId(episodeId) ?? episodeId;
302
+ const targetSubDub = subOrDub === SubOrDubEnum.DUB ? 'dub' : 'sub';
303
+ const url = `${config.baseUrl}/ajax/server/list?servers=${encodeURIComponent(dataIds)}`;
304
+ const html = await serverLists.get(url, async () => {
305
+ const res = await axios.get(url, {
306
+ headers: ajaxHeaders()
364
307
  });
308
+ return res.data?.result || res.data;
309
+ });
310
+ const $ = load(html);
365
311
 
366
- // Fetch episodes from /ajax/episode/list/${dataId}
367
- const episodes = [];
368
- if (dataId) {
369
- try {
370
- const epRes = await axios.get(`${config.baseUrl}/ajax/episode/list/${dataId}`, {
371
- headers: ajaxHeaders(watchUrl)
372
- });
373
- const epHtml = epRes.data?.result || epRes.data;
374
- const $ep = load(epHtml);
375
- $ep('li').each((_, li) => {
376
- const listItem = $ep(li);
377
- const anchor = listItem.find('a').first();
378
- const dataIds = anchor.attr('data-ids') || anchor.attr('data-id') || '';
379
- const numAttr = anchor.attr('data-num') || anchor.attr('data-slug') || anchor.find('b').text().trim();
380
- const num = parseInt(numAttr, 10) || 1;
381
- const epTitle = listItem.attr('title') || anchor.find('.d-title').text().trim() || `Episode ${num}`;
382
- const isFiller = anchor.hasClass('filler');
383
- const isSubbed = anchor.attr('data-sub') === '1';
384
- const isDubbed = anchor.attr('data-dub') === '1';
385
- if (dataIds) {
386
- episodes.push({
387
- id: `${animeSlug}$episode$${dataIds}`,
388
- number: num,
389
- title: epTitle,
390
- url: `${config.baseUrl}/watch/${animeSlug}/ep-${num}`,
391
- isFiller,
392
- isSubbed,
393
- isDubbed
394
- });
395
- }
396
- });
397
- } catch {
398
- // Keep empty episodes if request fails
399
- }
400
- }
312
+ // The list is grouped by language; a page without groups lists every server in one.
313
+ const groups = $('.servers .type[data-type]');
314
+ const serverList = groups.length ? groups.filter(`[data-type="${targetSubDub}"]`).find('li[data-link-id]') : $('.servers li[data-link-id]');
315
+ const isDub = groups.length ? targetSubDub === 'dub' : undefined;
316
+ return serverList.toArray().map(el => {
317
+ const label = $(el).text().replace(/\s+/g, ' ').trim();
401
318
  return {
402
- id: animeSlug,
403
- title,
404
- japaneseTitle,
405
- image,
406
- description,
407
- type,
408
- status,
409
- genres,
410
- studios,
411
- producers,
412
- duration,
413
- rating,
414
- aired,
415
- season: premiered,
416
- totalEpisodes: episodes.length > 0 ? episodes.length : undefined,
417
- episodes
319
+ linkId: $(el).attr('data-link-id'),
320
+ name: serverName('megaplay', label),
321
+ label,
322
+ isDub
418
323
  };
419
- } catch (err) {
420
- throw new Error(`[AniKoto] Failed to fetch anime info: ${err.message}`);
421
- }
324
+ });
422
325
  };
423
- const fetchEpisodeServers = async (episodeId, subOrDub = SubOrDubEnum.SUB) => {
424
- try {
425
- const dataIds = episodeId.includes('$episode$') ? episodeId.split('$episode$')[1] : episodeId;
426
- const targetSubDub = subOrDub === SubOrDubEnum.DUB ? 'dub' : 'sub';
427
- const res = await axios.get(`${config.baseUrl}/ajax/server/list?servers=${encodeURIComponent(dataIds)}`, {
428
- headers: ajaxHeaders()
429
- });
430
- const html = res.data?.result || res.data;
431
- const $ = load(html);
432
- const rawServers = [];
433
- let serverList = $(`.servers .type[data-type="${targetSubDub}"] li[data-link-id]`);
434
- if (!serverList.length) {
435
- // Fallback to any available type
436
- serverList = $('.servers li[data-link-id]');
437
- }
438
- serverList.each((_, el) => {
439
- const item = $(el);
440
- const name = item.text().trim();
441
- const linkId = item.attr('data-link-id');
442
- if (linkId) {
443
- rawServers.push({
444
- name,
445
- linkId
446
- });
447
- }
448
- });
449
326
 
450
- // Resolve each server link to its embed URL via /ajax/server?get=
451
- const servers = [];
452
- for (const s of rawServers) {
453
- try {
454
- const {
455
- data: linkData
456
- } = await axios.get(`${config.baseUrl}/ajax/server?get=${encodeURIComponent(s.linkId)}`, {
457
- headers: ajaxHeaders()
458
- });
459
- const embedUrl = linkData?.result?.url;
460
- if (embedUrl) {
461
- servers.push({
462
- name: `megaplay-${s.name.toLowerCase().replace(/[^a-z0-9_-]/g, '')}`,
463
- url: embedUrl
464
- });
465
- }
466
- } catch {
467
- // Continue to next server
468
- }
469
- }
470
- return servers;
471
- } catch (err) {
472
- throw new Error(`[AniKoto] Failed to fetch episode servers: ${err.message}`);
473
- }
327
+ /** The embed URL of a server's link; falsy when the site gives none. */
328
+ const embedUrlOf = linkId => {
329
+ const url = `${config.baseUrl}/ajax/server?get=${encodeURIComponent(linkId)}`;
330
+ return embedUrls.get(url, async () => (await axios.get(url, {
331
+ headers: ajaxHeaders()
332
+ })).data?.result?.url);
474
333
  };
475
- const fetchEpisodeSources = async (episodeId, server = StreamingServersEnum.MegaPlay, subOrDub = SubOrDubEnum.SUB) => {
476
- if (episodeId.startsWith('http')) {
477
- const serverUrl = new PolyURL(episodeId);
478
- switch (server) {
479
- case StreamingServersEnum.MegaPlay:
480
- default:
481
- return {
482
- headers: {
483
- Referer: serverUrl.href
484
- },
485
- ...(await MegaPlay(ctx).extract(serverUrl, config.baseUrl))
486
- };
334
+
335
+ /** @param episodeId an episode id from fetchAnimeInfo, or the site's own episode id */
336
+ const fetchEpisodeServers = async (episodeId, subOrDub = SubOrDubEnum.SUB) => {
337
+ const servers = await listServers(episodeId, subOrDub);
338
+ const resolved = await mapLimit(servers, 4, async ({
339
+ linkId,
340
+ name,
341
+ label,
342
+ isDub
343
+ }) => {
344
+ if (!linkId) return undefined;
345
+ try {
346
+ const embedUrl = await embedUrlOf(linkId);
347
+ return embedUrl ? {
348
+ name,
349
+ url: embedUrl,
350
+ label,
351
+ isDub
352
+ } : undefined;
353
+ } catch {
354
+ // A server whose link doesn't resolve is left out; the others still play.
355
+ return undefined;
487
356
  }
488
- }
489
- try {
490
- const servers = await fetchEpisodeServers(episodeId, subOrDub);
491
- if (!servers.length) {
492
- throw new Error(`[AniKoto] No servers available for episode: ${episodeId}`);
357
+ });
358
+ return resolved.filter(server => !!server);
359
+ };
360
+ const extractFrom = embedUrl => MegaPlay(ctx).extract(new PolyURL(embedUrl), config.baseUrl);
361
+
362
+ /**
363
+ * @param episodeId an episode id from fetchAnimeInfo, or a server's embed URL
364
+ * @param server a server name from fetchEpisodeServers, or the start of one; the first server when omitted
365
+ * @param subOrDub default `SubOrDub.SUB`
366
+ */
367
+ const fetchEpisodeSources = async (episodeId, server, subOrDub = SubOrDubEnum.SUB) => {
368
+ if (episodeId.startsWith('http')) return extractFrom(episodeId);
369
+
370
+ // The server pickServer would pick from fetchEpisodeServers: the first, in list order, whose
371
+ // name `server` starts (every server without one) and whose link gives an embed URL. Only the
372
+ // links up to it are resolved.
373
+ const wanted = server?.toLowerCase();
374
+ for (const {
375
+ linkId,
376
+ name
377
+ } of await listServers(episodeId, subOrDub)) {
378
+ if (!linkId || wanted && !name.toLowerCase().startsWith(wanted)) continue;
379
+ let embedUrl;
380
+ try {
381
+ embedUrl = await embedUrlOf(linkId);
382
+ } catch {
383
+ continue;
493
384
  }
494
- const matchedServer = servers.find(s => s.name.toLowerCase().includes(String(server).toLowerCase())) || servers[0];
495
- const serverUrl = new PolyURL(matchedServer.url);
496
- return {
497
- headers: {
498
- Referer: serverUrl.href
499
- },
500
- ...(await MegaPlay(ctx).extract(serverUrl, config.baseUrl))
501
- };
502
- } catch (err) {
503
- throw new Error(`[AniKoto] Failed to fetch episode sources: ${err.message}`);
385
+ if (embedUrl) return extractFrom(embedUrl);
504
386
  }
387
+ // None does: pickServer throws its error, naming the servers there are.
388
+ return extractFrom(pickServer(await fetchEpisodeServers(episodeId, subOrDub), server).url);
505
389
  };
506
390
  return {
507
391
  ...config,