mirror of
https://github.com/vega-org/vega-providers.git
synced 2026-04-17 15:41:45 +00:00
fix: update getMeta and getStream functions to improve link handling and extraction logic
This commit is contained in:
32
dist/cinemaLuxe/meta.js
vendored
32
dist/cinemaLuxe/meta.js
vendored
@@ -33,7 +33,9 @@ const getMeta = function (_a) {
|
||||
.toFixed(1)
|
||||
.toString();
|
||||
const links = [];
|
||||
$(".mb-center.maxbutton-5-center,.ep-button-container").map((i, element) => {
|
||||
$(".custom-links")
|
||||
.find(".ep-button-container")
|
||||
.map((i, element) => {
|
||||
var _a;
|
||||
const title = $(element)
|
||||
.text()
|
||||
@@ -49,6 +51,34 @@ const getMeta = function (_a) {
|
||||
});
|
||||
}
|
||||
});
|
||||
if (links.length === 0) {
|
||||
$(".ep-button-container:not(:has(a:contains('Click Here To Visit')))").map((i, element) => {
|
||||
var _a;
|
||||
let title = $(element)
|
||||
.find("a")
|
||||
.text()
|
||||
.replace("\u2b07Download", "")
|
||||
.replace("\u2b07 Download", "")
|
||||
.trim();
|
||||
if (title.includes("Download Now")) {
|
||||
title = $(element)
|
||||
.parent()
|
||||
.find("h3")
|
||||
.text()
|
||||
.trim()
|
||||
.replace("\u2b07Download", "")
|
||||
.replace("\u2b07 Download", "");
|
||||
}
|
||||
const link = $(element).find("a").attr("href");
|
||||
if (title && link) {
|
||||
links.push({
|
||||
title,
|
||||
episodesLink: link,
|
||||
quality: ((_a = title === null || title === void 0 ? void 0 : title.match(/\d+P\b/)) === null || _a === void 0 ? void 0 : _a[0].replace("P", "p")) || "",
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
return {
|
||||
title,
|
||||
tags,
|
||||
|
||||
36
dist/cinemaLuxe/stream.js
vendored
36
dist/cinemaLuxe/stream.js
vendored
@@ -14,8 +14,40 @@ const getStream = (_a) => __awaiter(void 0, [_a], void 0, function* ({ link, sig
|
||||
var _b;
|
||||
try {
|
||||
let newLink = link;
|
||||
console.log("getStream 1", link);
|
||||
if (link.includes("linkstore")) {
|
||||
console.log("linkstore detected");
|
||||
const res = yield fetch(link, {
|
||||
signal,
|
||||
headers: {
|
||||
accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
|
||||
"accept-language": "en-US,en;q=0.9,en-IN;q=0.8",
|
||||
"cache-control": "no-cache",
|
||||
pragma: "no-cache",
|
||||
priority: "u=0, i",
|
||||
"sec-ch-ua": '"Microsoft Edge";v="137", "Chromium";v="137", "Not/A)Brand";v="24"',
|
||||
"sec-ch-ua-mobile": "?0",
|
||||
"sec-ch-ua-platform": '"Windows"',
|
||||
"sec-fetch-dest": "document",
|
||||
"sec-fetch-mode": "navigate",
|
||||
"sec-fetch-site": "none",
|
||||
"sec-fetch-user": "?1",
|
||||
"upgrade-insecure-requests": "1",
|
||||
cookie: "PHPSESSID=9o57cff841dqtv8djtn1rp1712; ext_name=ojplmecpdpgccookcobabopnaifgidhf",
|
||||
},
|
||||
});
|
||||
const html = yield res.text();
|
||||
const refreshMetaMatch = html.match(/<meta\s+http-equiv="refresh"\s+content="[^"]*url=([^"]+)"/i);
|
||||
if (refreshMetaMatch && refreshMetaMatch[1]) {
|
||||
link = refreshMetaMatch[1];
|
||||
}
|
||||
}
|
||||
else {
|
||||
console.log("linkstore not detected");
|
||||
}
|
||||
console.log("getStream 2", link);
|
||||
if (link.includes("luxedrive")) {
|
||||
const res = yield providerContext.axios.get(link);
|
||||
const res = yield providerContext.axios.get(link, { signal });
|
||||
const $ = providerContext.cheerio.load(res.data);
|
||||
const hubcloudLink = $("a.btn.hubcloud").attr("href");
|
||||
if (hubcloudLink) {
|
||||
@@ -28,7 +60,7 @@ const getStream = (_a) => __awaiter(void 0, [_a], void 0, function* ({ link, sig
|
||||
}
|
||||
}
|
||||
}
|
||||
if (newLink.includes("gdflix")) {
|
||||
if (newLink.includes("flix")) {
|
||||
const sreams = yield providerContext.extractors.gdFlixExtracter(newLink, signal);
|
||||
return sreams;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user