fix: update extractors to match actual anikototv.to structure

- Analyzed actual HTML structure of anikototv.to
- Updated all extractors with correct CSS selectors
- Changed ID-based to slug-based lookups
- Updated URL patterns to match actual website
- Fixed stream info to use AJAX server list
- Improved error handling
This commit is contained in:
Sʜɪɴᴇɪ Nᴏᴜᴢᴇɴ
2026-06-08 15:18:27 +05:30
parent 3815521b0d
commit 1906ba4a34
20 changed files with 344 additions and 308 deletions
+3 -3
View File
@@ -3,19 +3,19 @@ import { getCache, setCache } from "../helper/cache.helper.js";
const getStreamInfo = async (req, res, next) => {
try {
const { id, server = "hd-1", type = "sub" } = req.query;
const { id } = req.query;
if (!id) {
return res.status(400).json({ success: false, message: "Episode ID is required" });
}
const cacheKey = `stream_${id}_${server}_${type}`;
const cacheKey = `stream_${id}`;
const cached = getCache(cacheKey);
if (cached) {
return res.json({ success: true, results: cached });
}
const data = await extractStreamInfo(id, server, type);
const data = await extractStreamInfo(id);
setCache(cacheKey, data);
res.json({ success: true, results: data });
} catch (error) {