feat: update Movies4U version to 1.4 and modify catalog titles

fix: handle anti-DDoS checks in meta and posts fetching
fix: improve episode extraction logic in episodes
fix: enhance stream link extraction in stream

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
Himanshu
2026-05-03 21:24:04 +05:30
parent 80e687da6b
commit 2ce3c737d1
11 changed files with 309 additions and 83 deletions
+44 -1
View File
@@ -44,7 +44,50 @@ export async function getStream({
// console.log('dotlinkText', dotlinkText);
const vlink = dotlinkText.match(/<a\s+href="([^"]*cloud\.[^"]*)"/i) || [];
// console.log('vLink', vlink[1]);
link = vlink[1];
if (vlink[1]) {
link = vlink[1];
} else {
// Try to find hubcloud or gdflix links directly
const $ = cheerio.load(dotlinkText);
const directLink = $("a")
.filter((i, el) => {
const href = $(el).attr("href") || "";
return (
href.includes("hubcloud") ||
href.includes("gdflix") ||
href.includes("filebee") ||
href.includes("fastdl")
);
})
.first()
.attr("href");
if (directLink) {
link = directLink;
}
}
// If it's a fastdl link, extract the redirect URL
if (link.includes("fastdl.zip")) {
try {
const fastdlRes = await axios.get(link, { headers });
const reurlMatch = fastdlRes.data.match(/var reurl = "([^"]+)";/);
if (reurlMatch && reurlMatch[1]) {
const actualLink = reurlMatch[1].replace(
"https://fastdl.zip/dl.php?link=",
"",
);
streamLinks.push({
server: "fastdl",
link: actualLink,
type: "mkv",
});
return streamLinks;
}
} catch (error) {
console.log("fastdl error: ", error);
}
}
// filepress link
try {