mirror of
https://github.com/vega-org/vega-providers.git
synced 2026-04-18 08:01:43 +00:00
fix: correct conditional check for cinemalux in getEpisodes function
This commit is contained in:
14
dist/cinemaLuxe/episodes.js
vendored
14
dist/cinemaLuxe/episodes.js
vendored
@@ -14,7 +14,7 @@ const getEpisodes = function (_a) {
|
|||||||
return __awaiter(this, arguments, void 0, function* ({ url, providerContext, }) {
|
return __awaiter(this, arguments, void 0, function* ({ url, providerContext, }) {
|
||||||
var _b;
|
var _b;
|
||||||
try {
|
try {
|
||||||
if (!url.includes("luxelinks") || url.includes("luxecinema")) {
|
if (!url.includes("luxelinks") || url.includes("cinemalux")) {
|
||||||
const res = yield providerContext.axios.get(url, {
|
const res = yield providerContext.axios.get(url, {
|
||||||
headers: providerContext.commonHeaders,
|
headers: providerContext.commonHeaders,
|
||||||
});
|
});
|
||||||
@@ -35,19 +35,19 @@ const getEpisodes = function (_a) {
|
|||||||
url = (redirectUrl === null || redirectUrl === void 0 ? void 0 : redirectUrl.redirectUrl) || url;
|
url = (redirectUrl === null || redirectUrl === void 0 ? void 0 : redirectUrl.redirectUrl) || url;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const res = yield providerContext.axios.get(url, {
|
|
||||||
headers: providerContext.commonHeaders,
|
|
||||||
});
|
|
||||||
const html = res.data;
|
|
||||||
let $ = providerContext.cheerio.load(html);
|
|
||||||
const episodeLinks = [];
|
const episodeLinks = [];
|
||||||
if (url.includes("luxedrive")) {
|
if (url.includes("luxedrive") || url.includes("drive.linkstore")) {
|
||||||
episodeLinks.push({
|
episodeLinks.push({
|
||||||
title: "Movie",
|
title: "Movie",
|
||||||
link: url,
|
link: url,
|
||||||
});
|
});
|
||||||
return episodeLinks;
|
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) => {
|
$("a.maxbutton-4,a.maxbutton,.maxbutton-hubcloud,.ep-simple-button").map((i, element) => {
|
||||||
var _a;
|
var _a;
|
||||||
const title = (_a = $(element).text()) === null || _a === void 0 ? void 0 : _a.trim();
|
const title = (_a = $(element).text()) === null || _a === void 0 ? void 0 : _a.trim();
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ export const getEpisodes = async function ({
|
|||||||
providerContext: ProviderContext;
|
providerContext: ProviderContext;
|
||||||
}): Promise<EpisodeLink[]> {
|
}): Promise<EpisodeLink[]> {
|
||||||
try {
|
try {
|
||||||
if (!url.includes("luxelinks") || url.includes("luxecinema")) {
|
if (!url.includes("luxelinks") || url.includes("cinemalux")) {
|
||||||
const res = await providerContext.axios.get(url, {
|
const res = await providerContext.axios.get(url, {
|
||||||
headers: providerContext.commonHeaders,
|
headers: providerContext.commonHeaders,
|
||||||
});
|
});
|
||||||
@@ -31,19 +31,21 @@ export const getEpisodes = async function ({
|
|||||||
url = redirectUrl?.redirectUrl || url;
|
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: EpisodeLink[] = [];
|
const episodeLinks: EpisodeLink[] = [];
|
||||||
if (url.includes("luxedrive")) {
|
|
||||||
|
if (url.includes("luxedrive") || url.includes("drive.linkstore")) {
|
||||||
episodeLinks.push({
|
episodeLinks.push({
|
||||||
title: "Movie",
|
title: "Movie",
|
||||||
link: url,
|
link: url,
|
||||||
});
|
});
|
||||||
return episodeLinks;
|
return episodeLinks;
|
||||||
}
|
}
|
||||||
|
const res = await 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(
|
$("a.maxbutton-4,a.maxbutton,.maxbutton-hubcloud,.ep-simple-button").map(
|
||||||
(i, element) => {
|
(i, element) => {
|
||||||
const title = $(element).text()?.trim();
|
const title = $(element).text()?.trim();
|
||||||
|
|||||||
Reference in New Issue
Block a user