From 9b1c80f7e64421f9bcc455cbdc0a9da343979795 Mon Sep 17 00:00:00 2001 From: aka paul <50n50@noreply.localhost> Date: Mon, 3 Nov 2025 18:18:17 +0000 Subject: [PATCH] Update animeweek/animeweek.js --- animeweek/animeweek.js | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/animeweek/animeweek.js b/animeweek/animeweek.js index d4954da..27fd315 100644 --- a/animeweek/animeweek.js +++ b/animeweek/animeweek.js @@ -93,15 +93,38 @@ async function extractStreamUrl(url) { }; const response = await fetchv2("https://michealcdn.com/player/index.php?data=" + videoId + "&do=getVideo", headers, "POST", postData); const data = await response.json(); - return data.securedLink; + console.log("Fetched video data: " + JSON.stringify(data)); + + const streamUrl = data.securedLink; + return JSON.stringify({ + "streams": [ + { + "title": "Stream 1", + "streamUrl": streamUrl, + "headers": { + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36", + "Accept": "*/*", + "Accept-Language": "en-US,en;q=0.9", + "Accept-Encoding": "gzip, deflate, br", + "Referer": "https://michealcdn.com/", + "Origin": "https://michealcdn.com", + "Sec-Fetch-Dest": "video", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "same-origin", + "Range": "bytes=0-" + } + } + ], + "subtitle": "" + }); } catch (err) { console.log("Error fetching video URL:"+ err); } - return "https://error.org/"; + return JSON.stringify({"streams": [{"title": "Error", "streamUrl": "https://error.org/", "headers": {}}], "subtitle": ""}); } - return "https://error.org/"; + return JSON.stringify({"streams": [{"title": "Error", "streamUrl": "https://error.org/", "headers": {}}], "subtitle": ""}); } catch (err) { - return "https://error.org/"; + return JSON.stringify({"streams": [{"title": "Error", "streamUrl": "https://error.org/", "headers": {}}], "subtitle": ""}); } }