Update animedefenders/animedefenders.js
Fetch and Save Remote Content / fetch (push) Has been cancelled
Fetch and Save Remote Content / fetch (push) Has been cancelled
This commit is contained in:
@@ -84,13 +84,14 @@ async function extractStreamUrl(url) {
|
||||
if (!iframeUrl) return JSON.stringify({ streams: [], subtitle: "" });
|
||||
|
||||
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) {
|
||||
const fullUrl = streamUrl.startsWith("/") ? "https://playeng.animeapps.top" + streamUrl : streamUrl.startsWith("http") ? streamUrl : "https://playeng.animeapps.top/r2/" + streamUrl;
|
||||
return JSON.stringify({
|
||||
streams: [{
|
||||
title: "Server 1",
|
||||
streamUrl: "https://playeng.animeapps.top/r2/" + streamUrl,
|
||||
streamUrl: fullUrl,
|
||||
headers: { "Referer": "https://anibd.app/" }
|
||||
}],
|
||||
subtitle: ""
|
||||
|
||||
Reference in New Issue
Block a user