feat: initial project setup for AniKatoAPI

- Express.js server with Vercel deployment support
- Complete API endpoints for anikototv.to anime data
- Home, search, info, episodes, stream, schedule endpoints
- Category filtering and genre support
- Caching system with 5-minute TTL
- CORS configuration
- Public documentation page
- Docker and Render deployment configs
- MIT License
This commit is contained in:
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ
2026-06-08 15:08:22 +05:30
commit 3815521b0d
47 changed files with 1846 additions and 0 deletions
+40
View File
@@ -0,0 +1,40 @@
import * as cheerio from "cheerio";
import axios from "axios";
import { headers } from "../configs/header.config.js";
import { URLS } from "../configs/dataUrl.js";
const extractSpotlight = async () => {
try {
const { data } = await axios.get(URLS.home, { headers });
const $ = cheerio.load(data);
const spotlights = [];
$(".swiper-slide, .spotlight-item").each((i, el) => {
const id = $(el).find("a").attr("href")?.split("/").pop() || "";
const poster = $(el).find("img").attr("src") || "";
const title = $(el).find(".film-name a, .dynamic-name").text().trim() || "";
const japaneseTitle = $(el).find(".fdi-item:nth-child(1)").text().trim() || "";
const description = $(el).find(".fd-infor .desc, .film-description").text().trim() || "";
const showType = $(el).find(".fdi-item:nth-child(2)").text().trim() || "";
const duration = $(el).find(".fdi-item:nth-child(3)").text().trim() || "";
const releaseDate = $(el).find(".fdi-item:nth-child(4)").text().trim() || "";
if (id) {
spotlights.push({
id,
poster,
title,
japaneseTitle,
description,
tvInfo: { showType, duration, releaseDate }
});
}
});
return spotlights;
} catch (error) {
throw error;
}
};
export { extractSpotlight };