This commit is contained in:
himanshu8443
2025-07-11 19:17:23 +05:30
parent 6ca69cf93b
commit 13f71510d5
139 changed files with 139 additions and 10578 deletions

View File

@@ -1,77 +1 @@
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getEpisodes = void 0;
const getEpisodes = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ url, providerContext, }) {
var _b;
try {
if (!url.includes("luxelinks") || url.includes("cinemalux")) {
const res = yield providerContext.axios.get(url, {
headers: providerContext.commonHeaders,
});
const data = res.data;
const encodedLink = (_b = data.match(/"link":"([^"]+)"/)) === null || _b === void 0 ? void 0 : _b[1];
if (encodedLink) {
url = encodedLink ? atob(encodedLink) : url;
}
else {
const redirectUrlRes = yield fetch("https://ext.8man.me/api/cinemaluxe", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({ url }),
});
const redirectUrl = yield redirectUrlRes.json();
url = (redirectUrl === null || redirectUrl === void 0 ? void 0 : redirectUrl.redirectUrl) || url;
}
}
const episodeLinks = [];
if (url.includes("luxedrive") || url.includes("drive.linkstore")) {
episodeLinks.push({
title: "Movie",
link: url,
});
return episodeLinks;
}
const res = yield providerContext.axios.get(url, {
headers: providerContext.commonHeaders,
});
const html = res.data;
let $ = providerContext.cheerio.load(html);
$("a.maxbutton-4,a.maxbutton,.maxbutton-hubcloud,.ep-simple-button").map((i, element) => {
var _a;
const title = (_a = $(element).text()) === null || _a === void 0 ? void 0 : _a.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;
"use strict";var __awaiter=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,r){function a(e){try{l(n.next(e))}catch(e){r(e)}}function s(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(a,s)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getEpisodes=void 0;const getEpisodes=function(e){return __awaiter(this,arguments,void 0,function*({url:e,providerContext:t}){var i;try{if(!e.includes("luxelinks")||e.includes("cinemalux")){const n=yield t.axios.get(e,{headers:t.commonHeaders}),o=null===(i=n.data.match(/"link":"([^"]+)"/))||void 0===i?void 0:i[1];if(o)e=o?atob(o):e;else{const t=yield fetch("https://ext.8man.me/api/cinemaluxe",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:e})}),i=yield t.json();e=(null==i?void 0:i.redirectUrl)||e}}const n=[];if(e.includes("luxedrive")||e.includes("drive.linkstore"))return n.push({title:"Movie",link:e}),n;const o=(yield t.axios.get(e,{headers:t.commonHeaders})).data;let r=t.cheerio.load(o);return r("a.maxbutton-4,a.maxbutton,.maxbutton-hubcloud,.ep-simple-button").map((e,t)=>{var i;const o=null===(i=r(t).text())||void 0===i?void 0:i.trim(),a=r(t).attr("href");o&&a&&!o.includes("Batch")&&!o.toLowerCase().includes("zip")&&n.push({title:o.replace(/\(\d{4}\)/,"").replace("Download","Movie").replace("⚡","").trim(),link:a})}),n}catch(e){return[]}})};exports.getEpisodes=getEpisodes;