update
Fetch and Save Remote Content / fetch (push) Successful in 39s
Sync Versions to index.json / sync-versions (push) Failing after 54s

This commit is contained in:
aka paul
2026-05-27 20:30:23 +02:00
parent caffaabc88
commit 597f279e49
113 changed files with 1207 additions and 980 deletions
+65 -47
View File
@@ -29,12 +29,17 @@ async function extractDetails(url) {
try {
const response = await fetchv2(url);
const html = await response.text();
const regex = /<div class="view-stocon"><div class="c" id="animeContents">([\s\S]*?)<\/div><\/div>/;
const regex = /<div class="view-stocon"><div class="c"[^>]*>([\s\S]*?)<\/div>/;
let description = "N/A";
const match = regex.exec(html);
if (match) {
description = match[1].replace(/<br>/g, "\n").replace(/&nbsp;/g, " ").replace(/<[^>]*>/g, "").replace(/\n\n+/g, "\n").trim();
description = match[1]
.replace(/<br\s*\/?>/gi, "\n")
.replace(/&nbsp;/g, " ")
.replace(/<[^>]*>/g, "")
.replace(/\n\s*\n+/g, "\n")
.trim();
}
return JSON.stringify([{
@@ -74,57 +79,70 @@ async function extractEpisodes(url) {
}]);
}
}
async function extractStreamUrl(url) {
try {
const response = await fetchv2(url);
const html = await response.text();
const regex = /<input type="hidden" name="vurl" value="https:\/\/michealcdn\.com\/video\/([^"]+)"/;
const match = regex.exec(html);
if (match) {
try {
const videoId = match[1];
console.log("Video ID: " + videoId);
const postData = "hash=" + videoId + "&r=https%3A%2F%2Fmm.viaproducciones.net%2F"
const headers = {
"X-Requested-With": "XMLHttpRequest",
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
};
const response = await fetchv2("https://michealcdn.com/player/index.php?data=" + videoId + "&do=getVideo", headers, "POST", postData);
const data = await response.json();
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 JSON.stringify({"streams": [{"title": "Error", "streamUrl": "https://error.org/", "headers": {}}], "subtitle": ""});
const vMatch = html.match(/<input type="hidden" name="v" value="([^"]+)"/);
if (!vMatch) {
return JSON.stringify({ streams: [], subtitle: "" });
}
return JSON.stringify({"streams": [{"title": "Error", "streamUrl": "https://error.org/", "headers": {}}], "subtitle": ""});
const vValue = vMatch[1];
const glamovUrl = `https://ani.glamov.com/tv-show.php?v=${vValue}`;
const glamovResponse = await fetchv2(glamovUrl);
const glamovHtml = await glamovResponse.text();
const iframeMatch = glamovHtml.match(/<iframe src="([^"]+)"/);
if (!iframeMatch) {
return JSON.stringify({ streams: [], subtitle: "" });
}
let iframeUrl = iframeMatch[1];
if (iframeUrl.startsWith("//")) iframeUrl = "https:" + iframeUrl;
const videoIdMatch = iframeUrl.match(/\/video\/([^/?#]+)/);
if (!videoIdMatch) {
return JSON.stringify({ streams: [], subtitle: "" });
}
const videoId = videoIdMatch[1];
let iframeOrigin = "";
const originMatch = iframeUrl.match(/^(https?:\/\/[^/]+)/);
if (originMatch) {
iframeOrigin = originMatch[1];
} else {
return JSON.stringify({ streams: [], subtitle: "" });
}
const apiUrl = `${iframeOrigin}/player/index.php?data=${videoId}&do=getVideo`;
const postData = `hash=${videoId}&r=https%3A%2F%2Fani.glamov.com%2F`;
const headers = {
"X-Requested-With": "XMLHttpRequest",
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
};
const apiResponse = await fetchv2(apiUrl, headers, "POST", postData);
const apiJson = await apiResponse.json();
if (apiJson && apiJson.videoSource) {
return JSON.stringify({
streams: [{
title: "Stream 1",
streamUrl: apiJson.videoSource.replace(/\\\//g, "/"),
headers: {}
}],
subtitle: ""
});
}
return JSON.stringify({ streams: [], subtitle: "" });
} catch (err) {
return JSON.stringify({"streams": [{"title": "Error", "streamUrl": "https://error.org/", "headers": {}}], "subtitle": ""});
return JSON.stringify({ streams: [], subtitle: "" });
}
}
+1 -1
View File
@@ -5,7 +5,7 @@
"name": "50/50",
"icon": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ3122kQwublLkZ6rf1fEpUP79BxZOFmH9BSA&s"
},
"version": "1.0.8",
"version": "1.0.9",
"language": "Korean",
"streamType": "HLS",
"quality": "1080p",