mirror of
https://github.com/vega-org/vega-providers.git
synced 2026-04-17 15:41:45 +00:00
build
This commit is contained in:
22
dist/cinemaLuxe/catalog.js
vendored
Normal file
22
dist/cinemaLuxe/catalog.js
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.genres = exports.catalog = void 0;
|
||||
exports.catalog = [
|
||||
{
|
||||
title: "Trending",
|
||||
filter: "/genre/latest-trending-releases/",
|
||||
},
|
||||
{
|
||||
title: "Netflix",
|
||||
filter: "/network/netflix/",
|
||||
},
|
||||
{
|
||||
title: "Amazon Prime",
|
||||
filter: "/network/prime-video/",
|
||||
},
|
||||
{
|
||||
title: "Animation",
|
||||
filter: "/genre/anime/",
|
||||
},
|
||||
];
|
||||
exports.genres = [];
|
||||
64
dist/cinemaLuxe/episodes.js
vendored
Normal file
64
dist/cinemaLuxe/episodes.js
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
"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;
|
||||
64
dist/cinemaLuxe/meta.js
vendored
Normal file
64
dist/cinemaLuxe/meta.js
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getMeta = void 0;
|
||||
const getMeta = async function ({ link, providerContext, }) {
|
||||
try {
|
||||
const url = link;
|
||||
const res = await providerContext.axios.get(url, {
|
||||
headers: providerContext.commonHeaders,
|
||||
});
|
||||
const data = res.data;
|
||||
const $ = providerContext.cheerio.load(data);
|
||||
const type = url.includes("tvshows") ? "series" : "movie";
|
||||
const imdbId = "";
|
||||
const title = url.split("/")[4].replace(/-/g, " ");
|
||||
const image = $(".g-item").find("a").attr("href") || "";
|
||||
const synopsis = $(".wp-content").text().trim();
|
||||
const tags = $(".sgeneros")
|
||||
.children()
|
||||
.map((i, element) => $(element).text())
|
||||
.get()
|
||||
.slice(3);
|
||||
const rating = Number($("#repimdb").find("strong").text())
|
||||
.toFixed(1)
|
||||
.toString();
|
||||
const links = [];
|
||||
$(".mb-center.maxbutton-5-center,.ep-button-container").map((i, element) => {
|
||||
const title = $(element)
|
||||
.text()
|
||||
.replace("\u2b07Download", "")
|
||||
.replace("\u2b07 Download", "")
|
||||
.trim();
|
||||
const link = $(element).find("a").attr("href");
|
||||
if (title && link) {
|
||||
links.push({
|
||||
title,
|
||||
episodesLink: link,
|
||||
quality: title?.match(/\d+P\b/)?.[0].replace("P", "p") || "",
|
||||
});
|
||||
}
|
||||
});
|
||||
return {
|
||||
title,
|
||||
tags,
|
||||
rating,
|
||||
synopsis,
|
||||
image,
|
||||
imdbId,
|
||||
type,
|
||||
linkList: links,
|
||||
};
|
||||
}
|
||||
catch (err) {
|
||||
console.error(err);
|
||||
return {
|
||||
title: "",
|
||||
synopsis: "",
|
||||
image: "",
|
||||
imdbId: "",
|
||||
type: "movie",
|
||||
linkList: [],
|
||||
};
|
||||
}
|
||||
};
|
||||
exports.getMeta = getMeta;
|
||||
55
dist/cinemaLuxe/posts.js
vendored
Normal file
55
dist/cinemaLuxe/posts.js
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getSearchPosts = exports.getPosts = void 0;
|
||||
const getPosts = async function ({ filter, page, signal, providerContext, }) {
|
||||
const baseUrl = await providerContext.getBaseUrl("cinemaLuxe");
|
||||
const url = `${baseUrl + filter}page/${page}/`;
|
||||
return posts({ url, signal, providerContext });
|
||||
};
|
||||
exports.getPosts = getPosts;
|
||||
const getSearchPosts = async function ({ searchQuery, page, signal, providerContext, }) {
|
||||
const baseUrl = await providerContext.getBaseUrl("cinemaLuxe");
|
||||
const url = `${baseUrl}/page/${page}/?s=${searchQuery}`;
|
||||
return posts({ url, signal, providerContext });
|
||||
};
|
||||
exports.getSearchPosts = getSearchPosts;
|
||||
async function posts({ url, signal, providerContext, }) {
|
||||
try {
|
||||
const res = await fetch(url, {
|
||||
headers: providerContext.commonHeaders,
|
||||
signal,
|
||||
});
|
||||
const data = await res.text();
|
||||
const $ = providerContext.cheerio.load(data);
|
||||
const catalog = [];
|
||||
$(".item.tvshows,.item.movies").map((i, element) => {
|
||||
const title = $(element).find(".poster").find("img").attr("alt");
|
||||
const link = $(element).find(".poster").find("a").attr("href");
|
||||
const image = $(element).find(".poster").find("img").attr("data-src");
|
||||
if (title && link && image) {
|
||||
catalog.push({
|
||||
title: title,
|
||||
link: link,
|
||||
image: image,
|
||||
});
|
||||
}
|
||||
});
|
||||
$(".result-item").map((i, element) => {
|
||||
const title = $(element).find(".thumbnail").find("img").attr("alt");
|
||||
const link = $(element).find(".thumbnail").find("a").attr("href");
|
||||
const image = $(element).find(".thumbnail").find("img").attr("data-src");
|
||||
if (title && link && image) {
|
||||
catalog.push({
|
||||
title: title,
|
||||
link: link,
|
||||
image: image,
|
||||
});
|
||||
}
|
||||
});
|
||||
return catalog;
|
||||
}
|
||||
catch (err) {
|
||||
console.error("cinemaluxe error ", err);
|
||||
return [];
|
||||
}
|
||||
}
|
||||
36
dist/cinemaLuxe/stream.js
vendored
Normal file
36
dist/cinemaLuxe/stream.js
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getStream = void 0;
|
||||
const getStream = async ({ link, signal, providerContext, }) => {
|
||||
try {
|
||||
let newLink = link;
|
||||
if (link.includes("luxedrive")) {
|
||||
const res = await providerContext.axios.get(link);
|
||||
const $ = providerContext.cheerio.load(res.data);
|
||||
const hubcloudLink = $("a.btn.hubcloud").attr("href");
|
||||
if (hubcloudLink) {
|
||||
newLink = hubcloudLink;
|
||||
}
|
||||
else {
|
||||
const gdFlixLink = $("a.btn.gdflix").attr("href");
|
||||
if (gdFlixLink) {
|
||||
newLink = gdFlixLink;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (newLink.includes("gdflix")) {
|
||||
const sreams = await providerContext.extractors.gdFlixExtracter(newLink, signal);
|
||||
return sreams;
|
||||
}
|
||||
const res2 = await providerContext.axios.get(newLink, { signal });
|
||||
const data2 = res2.data;
|
||||
const hcLink = data2.match(/location\.replace\('([^']+)'/)?.[1] || newLink;
|
||||
const hubCloudLinks = await providerContext.extractors.hubcloudExtracter(hcLink.includes("https://hubcloud") ? hcLink : newLink, signal);
|
||||
return hubCloudLinks;
|
||||
}
|
||||
catch (err) {
|
||||
console.error(err);
|
||||
return [];
|
||||
}
|
||||
};
|
||||
exports.getStream = getStream;
|
||||
Reference in New Issue
Block a user