This commit is contained in:
himanshu8443
2025-06-17 21:32:50 +05:30
parent 1b23125dfd
commit a2afb200ad
264 changed files with 0 additions and 16201 deletions

View File

@@ -1,64 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getEpisodes = void 0;
const getEpisodes = async function ({ url, providerContext, }) {
try {
if (!url.includes("luxelinks") || url.includes("luxecinema")) {
const res = await providerContext.axios.get(url, {
headers: providerContext.commonHeaders,
});
const data = res.data;
const encodedLink = data.match(/"link":"([^"]+)"/)?.[1];
if (encodedLink) {
url = encodedLink ? atob(encodedLink) : url;
}
else {
const redirectUrlRes = await fetch("https://ext.8man.me/api/cinemaluxe", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({ url }),
});
const redirectUrl = await redirectUrlRes.json();
url = redirectUrl?.redirectUrl || url;
}
}
const res = await providerContext.axios.get(url, {
headers: providerContext.commonHeaders,
});
const html = res.data;
let $ = providerContext.cheerio.load(html);
const episodeLinks = [];
if (url.includes("luxedrive")) {
episodeLinks.push({
title: "Movie",
link: url,
});
return episodeLinks;
}
$("a.maxbutton-4,a.maxbutton,.maxbutton-hubcloud,.ep-simple-button").map((i, element) => {
const title = $(element).text()?.trim();
const link = $(element).attr("href");
if (title &&
link &&
!title.includes("Batch") &&
!title.toLowerCase().includes("zip")) {
episodeLinks.push({
title: title
.replace(/\(\d{4}\)/, "")
.replace("Download", "Movie")
.replace("⚡", "")
.trim(),
link,
});
}
});
return episodeLinks;
}
catch (err) {
console.error("cl episode links", err);
return [];
}
};
exports.getEpisodes = getEpisodes;