From d160cb3e509112e1cfbec2b9da8835bd6bb22489 Mon Sep 17 00:00:00 2001 From: aka paul <50n50@noreply.localhost> Date: Sun, 8 Mar 2026 19:04:03 +0000 Subject: [PATCH] Update animekai/arabic/animekai.js --- animekai/arabic/animekai.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/animekai/arabic/animekai.js b/animekai/arabic/animekai.js index 3f9d5fe..4af35d7 100644 --- a/animekai/arabic/animekai.js +++ b/animekai/arabic/animekai.js @@ -225,23 +225,23 @@ async function extractStreamUrl(url) { const decryptedUrls = await processStreams(streamUrls); const decryptedSoftsub = decryptedUrls.Softsub || decryptedUrls.Dub || decryptedUrls.Sub; - console.log(decryptedSoftsub); const headers = { "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" }; 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 result = responseJson?.result; const postData = { "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 m3u8Link = finalJson?.result?.sources?.[0]?.file; @@ -258,10 +258,11 @@ async function extractStreamUrl(url) { } } - return JSON.stringify({ - stream: m3u8Link, - subtitles: "https://deno-proxies-sznvnpnxwhbv.deno.dev/?url="+ encodeURIComponent(subtitleUrl) -}); + const finalResult = { + stream: m3u8Link, + subtitles: subtitleUrl ? "https://deno-proxies-sznvnpnxwhbv.deno.dev/?url="+ encodeURIComponent(subtitleUrl) : null + }; + return JSON.stringify(finalResult); } return "error";