Advertisement
LucasMod

By: @lucas_mod_domina

Jul 4th, 2025
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 2.94 KB | Source Code | 0 0
  1. //By: 𖧄 𝐋𝐔𝐂𝐀𝐒 𝐌𝐎𝐃 𝐃𝐎𝐌𝐈𝐍𝐀 𖧄
  2. //Canal: https://whatsapp.com/channel/0029Va6riekH5JLwLUFI7P2B
  3.  
  4. const axios = require('axios');
  5.  
  6. class AnimeLovers {
  7. constructor() {
  8. this.client = axios.create({
  9. baseURL: 'https://apps.animekita.org/api/v1.1.9',
  10. headers: {
  11. 'user-agent': 'Dart/3.1 (dart:io)',
  12. 'accept-encoding': 'gzip',
  13. 'host': 'apps.animekita.org'
  14. }
  15. });
  16. }
  17.  
  18. async newUploads(page = '1') {
  19. if (page && isNaN(page)) throw new Error('Invalid page input');
  20. const { data } = await this.client(`/baruupload.php?page=${page}`)
  21. .catch(error => {
  22. console.error(error.message);
  23. throw new Error('No result found');
  24. });
  25. return data;
  26. }
  27.  
  28. async movieList() {
  29. const { data } = await this.client(`/movie.php`)
  30. .catch(error => {
  31. console.error(error.message);
  32. throw new Error('No result found');
  33. });
  34. return data;
  35. }
  36.  
  37. async schedule() {
  38. const { data } = await this.client(`/jadwal.php`)
  39. .catch(error => {
  40. console.error(error.message);
  41. throw new Error('No result found');
  42. });
  43. return data;
  44. }
  45.  
  46. async animeList() {
  47. const { data } = await this.client(`/anime-list.php`)
  48. .catch(error => {
  49. console.error(error.message);
  50. throw new Error('No result found');
  51. });
  52. return data;
  53. }
  54.  
  55. async genre(genre, page = '1') {
  56. const _genre = ['action', 'adventure', 'comedy', 'demons', 'drama', 'ecchi', 'fantasy', 'game', 'harem', 'historical', 'horror', 'josei', 'magic', 'martial-arts', 'mecha', 'military', 'music', 'mystery', 'psychological', 'parody', 'police', 'romance', 'samurai', 'school', 'sci-fi', 'seinen', 'shoujo', 'shoujo-ai', 'shounen', 'slice-of-life', 'sports', 'space', 'super-power', 'supernatural', 'thriller', 'vampire', 'yaoi', 'yuri'];
  57. if (!_genre.includes(genre)) throw new Error(`List available genres: ${_genre.join(', ')}`);
  58. if (page && isNaN(page)) throw new Error('Invalid page input');
  59. const { data } = await this.client(`/genreseries.php?url=${genre}/&page=${page}`)
  60. .catch(error => {
  61. console.error(error.message);
  62. throw new Error('No result found');
  63. });
  64. return data;
  65. }
  66.  
  67. async search(query) {
  68. if (!query) throw new Error('Query is required');
  69. const { data } = await this.client(`/search.php?keyword=${query}`)
  70. .catch(error => {
  71. console.error(error.message);
  72. throw new Error('No result found');
  73. });
  74. return data;
  75. }
  76.  
  77. async detail(url) {
  78. if (!url) throw new Error('Url is required');
  79. const { data } = await this.client(`/series.php?url=${url}`)
  80. .catch(error => {
  81. console.error(error.message);
  82. throw new Error('No result found');
  83. });
  84. return data;
  85. }
  86.  
  87. async episode(url, reso = '720p') {
  88. const _reso = ['320p', '480p', '720p', '1080p', '4K'];
  89. if (!url) throw new Error('Url is required');
  90. if (!_reso.includes(reso)) throw new Error(`List available resolutions: ${_reso.join(', ')}`);
  91. const { data } = await this.client(`/chapter.php?url=${url}&reso=${reso}`)
  92. .catch(error => {
  93. console.error(error.message);
  94. throw new Error('No result found');
  95. });
  96. return data;
  97. }
  98. }
  99.  
  100. module.exports = AnimeLovers
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement