Update animedefenders/animedefenders.js
Fetch and Save Remote Content / fetch (push) Has been cancelled

This commit is contained in:
aka paul
2026-04-17 18:46:51 +00:00
parent 4ad76c5519
commit 58788a8cf2
+3 -2
View File
@@ -84,13 +84,14 @@ async function extractStreamUrl(url) {
if (!iframeUrl) return JSON.stringify({ streams: [], subtitle: "" }); if (!iframeUrl) return JSON.stringify({ streams: [], subtitle: "" });
const iframeHtml = await (await fetchv2(iframeUrl, { "Referer": "https://anibd.app/" })).text(); const iframeHtml = await (await fetchv2(iframeUrl, { "Referer": "https://anibd.app/" })).text();
const streamUrl = iframeHtml.match(/url:\s*['"]([^'"]+\.m3u8)['"]/)?.[1]; let streamUrl = iframeHtml.match(/url:\s*['"]([^'"]+\.m3u8)['"]/)?.[1] || iframeHtml.match(/videoUrl:\s*["']([^"']+\.m3u8)['"]/)?.[1];
if (streamUrl) { if (streamUrl) {
const fullUrl = streamUrl.startsWith("/") ? "https://playeng.animeapps.top" + streamUrl : streamUrl.startsWith("http") ? streamUrl : "https://playeng.animeapps.top/r2/" + streamUrl;
return JSON.stringify({ return JSON.stringify({
streams: [{ streams: [{
title: "Server 1", title: "Server 1",
streamUrl: "https://playeng.animeapps.top/r2/" + streamUrl, streamUrl: fullUrl,
headers: { "Referer": "https://anibd.app/" } headers: { "Referer": "https://anibd.app/" }
}], }],
subtitle: "" subtitle: ""