1
0
forked from 50n50/sources

Update animekai/arabic/animekai.js

This commit is contained in:
aka paul
2026-03-08 19:04:03 +00:00
parent ccbe5d5233
commit d160cb3e50
+9 -8
View File
@@ -225,23 +225,23 @@ async function extractStreamUrl(url) {
const decryptedUrls = await processStreams(streamUrls); const decryptedUrls = await processStreams(streamUrls);
const decryptedSoftsub = decryptedUrls.Softsub || decryptedUrls.Dub || decryptedUrls.Sub; const decryptedSoftsub = decryptedUrls.Softsub || decryptedUrls.Dub || decryptedUrls.Sub;
console.log(decryptedSoftsub);
const headers = { const headers = {
"Referer": "https://anikai.to/", "Referer": "https://anikai.to/",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36" "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36"
}; };
if (decryptedSoftsub) { if (decryptedSoftsub) {
const response = await fetchv2(decryptedSoftsub.replace("/e/", "/media/"), headers); const mediaUrl = decryptedSoftsub.replace("/e/", "/media/");
const response = await fetchv2(mediaUrl, headers);
const responseJson = await response.json(); const responseJson = await response.json();
const result = responseJson?.result; const result = responseJson?.result;
const postData = { const postData = {
"text": result, "text": result,
"Useragent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36" "agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36"
} }
const finalResponse = await fetchv2("https://ilovekai.simplepostrequest.workers.dev/ilovebush", {}, "POST", JSON.stringify(postData)); const finalResponse = await fetchv2("https://enc-dec.app/api/dec-mega", { "Content-Type": "application/json" }, "POST", JSON.stringify(postData));
const finalJson = await finalResponse.json(); const finalJson = await finalResponse.json();
const m3u8Link = finalJson?.result?.sources?.[0]?.file; const m3u8Link = finalJson?.result?.sources?.[0]?.file;
@@ -258,10 +258,11 @@ async function extractStreamUrl(url) {
} }
} }
return JSON.stringify({ const finalResult = {
stream: m3u8Link, stream: m3u8Link,
subtitles: "https://deno-proxies-sznvnpnxwhbv.deno.dev/?url="+ encodeURIComponent(subtitleUrl) subtitles: subtitleUrl ? "https://deno-proxies-sznvnpnxwhbv.deno.dev/?url="+ encodeURIComponent(subtitleUrl) : null
}); };
return JSON.stringify(finalResult);
} }
return "error"; return "error";