This commit is contained in:
himanshu8443
2025-06-18 11:42:29 +05:30
parent 490a4bd71d
commit 9621597865
100 changed files with 6898 additions and 5740 deletions

View File

@@ -1,40 +1,52 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getMeta = void 0; exports.getMeta = void 0;
const getMeta = async function ({ link, providerContext, }) { const getMeta = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ link, providerContext, }) {
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
const axios = providerContext.axios; const axios = providerContext.axios;
try { try {
console.log("all", link); console.log("all", link);
const res = await axios.get(link); const res = yield axios.get(link);
const data = res.data; const data = res.data;
const meta = { const meta = {
title: "", title: "",
synopsis: "", synopsis: "",
image: "", image: "",
imdbId: data?.meta?.imdb_id || "", imdbId: ((_b = data === null || data === void 0 ? void 0 : data.meta) === null || _b === void 0 ? void 0 : _b.imdb_id) || "",
type: data?.meta?.type || "movie", type: ((_c = data === null || data === void 0 ? void 0 : data.meta) === null || _c === void 0 ? void 0 : _c.type) || "movie",
}; };
const links = []; const links = [];
let directLinks = []; let directLinks = [];
let season = new Map(); let season = new Map();
if (meta.type === "series") { if (meta.type === "series") {
data?.meta?.videos?.map((video) => { (_e = (_d = data === null || data === void 0 ? void 0 : data.meta) === null || _d === void 0 ? void 0 : _d.videos) === null || _e === void 0 ? void 0 : _e.map((video) => {
if (video?.season <= 0) var _a, _b, _c, _d, _e, _f, _g, _h;
if ((video === null || video === void 0 ? void 0 : video.season) <= 0)
return; return;
if (!season.has(video?.season)) { if (!season.has(video === null || video === void 0 ? void 0 : video.season)) {
season.set(video?.season, []); season.set(video === null || video === void 0 ? void 0 : video.season, []);
} }
season.get(video?.season).push({ season.get(video === null || video === void 0 ? void 0 : video.season).push({
title: "Episode " + video?.episode, title: "Episode " + (video === null || video === void 0 ? void 0 : video.episode),
type: "series", type: "series",
link: JSON.stringify({ link: JSON.stringify({
title: data?.meta?.name, title: (_a = data === null || data === void 0 ? void 0 : data.meta) === null || _a === void 0 ? void 0 : _a.name,
imdbId: data?.meta?.imdb_id, imdbId: (_b = data === null || data === void 0 ? void 0 : data.meta) === null || _b === void 0 ? void 0 : _b.imdb_id,
season: video?.id?.split(":")[1], season: (_c = video === null || video === void 0 ? void 0 : video.id) === null || _c === void 0 ? void 0 : _c.split(":")[1],
episode: video?.id?.split(":")[2], episode: (_d = video === null || video === void 0 ? void 0 : video.id) === null || _d === void 0 ? void 0 : _d.split(":")[2],
type: data?.meta?.type, type: (_e = data === null || data === void 0 ? void 0 : data.meta) === null || _e === void 0 ? void 0 : _e.type,
tmdbId: data?.meta?.moviedb_id?.toString() || "", tmdbId: ((_g = (_f = data === null || data === void 0 ? void 0 : data.meta) === null || _f === void 0 ? void 0 : _f.moviedb_id) === null || _g === void 0 ? void 0 : _g.toString()) || "",
year: data?.meta?.year, year: (_h = data === null || data === void 0 ? void 0 : data.meta) === null || _h === void 0 ? void 0 : _h.year,
}), }),
}); });
}); });
@@ -51,28 +63,25 @@ const getMeta = async function ({ link, providerContext, }) {
else { else {
console.log("all meta Mv🔥🔥", meta); console.log("all meta Mv🔥🔥", meta);
links.push({ links.push({
title: data?.meta?.name, title: (_f = data === null || data === void 0 ? void 0 : data.meta) === null || _f === void 0 ? void 0 : _f.name,
directLinks: [ directLinks: [
{ {
title: "Movie", title: "Movie",
type: "movie", type: "movie",
link: JSON.stringify({ link: JSON.stringify({
title: data?.meta?.name, title: (_g = data === null || data === void 0 ? void 0 : data.meta) === null || _g === void 0 ? void 0 : _g.name,
imdbId: data?.meta?.imdb_id, imdbId: (_h = data === null || data === void 0 ? void 0 : data.meta) === null || _h === void 0 ? void 0 : _h.imdb_id,
season: "", season: "",
episode: "", episode: "",
type: data?.meta?.type, type: (_j = data === null || data === void 0 ? void 0 : data.meta) === null || _j === void 0 ? void 0 : _j.type,
tmdbId: data?.meta?.moviedb_id?.toString() || "", tmdbId: ((_l = (_k = data === null || data === void 0 ? void 0 : data.meta) === null || _k === void 0 ? void 0 : _k.moviedb_id) === null || _l === void 0 ? void 0 : _l.toString()) || "",
year: data?.meta?.year, year: (_m = data === null || data === void 0 ? void 0 : data.meta) === null || _m === void 0 ? void 0 : _m.year,
}), }),
}, },
], ],
}); });
} }
return { return Object.assign(Object.assign({}, meta), { linkList: links });
...meta,
linkList: links,
};
} }
catch (err) { catch (err) {
console.error(err); console.error(err);
@@ -85,5 +94,6 @@ const getMeta = async function ({ link, providerContext, }) {
linkList: [], linkList: [],
}; };
} }
});
}; };
exports.getMeta = getMeta; exports.getMeta = getMeta;

View File

@@ -1,21 +1,31 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getSearchPosts = exports.getPosts = void 0; exports.getSearchPosts = exports.getPosts = void 0;
const getPosts = async function ({ filter, signal, providerContext, }) { const getPosts = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ filter, signal, providerContext, }) {
try { try {
const catalog = []; const catalog = [];
const url = "https://cinemeta-catalogs.strem.io" + filter; const url = "https://cinemeta-catalogs.strem.io" + filter;
console.log("allGetPostUrl", url); console.log("allGetPostUrl", url);
const res = await providerContext.axios.get(url, { const res = yield providerContext.axios.get(url, {
headers: providerContext.commonHeaders, headers: providerContext.commonHeaders,
signal, signal,
}); });
const data = res.data; const data = res.data;
data?.metas.map((result) => { data === null || data === void 0 ? void 0 : data.metas.map((result) => {
const title = result?.name; const title = result === null || result === void 0 ? void 0 : result.name;
const id = result?.imdb_id || result?.id; const id = (result === null || result === void 0 ? void 0 : result.imdb_id) || (result === null || result === void 0 ? void 0 : result.id);
const type = result?.type; const type = result === null || result === void 0 ? void 0 : result.type;
const image = result?.poster; const image = result === null || result === void 0 ? void 0 : result.poster;
if (id) { if (id) {
catalog.push({ catalog.push({
title: title, title: title,
@@ -31,11 +41,13 @@ const getPosts = async function ({ filter, signal, providerContext, }) {
console.error("AutoEmbed error ", err); console.error("AutoEmbed error ", err);
return []; return [];
} }
});
}; };
exports.getPosts = getPosts; exports.getPosts = getPosts;
const getSearchPosts = async function ({ searchQuery, page, const getSearchPosts = function (_a) {
// providerValue, return __awaiter(this, arguments, void 0, function* ({ searchQuery, page,
signal, providerContext, }) { // providerValue,
signal, providerContext, }) {
try { try {
if (page > 1) { if (page > 1) {
return []; return [];
@@ -43,16 +55,16 @@ signal, providerContext, }) {
const catalog = []; const catalog = [];
const url1 = `https://v3-cinemeta.strem.io/catalog/series/top/search=${encodeURI(searchQuery)}.json`; const url1 = `https://v3-cinemeta.strem.io/catalog/series/top/search=${encodeURI(searchQuery)}.json`;
const url2 = `https://v3-cinemeta.strem.io/catalog/movie/top/search=${encodeURI(searchQuery)}.json`; const url2 = `https://v3-cinemeta.strem.io/catalog/movie/top/search=${encodeURI(searchQuery)}.json`;
const res = await providerContext.axios.get(url1, { const res = yield providerContext.axios.get(url1, {
headers: providerContext.commonHeaders, headers: providerContext.commonHeaders,
signal, signal,
}); });
const data = res.data; const data = res.data;
data?.metas.map((result) => { data === null || data === void 0 ? void 0 : data.metas.map((result) => {
const title = result.name || ""; const title = result.name || "";
const id = result?.imdb_id || result?.id; const id = (result === null || result === void 0 ? void 0 : result.imdb_id) || (result === null || result === void 0 ? void 0 : result.id);
const image = result?.poster; const image = result === null || result === void 0 ? void 0 : result.poster;
const type = result?.type; const type = result === null || result === void 0 ? void 0 : result.type;
if (id) { if (id) {
catalog.push({ catalog.push({
title: title, title: title,
@@ -61,16 +73,16 @@ signal, providerContext, }) {
}); });
} }
}); });
const res2 = await providerContext.axios.get(url2, { const res2 = yield providerContext.axios.get(url2, {
headers: providerContext.commonHeaders, headers: providerContext.commonHeaders,
signal, signal,
}); });
const data2 = res2.data; const data2 = res2.data;
data2?.metas.map((result) => { data2 === null || data2 === void 0 ? void 0 : data2.metas.map((result) => {
const title = result?.name || ""; const title = (result === null || result === void 0 ? void 0 : result.name) || "";
const id = result?.imdb_id || result?.id; const id = (result === null || result === void 0 ? void 0 : result.imdb_id) || (result === null || result === void 0 ? void 0 : result.id);
const image = result?.poster; const image = result === null || result === void 0 ? void 0 : result.poster;
const type = result?.type; const type = result === null || result === void 0 ? void 0 : result.type;
if (id) { if (id) {
catalog.push({ catalog.push({
title: title, title: title,
@@ -85,5 +97,6 @@ signal, providerContext, }) {
console.error("AutoEmbed error ", err); console.error("AutoEmbed error ", err);
return []; return [];
} }
});
}; };
exports.getSearchPosts = getSearchPosts; exports.getSearchPosts = getSearchPosts;

View File

@@ -1,22 +1,32 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getStream = void 0; exports.getStream = void 0;
exports.getRiveStream = getRiveStream; exports.getRiveStream = getRiveStream;
const types_1 = require("../types"); const types_1 = require("../types");
const getStream = async ({ link: id, type, providerContext, }) => { const getStream = (_a) => __awaiter(void 0, [_a], void 0, function* ({ link: id, type, providerContext, }) {
try { try {
const streams = []; const streams = [];
const { imdbId, season, episode, title, tmdbId, year } = JSON.parse(id); const { imdbId, season, episode, title, tmdbId, year } = JSON.parse(id);
await getRiveStream(tmdbId, episode, season, type, streams, providerContext); yield getRiveStream(tmdbId, episode, season, type, streams, providerContext);
return streams; return streams;
} }
catch (err) { catch (err) {
console.error(err); console.error(err);
return []; return [];
} }
}; });
exports.getStream = getStream; exports.getStream = getStream;
async function getRiveStream(tmdId, episode, season, type, Streams, providerContext) { function getRiveStream(tmdId, episode, season, type, Streams, providerContext) {
return __awaiter(this, void 0, void 0, function* () {
const secret = generateSecretKey(Number(tmdId)); const secret = generateSecretKey(Number(tmdId));
const servers = [ const servers = [
"flowcast", "flowcast",
@@ -43,7 +53,7 @@ async function getRiveStream(tmdId, episode, season, type, Streams, providerCont
"ophim", "ophim",
"kage", "kage",
]; ];
const baseUrl = await providerContext.getBaseUrl("rive"); const baseUrl = yield providerContext.getBaseUrl("rive");
const cors = process.env.CORS_PRXY ? process.env.CORS_PRXY + "?url=" : ""; const cors = process.env.CORS_PRXY ? process.env.CORS_PRXY + "?url=" : "";
console.log("CORS: " + cors); console.log("CORS: " + cors);
const route = type === "series" const route = type === "series"
@@ -52,32 +62,34 @@ async function getRiveStream(tmdId, episode, season, type, Streams, providerCont
const url = cors const url = cors
? cors + encodeURIComponent(baseUrl + route) ? cors + encodeURIComponent(baseUrl + route)
: baseUrl + route; : baseUrl + route;
await Promise.all(servers.map(async (server) => { yield Promise.all(servers.map((server) => __awaiter(this, void 0, void 0, function* () {
var _a, _b, _c, _d, _e, _f;
console.log("Rive: " + url + server); console.log("Rive: " + url + server);
try { try {
const res = await providerContext.axios.get(url + server, { const res = yield providerContext.axios.get(url + server, {
timeout: 4000, timeout: 4000,
headers: providerContext.commonHeaders, headers: providerContext.commonHeaders,
}); });
const subtitles = []; const subtitles = [];
if (res.data?.data?.captions) { if ((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.captions) {
res.data?.data?.captions.forEach((sub) => { (_d = (_c = res.data) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.captions.forEach((sub) => {
var _a, _b;
subtitles.push({ subtitles.push({
language: sub?.label?.slice(0, 2) || "Und", language: ((_a = sub === null || sub === void 0 ? void 0 : sub.label) === null || _a === void 0 ? void 0 : _a.slice(0, 2)) || "Und",
uri: sub?.file, uri: sub === null || sub === void 0 ? void 0 : sub.file,
title: sub?.label || "Undefined", title: (sub === null || sub === void 0 ? void 0 : sub.label) || "Undefined",
type: sub?.file?.endsWith(".vtt") type: ((_b = sub === null || sub === void 0 ? void 0 : sub.file) === null || _b === void 0 ? void 0 : _b.endsWith(".vtt"))
? types_1.TextTrackType.VTT ? types_1.TextTrackType.VTT
: types_1.TextTrackType.SUBRIP, : types_1.TextTrackType.SUBRIP,
}); });
}); });
} }
res.data?.data?.sources.forEach((source) => { (_f = (_e = res.data) === null || _e === void 0 ? void 0 : _e.data) === null || _f === void 0 ? void 0 : _f.sources.forEach((source) => {
Streams.push({ Streams.push({
server: source?.source + "-" + source?.quality, server: (source === null || source === void 0 ? void 0 : source.source) + "-" + (source === null || source === void 0 ? void 0 : source.quality),
link: source?.url, link: source === null || source === void 0 ? void 0 : source.url,
type: source?.format === "hls" ? "m3u8" : "mp4", type: (source === null || source === void 0 ? void 0 : source.format) === "hls" ? "m3u8" : "mp4",
quality: source?.quality, quality: source === null || source === void 0 ? void 0 : source.quality,
subtitles: subtitles, subtitles: subtitles,
}); });
}); });
@@ -85,7 +97,8 @@ async function getRiveStream(tmdId, episode, season, type, Streams, providerCont
catch (e) { catch (e) {
console.log(e); console.log(e);
} }
})); })));
});
} }
function generateSecretKey(id) { function generateSecretKey(id) {
// Array of secret key fragments - updated array from the new implementation // Array of secret key fragments - updated array from the new implementation

View File

@@ -1,30 +1,41 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getEpisodes = void 0; exports.getEpisodes = void 0;
const getEpisodes = async function ({ url, providerContext, }) { const getEpisodes = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ url, providerContext, }) {
var _b;
try { try {
if (!url.includes("luxelinks") || url.includes("luxecinema")) { if (!url.includes("luxelinks") || url.includes("luxecinema")) {
const res = await providerContext.axios.get(url, { const res = yield providerContext.axios.get(url, {
headers: providerContext.commonHeaders, headers: providerContext.commonHeaders,
}); });
const data = res.data; const data = res.data;
const encodedLink = data.match(/"link":"([^"]+)"/)?.[1]; const encodedLink = (_b = data.match(/"link":"([^"]+)"/)) === null || _b === void 0 ? void 0 : _b[1];
if (encodedLink) { if (encodedLink) {
url = encodedLink ? atob(encodedLink) : url; url = encodedLink ? atob(encodedLink) : url;
} }
else { else {
const redirectUrlRes = await fetch("https://ext.8man.me/api/cinemaluxe", { const redirectUrlRes = yield fetch("https://ext.8man.me/api/cinemaluxe", {
method: "POST", method: "POST",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
body: JSON.stringify({ url }), body: JSON.stringify({ url }),
}); });
const redirectUrl = await redirectUrlRes.json(); const redirectUrl = yield redirectUrlRes.json();
url = redirectUrl?.redirectUrl || url; url = (redirectUrl === null || redirectUrl === void 0 ? void 0 : redirectUrl.redirectUrl) || url;
} }
} }
const res = await providerContext.axios.get(url, { const res = yield providerContext.axios.get(url, {
headers: providerContext.commonHeaders, headers: providerContext.commonHeaders,
}); });
const html = res.data; const html = res.data;
@@ -38,7 +49,8 @@ const getEpisodes = async function ({ url, providerContext, }) {
return episodeLinks; return episodeLinks;
} }
$("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) => {
const title = $(element).text()?.trim(); var _a;
const title = (_a = $(element).text()) === null || _a === void 0 ? void 0 : _a.trim();
const link = $(element).attr("href"); const link = $(element).attr("href");
if (title && if (title &&
link && link &&
@@ -60,5 +72,6 @@ const getEpisodes = async function ({ url, providerContext, }) {
console.error("cl episode links", err); console.error("cl episode links", err);
return []; return [];
} }
});
}; };
exports.getEpisodes = getEpisodes; exports.getEpisodes = getEpisodes;

View File

@@ -1,10 +1,20 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getMeta = void 0; exports.getMeta = void 0;
const getMeta = async function ({ link, providerContext, }) { const getMeta = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ link, providerContext, }) {
try { try {
const url = link; const url = link;
const res = await providerContext.axios.get(url, { const res = yield providerContext.axios.get(url, {
headers: providerContext.commonHeaders, headers: providerContext.commonHeaders,
}); });
const data = res.data; const data = res.data;
@@ -24,6 +34,7 @@ const getMeta = async function ({ link, providerContext, }) {
.toString(); .toString();
const links = []; const links = [];
$(".mb-center.maxbutton-5-center,.ep-button-container").map((i, element) => { $(".mb-center.maxbutton-5-center,.ep-button-container").map((i, element) => {
var _a;
const title = $(element) const title = $(element)
.text() .text()
.replace("\u2b07Download", "") .replace("\u2b07Download", "")
@@ -34,7 +45,7 @@ const getMeta = async function ({ link, providerContext, }) {
links.push({ links.push({
title, title,
episodesLink: link, episodesLink: link,
quality: title?.match(/\d+P\b/)?.[0].replace("P", "p") || "", 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")) || "",
}); });
} }
}); });
@@ -60,5 +71,6 @@ const getMeta = async function ({ link, providerContext, }) {
linkList: [], linkList: [],
}; };
} }
});
}; };
exports.getMeta = getMeta; exports.getMeta = getMeta;

View File

@@ -1,25 +1,39 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getSearchPosts = exports.getPosts = void 0; exports.getSearchPosts = exports.getPosts = void 0;
const getPosts = async function ({ filter, page, signal, providerContext, }) { const getPosts = function (_a) {
const baseUrl = await providerContext.getBaseUrl("cinemaLuxe"); return __awaiter(this, arguments, void 0, function* ({ filter, page, signal, providerContext, }) {
const baseUrl = yield providerContext.getBaseUrl("cinemaLuxe");
const url = `${baseUrl + filter}page/${page}/`; const url = `${baseUrl + filter}page/${page}/`;
return posts({ url, signal, providerContext }); return posts({ url, signal, providerContext });
});
}; };
exports.getPosts = getPosts; exports.getPosts = getPosts;
const getSearchPosts = async function ({ searchQuery, page, signal, providerContext, }) { const getSearchPosts = function (_a) {
const baseUrl = await providerContext.getBaseUrl("cinemaLuxe"); return __awaiter(this, arguments, void 0, function* ({ searchQuery, page, signal, providerContext, }) {
const baseUrl = yield providerContext.getBaseUrl("cinemaLuxe");
const url = `${baseUrl}/page/${page}/?s=${searchQuery}`; const url = `${baseUrl}/page/${page}/?s=${searchQuery}`;
return posts({ url, signal, providerContext }); return posts({ url, signal, providerContext });
});
}; };
exports.getSearchPosts = getSearchPosts; exports.getSearchPosts = getSearchPosts;
async function posts({ url, signal, providerContext, }) { function posts(_a) {
return __awaiter(this, arguments, void 0, function* ({ url, signal, providerContext, }) {
try { try {
const res = await fetch(url, { const res = yield fetch(url, {
headers: providerContext.commonHeaders, headers: providerContext.commonHeaders,
signal, signal,
}); });
const data = await res.text(); const data = yield res.text();
const $ = providerContext.cheerio.load(data); const $ = providerContext.cheerio.load(data);
const catalog = []; const catalog = [];
$(".item.tvshows,.item.movies").map((i, element) => { $(".item.tvshows,.item.movies").map((i, element) => {
@@ -52,4 +66,5 @@ async function posts({ url, signal, providerContext, }) {
console.error("cinemaluxe error ", err); console.error("cinemaluxe error ", err);
return []; return [];
} }
});
} }

View File

@@ -1,11 +1,21 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getStream = void 0; exports.getStream = void 0;
const getStream = async ({ link, signal, providerContext, }) => { const getStream = (_a) => __awaiter(void 0, [_a], void 0, function* ({ link, signal, providerContext, }) {
var _b;
try { try {
let newLink = link; let newLink = link;
if (link.includes("luxedrive")) { if (link.includes("luxedrive")) {
const res = await providerContext.axios.get(link); const res = yield providerContext.axios.get(link);
const $ = providerContext.cheerio.load(res.data); const $ = providerContext.cheerio.load(res.data);
const hubcloudLink = $("a.btn.hubcloud").attr("href"); const hubcloudLink = $("a.btn.hubcloud").attr("href");
if (hubcloudLink) { if (hubcloudLink) {
@@ -19,18 +29,18 @@ const getStream = async ({ link, signal, providerContext, }) => {
} }
} }
if (newLink.includes("gdflix")) { if (newLink.includes("gdflix")) {
const sreams = await providerContext.extractors.gdFlixExtracter(newLink, signal); const sreams = yield providerContext.extractors.gdFlixExtracter(newLink, signal);
return sreams; return sreams;
} }
const res2 = await providerContext.axios.get(newLink, { signal }); const res2 = yield providerContext.axios.get(newLink, { signal });
const data2 = res2.data; const data2 = res2.data;
const hcLink = data2.match(/location\.replace\('([^']+)'/)?.[1] || newLink; const hcLink = ((_b = data2.match(/location\.replace\('([^']+)'/)) === null || _b === void 0 ? void 0 : _b[1]) || newLink;
const hubCloudLinks = await providerContext.extractors.hubcloudExtracter(hcLink.includes("https://hubcloud") ? hcLink : newLink, signal); const hubCloudLinks = yield providerContext.extractors.hubcloudExtracter(hcLink.includes("https://hubcloud") ? hcLink : newLink, signal);
return hubCloudLinks; return hubCloudLinks;
} }
catch (err) { catch (err) {
console.error(err); console.error(err);
return []; return [];
} }
}; });
exports.getStream = getStream; exports.getStream = getStream;

59
dist/dooflix/meta.js vendored
View File

@@ -1,4 +1,13 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getMeta = void 0; exports.getMeta = void 0;
const headers = { const headers = {
@@ -8,31 +17,34 @@ const headers = {
"If-Modified-Since": "Wed, 14 Aug 2024 13:00:04 GMT", "If-Modified-Since": "Wed, 14 Aug 2024 13:00:04 GMT",
"User-Agent": "okhttp/3.14.9", "User-Agent": "okhttp/3.14.9",
}; };
const getMeta = async function ({ link, providerContext, }) { const getMeta = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ link, providerContext, }) {
var _b, _c, _d, _e;
try { try {
const { axios } = providerContext; const { axios } = providerContext;
const res = await axios.get(link, { headers }); const res = yield axios.get(link, { headers });
const resData = res.data; const resData = res.data;
const jsonStart = resData?.indexOf("{"); const jsonStart = resData === null || resData === void 0 ? void 0 : resData.indexOf("{");
const jsonEnd = resData?.lastIndexOf("}") + 1; const jsonEnd = (resData === null || resData === void 0 ? void 0 : resData.lastIndexOf("}")) + 1;
const data = JSON?.parse(resData?.substring(jsonStart, jsonEnd))?.title const data = ((_b = JSON === null || JSON === void 0 ? void 0 : JSON.parse(resData === null || resData === void 0 ? void 0 : resData.substring(jsonStart, jsonEnd))) === null || _b === void 0 ? void 0 : _b.title)
? JSON?.parse(resData?.substring(jsonStart, jsonEnd)) ? JSON === null || JSON === void 0 ? void 0 : JSON.parse(resData === null || resData === void 0 ? void 0 : resData.substring(jsonStart, jsonEnd))
: resData; : resData;
const title = data?.title || ""; const title = (data === null || data === void 0 ? void 0 : data.title) || "";
const synopsis = data?.description || ""; const synopsis = (data === null || data === void 0 ? void 0 : data.description) || "";
const image = data?.poster_url || ""; const image = (data === null || data === void 0 ? void 0 : data.poster_url) || "";
const cast = data?.cast || []; const cast = (data === null || data === void 0 ? void 0 : data.cast) || [];
const rating = data?.imdb_rating || ""; const rating = (data === null || data === void 0 ? void 0 : data.imdb_rating) || "";
const type = Number(data?.is_tvseries) ? "series" : "movie"; const type = Number(data === null || data === void 0 ? void 0 : data.is_tvseries) ? "series" : "movie";
const tags = data?.genre?.map((genre) => genre?.name) || []; const tags = ((_c = data === null || data === void 0 ? void 0 : data.genre) === null || _c === void 0 ? void 0 : _c.map((genre) => genre === null || genre === void 0 ? void 0 : genre.name)) || [];
const links = []; const links = [];
if (type === "series") { if (type === "series") {
data?.season?.map((season) => { (_d = data === null || data === void 0 ? void 0 : data.season) === null || _d === void 0 ? void 0 : _d.map((season) => {
const title = season?.seasons_name || ""; var _a;
const directLinks = season?.episodes?.map((episode) => ({ const title = (season === null || season === void 0 ? void 0 : season.seasons_name) || "";
title: episode?.episodes_name, const directLinks = ((_a = season === null || season === void 0 ? void 0 : season.episodes) === null || _a === void 0 ? void 0 : _a.map((episode) => ({
link: episode?.file_url, title: episode === null || episode === void 0 ? void 0 : episode.episodes_name,
})) || []; link: episode === null || episode === void 0 ? void 0 : episode.file_url,
}))) || [];
links.push({ links.push({
title: title, title: title,
directLinks: directLinks, directLinks: directLinks,
@@ -40,20 +52,20 @@ const getMeta = async function ({ link, providerContext, }) {
}); });
} }
else { else {
data?.videos?.map((video) => { (_e = data === null || data === void 0 ? void 0 : data.videos) === null || _e === void 0 ? void 0 : _e.map((video) => {
links.push({ links.push({
title: title + " " + video?.label, title: title + " " + (video === null || video === void 0 ? void 0 : video.label),
directLinks: [ directLinks: [
{ {
title: "Play", title: "Play",
link: video?.file_url, link: video === null || video === void 0 ? void 0 : video.file_url,
}, },
], ],
}); });
}); });
} }
return { return {
image: image?.includes("https") ? image : image?.replace("http", "https"), image: (image === null || image === void 0 ? void 0 : image.includes("https")) ? image : image === null || image === void 0 ? void 0 : image.replace("http", "https"),
synopsis: synopsis, synopsis: synopsis,
title: title, title: title,
rating: rating, rating: rating,
@@ -75,5 +87,6 @@ const getMeta = async function ({ link, providerContext, }) {
linkList: [], linkList: [],
}; };
} }
});
}; };
exports.getMeta = getMeta; exports.getMeta = getMeta;

64
dist/dooflix/posts.js vendored
View File

@@ -1,4 +1,13 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getSearchPosts = exports.getPosts = void 0; exports.getSearchPosts = exports.getPosts = void 0;
const headers = { const headers = {
@@ -8,13 +17,14 @@ const headers = {
"If-Modified-Since": "Wed, 14 Aug 2024 13:00:04 GMT", "If-Modified-Since": "Wed, 14 Aug 2024 13:00:04 GMT",
"User-Agent": "okhttp/3.14.9", "User-Agent": "okhttp/3.14.9",
}; };
const getPosts = async function ({ filter, page, signal, providerContext, }) { const getPosts = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ filter, page, signal, providerContext, }) {
try { try {
const { axios, getBaseUrl } = providerContext; const { axios, getBaseUrl } = providerContext;
const baseUrl = await getBaseUrl("dooflix"); const baseUrl = yield getBaseUrl("dooflix");
const catalog = []; const catalog = [];
const url = `${baseUrl + filter + `?page=${page}`}`; const url = `${baseUrl + filter + `?page=${page}`}`;
const res = await axios.get(url, { headers, signal }); const res = yield axios.get(url, { headers, signal });
const resData = res.data; const resData = res.data;
if (!resData || typeof resData !== "string") { if (!resData || typeof resData !== "string") {
console.warn("Unexpected response format from dooflix API"); console.warn("Unexpected response format from dooflix API");
@@ -43,17 +53,17 @@ const getPosts = async function ({ filter, page, signal, providerContext, }) {
return []; return [];
} }
data.forEach((result) => { data.forEach((result) => {
const id = result?.videos_id; const id = result === null || result === void 0 ? void 0 : result.videos_id;
if (!id) if (!id)
return; return;
const type = !result?.is_tvseries ? "tvseries" : "movie"; const type = !(result === null || result === void 0 ? void 0 : result.is_tvseries) ? "tvseries" : "movie";
const link = `${baseUrl}/rest-api//v130/single_details?type=${type}&id=${id}`; const link = `${baseUrl}/rest-api//v130/single_details?type=${type}&id=${id}`;
const thumbnailUrl = result?.thumbnail_url; const thumbnailUrl = result === null || result === void 0 ? void 0 : result.thumbnail_url;
const image = thumbnailUrl?.includes("https") const image = (thumbnailUrl === null || thumbnailUrl === void 0 ? void 0 : thumbnailUrl.includes("https"))
? thumbnailUrl ? thumbnailUrl
: thumbnailUrl?.replace("http", "https"); : thumbnailUrl === null || thumbnailUrl === void 0 ? void 0 : thumbnailUrl.replace("http", "https");
catalog.push({ catalog.push({
title: result?.title || "", title: (result === null || result === void 0 ? void 0 : result.title) || "",
link, link,
image, image,
}); });
@@ -64,18 +74,21 @@ const getPosts = async function ({ filter, page, signal, providerContext, }) {
console.error("dooflix error:", err); console.error("dooflix error:", err);
return []; return [];
} }
});
}; };
exports.getPosts = getPosts; exports.getPosts = getPosts;
const getSearchPosts = async function ({ searchQuery, page, providerContext, signal, }) { const getSearchPosts = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ searchQuery, page, providerContext, signal, }) {
var _b, _c;
try { try {
if (page > 1) { if (page > 1) {
return []; return [];
} }
const { axios, getBaseUrl } = providerContext; const { axios, getBaseUrl } = providerContext;
const catalog = []; const catalog = [];
const baseUrl = await getBaseUrl("dooflix"); const baseUrl = yield getBaseUrl("dooflix");
const url = `${baseUrl}/rest-api//v130/search?q=${searchQuery}&type=movietvserieslive&range_to=0&range_from=0&tv_category_id=0&genre_id=0&country_id=0`; const url = `${baseUrl}/rest-api//v130/search?q=${searchQuery}&type=movietvserieslive&range_to=0&range_from=0&tv_category_id=0&genre_id=0&country_id=0`;
const res = await axios.get(url, { headers, signal }); const res = yield axios.get(url, { headers, signal });
const resData = res.data; const resData = res.data;
if (!resData || typeof resData !== "string") { if (!resData || typeof resData !== "string") {
console.warn("Unexpected search response format from dooflix API"); console.warn("Unexpected search response format from dooflix API");
@@ -91,7 +104,7 @@ const getSearchPosts = async function ({ searchQuery, page, providerContext, sig
else { else {
const jsonSubstring = resData.substring(jsonStart, jsonEnd); const jsonSubstring = resData.substring(jsonStart, jsonEnd);
const parsedData = JSON.parse(jsonSubstring); const parsedData = JSON.parse(jsonSubstring);
data = parsedData?.movie ? parsedData : resData; data = (parsedData === null || parsedData === void 0 ? void 0 : parsedData.movie) ? parsedData : resData;
} }
} }
catch (parseError) { catch (parseError) {
@@ -99,33 +112,33 @@ const getSearchPosts = async function ({ searchQuery, page, providerContext, sig
return []; return [];
} }
// Process movies // Process movies
data?.movie?.forEach((result) => { (_b = data === null || data === void 0 ? void 0 : data.movie) === null || _b === void 0 ? void 0 : _b.forEach((result) => {
const id = result?.videos_id; const id = result === null || result === void 0 ? void 0 : result.videos_id;
if (!id) if (!id)
return; return;
const link = `${baseUrl}/rest-api//v130/single_details?type=movie&id=${id}`; const link = `${baseUrl}/rest-api//v130/single_details?type=movie&id=${id}`;
const thumbnailUrl = result?.thumbnail_url; const thumbnailUrl = result === null || result === void 0 ? void 0 : result.thumbnail_url;
const image = thumbnailUrl?.includes("https") const image = (thumbnailUrl === null || thumbnailUrl === void 0 ? void 0 : thumbnailUrl.includes("https"))
? thumbnailUrl ? thumbnailUrl
: thumbnailUrl?.replace("http", "https"); : thumbnailUrl === null || thumbnailUrl === void 0 ? void 0 : thumbnailUrl.replace("http", "https");
catalog.push({ catalog.push({
title: result?.title || "", title: (result === null || result === void 0 ? void 0 : result.title) || "",
link, link,
image, image,
}); });
}); });
// Process TV series // Process TV series
data?.tvseries?.forEach((result) => { (_c = data === null || data === void 0 ? void 0 : data.tvseries) === null || _c === void 0 ? void 0 : _c.forEach((result) => {
const id = result?.videos_id; const id = result === null || result === void 0 ? void 0 : result.videos_id;
if (!id) if (!id)
return; return;
const link = `${baseUrl}/rest-api//v130/single_details?type=tvseries&id=${id}`; const link = `${baseUrl}/rest-api//v130/single_details?type=tvseries&id=${id}`;
const thumbnailUrl = result?.thumbnail_url; const thumbnailUrl = result === null || result === void 0 ? void 0 : result.thumbnail_url;
const image = thumbnailUrl?.includes("https") const image = (thumbnailUrl === null || thumbnailUrl === void 0 ? void 0 : thumbnailUrl.includes("https"))
? thumbnailUrl ? thumbnailUrl
: thumbnailUrl?.replace("http", "https"); : thumbnailUrl === null || thumbnailUrl === void 0 ? void 0 : thumbnailUrl.replace("http", "https");
catalog.push({ catalog.push({
title: result?.title || "", title: (result === null || result === void 0 ? void 0 : result.title) || "",
link, link,
image, image,
}); });
@@ -136,5 +149,6 @@ const getSearchPosts = async function ({ searchQuery, page, providerContext, sig
console.error("dooflix search error:", error); console.error("dooflix search error:", error);
return []; return [];
} }
});
}; };
exports.getSearchPosts = getSearchPosts; exports.getSearchPosts = getSearchPosts;

View File

@@ -1,7 +1,17 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getStream = void 0; exports.getStream = void 0;
const getStream = async function ({ link, }) { const getStream = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ link, }) {
try { try {
const streams = []; const streams = [];
streams.push({ streams.push({
@@ -22,5 +32,6 @@ const getStream = async function ({ link, }) {
console.error(err); console.error(err);
return []; return [];
} }
});
}; };
exports.getStream = getStream; exports.getStream = getStream;

View File

@@ -1,10 +1,20 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getEpisodes = void 0; exports.getEpisodes = void 0;
const getEpisodes = async function ({ url, providerContext, }) { const getEpisodes = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ url, providerContext, }) {
try { try {
const { axios, cheerio } = providerContext; const { axios, cheerio } = providerContext;
const res = await axios.get(url); const res = yield axios.get(url);
const html = res.data; const html = res.data;
let $ = cheerio.load(html); let $ = cheerio.load(html);
const episodeLinks = []; const episodeLinks = [];
@@ -30,5 +40,6 @@ const getEpisodes = async function ({ url, providerContext, }) {
}, },
]; ];
} }
});
}; };
exports.getEpisodes = getEpisodes; exports.getEpisodes = getEpisodes;

21
dist/drive/meta.js vendored
View File

@@ -1,11 +1,22 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getMeta = void 0; exports.getMeta = void 0;
const getMeta = async function ({ link, providerContext, }) { const getMeta = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ link, providerContext, }) {
var _b;
try { try {
const { axios, cheerio } = providerContext; const { axios, cheerio } = providerContext;
const url = link; const url = link;
const res = await axios.get(url); const res = yield axios.get(url);
const data = res.data; const data = res.data;
const $ = cheerio.load(data); const $ = cheerio.load(data);
const type = $(".left-wrapper") const type = $(".left-wrapper")
@@ -14,7 +25,7 @@ const getMeta = async function ({ link, providerContext, }) {
.includes("movie name") .includes("movie name")
? "movie" ? "movie"
: "series"; : "series";
const imdbId = $('a:contains("IMDb")').attr("href")?.split("/")[4] || ""; const imdbId = ((_b = $('a:contains("IMDb")').attr("href")) === null || _b === void 0 ? void 0 : _b.split("/")[4]) || "";
const title = $(".left-wrapper").find('strong:contains("Name")').next().text() || const title = $(".left-wrapper").find('strong:contains("Name")').next().text() ||
$(".left-wrapper") $(".left-wrapper")
.find('strong:contains("Name"),h5:contains("Name")') .find('strong:contains("Name"),h5:contains("Name")')
@@ -32,9 +43,10 @@ const getMeta = async function ({ link, providerContext, }) {
// Links // Links
const links = []; const links = [];
$('a:contains("1080")a:not(:contains("Zip")),a:contains("720")a:not(:contains("Zip")),a:contains("480")a:not(:contains("Zip")),a:contains("2160")a:not(:contains("Zip")),a:contains("4k")a:not(:contains("Zip"))').map((i, element) => { $('a:contains("1080")a:not(:contains("Zip")),a:contains("720")a:not(:contains("Zip")),a:contains("480")a:not(:contains("Zip")),a:contains("2160")a:not(:contains("Zip")),a:contains("4k")a:not(:contains("Zip"))').map((i, element) => {
var _a;
const title = $(element).parent("h5").prev().text(); const title = $(element).parent("h5").prev().text();
const episodesLink = $(element).attr("href"); const episodesLink = $(element).attr("href");
const quality = title.match(/\b(480p|720p|1080p|2160p)\b/i)?.[0] || ""; const quality = ((_a = title.match(/\b(480p|720p|1080p|2160p)\b/i)) === null || _a === void 0 ? void 0 : _a[0]) || "";
if (episodesLink && title) { if (episodesLink && title) {
links.push({ links.push({
title, title,
@@ -68,5 +80,6 @@ const getMeta = async function ({ link, providerContext, }) {
linkList: [], linkList: [],
}; };
} }
});
}; };
exports.getMeta = getMeta; exports.getMeta = getMeta;

29
dist/drive/posts.js vendored
View File

@@ -1,25 +1,39 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getSearchPosts = exports.getPosts = void 0; exports.getSearchPosts = exports.getPosts = void 0;
const getPosts = async function ({ filter, page, signal, providerContext, }) { const getPosts = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ filter, page, signal, providerContext, }) {
const { getBaseUrl } = providerContext; const { getBaseUrl } = providerContext;
const baseUrl = await getBaseUrl("drive"); const baseUrl = yield getBaseUrl("drive");
const url = `${baseUrl + filter}/page/${page}/`; const url = `${baseUrl + filter}/page/${page}/`;
return posts({ url, signal, providerContext }); return posts({ url, signal, providerContext });
});
}; };
exports.getPosts = getPosts; exports.getPosts = getPosts;
const getSearchPosts = async function ({ searchQuery, page, signal, providerContext, }) { const getSearchPosts = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ searchQuery, page, signal, providerContext, }) {
const { getBaseUrl } = providerContext; const { getBaseUrl } = providerContext;
const baseUrl = await getBaseUrl("drive"); const baseUrl = yield getBaseUrl("drive");
const url = `${baseUrl}page/${page}/?s=${searchQuery}`; const url = `${baseUrl}page/${page}/?s=${searchQuery}`;
return posts({ url, signal, providerContext }); return posts({ url, signal, providerContext });
});
}; };
exports.getSearchPosts = getSearchPosts; exports.getSearchPosts = getSearchPosts;
async function posts({ url, signal, providerContext, }) { function posts(_a) {
return __awaiter(this, arguments, void 0, function* ({ url, signal, providerContext, }) {
try { try {
const { cheerio } = providerContext; const { cheerio } = providerContext;
const res = await fetch(url, { signal }); const res = yield fetch(url, { signal });
const data = await res.text(); const data = yield res.text();
const $ = cheerio.load(data); const $ = cheerio.load(data);
const catalog = []; const catalog = [];
$(".recent-movies") $(".recent-movies")
@@ -42,4 +56,5 @@ async function posts({ url, signal, providerContext, }) {
console.error("drive error ", err); console.error("drive error ", err);
return []; return [];
} }
});
} }

28
dist/drive/stream.js vendored
View File

@@ -1,33 +1,45 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getStream = void 0; exports.getStream = void 0;
const getStream = async function ({ link: url, type, signal, providerContext, }) { const getStream = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ link: url, type, signal, providerContext, }) {
var _b, _c;
const headers = providerContext.commonHeaders; const headers = providerContext.commonHeaders;
try { try {
if (type === "movie") { if (type === "movie") {
const res = await providerContext.axios.get(url, { headers }); const res = yield providerContext.axios.get(url, { headers });
const html = res.data; const html = res.data;
const $ = providerContext.cheerio.load(html); const $ = providerContext.cheerio.load(html);
const link = $('a:contains("HubCloud")').attr("href"); const link = $('a:contains("HubCloud")').attr("href");
url = link || url; url = link || url;
} }
const res = await providerContext.axios.get(url, { headers }); const res = yield providerContext.axios.get(url, { headers });
let redirectUrl = res.data.match(/<meta\s+http-equiv="refresh"\s+content="[^"]*?;\s*url=([^"]+)"\s*\/?>/i)?.[1]; let redirectUrl = (_b = res.data.match(/<meta\s+http-equiv="refresh"\s+content="[^"]*?;\s*url=([^"]+)"\s*\/?>/i)) === null || _b === void 0 ? void 0 : _b[1];
if (url.includes("/archives/")) { if (url.includes("/archives/")) {
redirectUrl = res.data.match(/<a\s+[^>]*href="(https:\/\/hubcloud\.[^\/]+\/[^"]+)"/i)?.[1]; redirectUrl = (_c = res.data.match(/<a\s+[^>]*href="(https:\/\/hubcloud\.[^\/]+\/[^"]+)"/i)) === null || _c === void 0 ? void 0 : _c[1];
} }
if (!redirectUrl) { if (!redirectUrl) {
return await providerContext.extractors.hubcloudExtracter(url, signal); return yield providerContext.extractors.hubcloudExtracter(url, signal);
} }
const res2 = await providerContext.axios.get(redirectUrl, { headers }); const res2 = yield providerContext.axios.get(redirectUrl, { headers });
const data = res2.data; const data = res2.data;
const $ = providerContext.cheerio.load(data); const $ = providerContext.cheerio.load(data);
const hubcloudLink = $(".fa-file-download").parent().attr("href"); const hubcloudLink = $(".fa-file-download").parent().attr("href");
return await providerContext.extractors.hubcloudExtracter(hubcloudLink?.includes("https://hubcloud") ? hubcloudLink : redirectUrl, signal); return yield providerContext.extractors.hubcloudExtracter((hubcloudLink === null || hubcloudLink === void 0 ? void 0 : hubcloudLink.includes("https://hubcloud")) ? hubcloudLink : redirectUrl, signal);
} }
catch (err) { catch (err) {
console.error("Movies Drive err", err); console.error("Movies Drive err", err);
return []; return [];
} }
});
}; };
exports.getStream = getStream; exports.getStream = getStream;

View File

@@ -1,20 +1,29 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getEpisodes = void 0; exports.getEpisodes = void 0;
const getEpisodes = async function ({ url, providerContext, }) { const getEpisodes = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ url, providerContext, }) {
try { try {
const headers = providerContext.commonHeaders; const headers = providerContext.commonHeaders;
const { axios, cheerio } = providerContext; const { axios, cheerio } = providerContext;
const res = await axios.get(url, { headers }); const res = yield axios.get(url, { headers });
const data = res.data; const data = res.data;
const $ = cheerio.load(data); const $ = cheerio.load(data);
const episodeLinks = []; const episodeLinks = [];
$(".dlink.dl").map((i, element) => { $(".dlink.dl").map((i, element) => {
const title = $(element) var _a, _b;
const title = (_b = (_a = $(element)
.find("a") .find("a")
.text() .text()) === null || _a === void 0 ? void 0 : _a.replace("Download", "")) === null || _b === void 0 ? void 0 : _b.trim();
?.replace("Download", "")
?.trim();
const link = $(element).find("a").attr("href"); const link = $(element).find("a").attr("href");
if (title && link) { if (title && link) {
episodeLinks.push({ episodeLinks.push({
@@ -29,5 +38,6 @@ const getEpisodes = async function ({ url, providerContext, }) {
console.error("cl episode links", err); console.error("cl episode links", err);
return []; return [];
} }
});
}; };
exports.getEpisodes = getEpisodes; exports.getEpisodes = getEpisodes;

15
dist/filmyfly/meta.js vendored
View File

@@ -1,11 +1,21 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getMeta = void 0; exports.getMeta = void 0;
const getMeta = async function ({ link, providerContext, }) { const getMeta = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ link, providerContext, }) {
try { try {
const { axios, cheerio, commonHeaders: headers } = providerContext; const { axios, cheerio, commonHeaders: headers } = providerContext;
const url = link; const url = link;
const res = await axios.get(url, { headers }); const res = yield axios.get(url, { headers });
const data = res.data; const data = res.data;
const $ = cheerio.load(data); const $ = cheerio.load(data);
const type = url.includes("tvshows") ? "series" : "movie"; const type = url.includes("tvshows") ? "series" : "movie";
@@ -48,5 +58,6 @@ const getMeta = async function ({ link, providerContext, }) {
linkList: [], linkList: [],
}; };
} }
});
}; };
exports.getMeta = getMeta; exports.getMeta = getMeta;

View File

@@ -1,28 +1,42 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getSearchPosts = exports.getPosts = void 0; exports.getSearchPosts = exports.getPosts = void 0;
const getPosts = async function ({ filter, page, signal, providerContext, }) { const getPosts = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ filter, page, signal, providerContext, }) {
const { getBaseUrl } = providerContext; const { getBaseUrl } = providerContext;
const baseUrl = await getBaseUrl("filmyfly"); const baseUrl = yield getBaseUrl("filmyfly");
const url = `${baseUrl + filter}/${page}`; const url = `${baseUrl + filter}/${page}`;
return posts({ url, signal, baseUrl, providerContext }); return posts({ url, signal, baseUrl, providerContext });
});
}; };
exports.getPosts = getPosts; exports.getPosts = getPosts;
const getSearchPosts = async function ({ searchQuery, page, signal, providerContext, }) { const getSearchPosts = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ searchQuery, page, signal, providerContext, }) {
const { getBaseUrl } = providerContext; const { getBaseUrl } = providerContext;
const baseUrl = await getBaseUrl("filmyfly"); const baseUrl = yield getBaseUrl("filmyfly");
const url = `${baseUrl}/site-1.html?to-search=${searchQuery}`; const url = `${baseUrl}/site-1.html?to-search=${searchQuery}`;
if (page > 1) { if (page > 1) {
return []; return [];
} }
return posts({ url, signal, baseUrl, providerContext }); return posts({ url, signal, baseUrl, providerContext });
});
}; };
exports.getSearchPosts = getSearchPosts; exports.getSearchPosts = getSearchPosts;
async function posts({ url, signal, baseUrl, providerContext, }) { function posts(_a) {
return __awaiter(this, arguments, void 0, function* ({ url, signal, baseUrl, providerContext, }) {
try { try {
const { cheerio, commonHeaders: headers } = providerContext; const { cheerio, commonHeaders: headers } = providerContext;
const res = await fetch(url, { headers, signal }); const res = yield fetch(url, { headers, signal });
const data = await res.text(); const data = yield res.text();
const $ = cheerio.load(data); const $ = cheerio.load(data);
const catalog = []; const catalog = [];
$(".A2,.A10,.fl").map((i, element) => { $(".A2,.A10,.fl").map((i, element) => {
@@ -43,4 +57,5 @@ async function posts({ url, signal, baseUrl, providerContext, }) {
console.error("ff error ", err); console.error("ff error ", err);
return []; return [];
} }
});
} }

View File

@@ -1,18 +1,28 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getStream = void 0; exports.getStream = void 0;
const getStream = async function ({ link, signal, providerContext, }) { const getStream = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ link, signal, providerContext, }) {
try { try {
const res = await providerContext.axios.get(link, { signal }); const res = yield providerContext.axios.get(link, { signal });
const data = res.data; const data = res.data;
const $ = providerContext.cheerio.load(data); const $ = providerContext.cheerio.load(data);
const streams = []; const streams = [];
const elements = $(".button2,.button1,.button3,.button4,.button").toArray(); const elements = $(".button2,.button1,.button3,.button4,.button").toArray();
const promises = elements.map(async (element) => { const promises = elements.map((element) => __awaiter(this, void 0, void 0, function* () {
const title = $(element).text(); const title = $(element).text();
let link = $(element).attr("href"); let link = $(element).attr("href");
if (title.includes("GDFLIX") && link) { if (title.includes("GDFLIX") && link) {
const gdLinks = await providerContext.extractors.gdFlixExtracter(link, signal); const gdLinks = yield providerContext.extractors.gdFlixExtracter(link, signal);
streams.push(...gdLinks); streams.push(...gdLinks);
} }
const alreadyAdded = streams.find((s) => s.link === link); const alreadyAdded = streams.find((s) => s.link === link);
@@ -28,13 +38,14 @@ const getStream = async function ({ link, signal, providerContext, }) {
type: "mkv", type: "mkv",
}); });
} }
}); }));
await Promise.all(promises); yield Promise.all(promises);
return streams; return streams;
} }
catch (err) { catch (err) {
console.error(err); console.error(err);
return []; return [];
} }
});
}; };
exports.getStream = getStream; exports.getStream = getStream;

30
dist/flixhq/meta.js vendored
View File

@@ -1,12 +1,22 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getMeta = void 0; exports.getMeta = void 0;
const getMeta = async function ({ link: id, providerContext, }) { const getMeta = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ link: id, providerContext, }) {
try { try {
const { axios, getBaseUrl } = providerContext; const { axios, getBaseUrl } = providerContext;
const baseUrl = await getBaseUrl("consumet"); const baseUrl = yield getBaseUrl("consumet");
const url = `${baseUrl}/movies/flixhq/info?id=` + id; const url = `${baseUrl}/movies/flixhq/info?id=` + id;
const res = await axios.get(url); const res = yield axios.get(url);
const data = res.data; const data = res.data;
const meta = { const meta = {
title: data.title, title: data.title,
@@ -14,14 +24,14 @@ const getMeta = async function ({ link: id, providerContext, }) {
image: data.cover, image: data.cover,
cast: data.casts, cast: data.casts,
rating: data.rating, rating: data.rating,
tags: [data?.type, data?.duration, data.releaseDate.split("-")[0]], tags: [data === null || data === void 0 ? void 0 : data.type, data === null || data === void 0 ? void 0 : data.duration, data.releaseDate.split("-")[0]],
imdbId: "", imdbId: "",
type: data.episodes.length > 1 ? "series" : "movie", type: data.episodes.length > 1 ? "series" : "movie",
}; };
const links = []; const links = [];
data.episodes.forEach((episode) => { data.episodes.forEach((episode) => {
const title = episode?.number const title = (episode === null || episode === void 0 ? void 0 : episode.number)
? "Season-" + episode?.season + " Ep-" + episode.number ? "Season-" + (episode === null || episode === void 0 ? void 0 : episode.season) + " Ep-" + episode.number
: episode.title; : episode.title;
const link = episode.id + "*" + data.id; const link = episode.id + "*" + data.id;
if (link && title) { if (link && title) {
@@ -31,15 +41,12 @@ const getMeta = async function ({ link: id, providerContext, }) {
}); });
} }
}); });
return { return Object.assign(Object.assign({}, meta), { linkList: [
...meta,
linkList: [
{ {
title: meta.title, title: meta.title,
directLinks: links, directLinks: links,
}, },
], ] });
};
} }
catch (err) { catch (err) {
console.error(err); console.error(err);
@@ -52,5 +59,6 @@ const getMeta = async function ({ link: id, providerContext, }) {
linkList: [], linkList: [],
}; };
} }
});
}; };
exports.getMeta = getMeta; exports.getMeta = getMeta;

32
dist/flixhq/posts.js vendored
View File

@@ -1,29 +1,44 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getSearchPosts = exports.getPosts = void 0; exports.getSearchPosts = exports.getPosts = void 0;
const getPosts = async function ({ filter, signal, providerContext, }) { const getPosts = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ filter, signal, providerContext, }) {
const { getBaseUrl } = providerContext; const { getBaseUrl } = providerContext;
const urlRes = await getBaseUrl("consumet"); const urlRes = yield getBaseUrl("consumet");
const baseUrl = urlRes + "/movies/flixhq"; const baseUrl = urlRes + "/movies/flixhq";
const url = `${baseUrl + filter}`; const url = `${baseUrl + filter}`;
return posts({ url, signal, providerContext }); return posts({ url, signal, providerContext });
});
}; };
exports.getPosts = getPosts; exports.getPosts = getPosts;
const getSearchPosts = async function ({ searchQuery, page, signal, providerContext, }) { const getSearchPosts = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ searchQuery, page, signal, providerContext, }) {
const { getBaseUrl } = providerContext; const { getBaseUrl } = providerContext;
const urlRes = await getBaseUrl("consumet"); const urlRes = yield getBaseUrl("consumet");
const baseUrl = urlRes + "/movies/flixhq"; const baseUrl = urlRes + "/movies/flixhq";
const url = `${baseUrl}/${searchQuery}?page=${page}`; const url = `${baseUrl}/${searchQuery}?page=${page}`;
return posts({ url, signal, providerContext }); return posts({ url, signal, providerContext });
});
}; };
exports.getSearchPosts = getSearchPosts; exports.getSearchPosts = getSearchPosts;
async function posts({ url, signal, providerContext, }) { function posts(_a) {
return __awaiter(this, arguments, void 0, function* ({ url, signal, providerContext, }) {
var _b;
try { try {
const { axios } = providerContext; const { axios } = providerContext;
const res = await axios.get(url, { signal }); const res = yield axios.get(url, { signal });
const data = res.data?.results || res.data; const data = ((_b = res.data) === null || _b === void 0 ? void 0 : _b.results) || res.data;
const catalog = []; const catalog = [];
data?.map((element) => { data === null || data === void 0 ? void 0 : data.map((element) => {
const title = element.title; const title = element.title;
const link = element.id; const link = element.id;
const image = element.image; const image = element.image;
@@ -41,4 +56,5 @@ async function posts({ url, signal, providerContext, }) {
console.error("flixhq error ", err); console.error("flixhq error ", err);
return []; return [];
} }
});
} }

38
dist/flixhq/stream.js vendored
View File

@@ -1,16 +1,27 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getStream = void 0; exports.getStream = void 0;
const types_1 = require("../types"); const types_1 = require("../types");
const getStream = async function ({ link: id, providerContext, }) { const getStream = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ link: id, providerContext, }) {
var _b;
try { try {
const { getBaseUrl } = providerContext; const { getBaseUrl } = providerContext;
const episodeId = id.split("*")[0]; const episodeId = id.split("*")[0];
const mediaId = id.split("*")[1]; const mediaId = id.split("*")[1];
const baseUrl = await getBaseUrl("consumet"); const baseUrl = yield getBaseUrl("consumet");
const serverUrl = `${baseUrl}/movies/flixhq/servers?episodeId=${episodeId}&mediaId=${mediaId}`; const serverUrl = `${baseUrl}/movies/flixhq/servers?episodeId=${episodeId}&mediaId=${mediaId}`;
const res = await fetch(serverUrl); const res = yield fetch(serverUrl);
const servers = await res.json(); const servers = yield res.json();
const streamLinks = []; const streamLinks = [];
for (const server of servers) { for (const server of servers) {
const streamUrl = `${baseUrl}/movies/flixhq/watch?server=` + const streamUrl = `${baseUrl}/movies/flixhq/watch?server=` +
@@ -19,25 +30,27 @@ const getStream = async function ({ link: id, providerContext, }) {
episodeId + episodeId +
"&mediaId=" + "&mediaId=" +
mediaId; mediaId;
const streamRes = await fetch(streamUrl); const streamRes = yield fetch(streamUrl);
const streamData = await streamRes.json(); const streamData = yield streamRes.json();
const subtitles = []; const subtitles = [];
if (streamData?.sources?.length > 0) { if (((_b = streamData === null || streamData === void 0 ? void 0 : streamData.sources) === null || _b === void 0 ? void 0 : _b.length) > 0) {
if (streamData.subtitles) { if (streamData.subtitles) {
streamData.subtitles.forEach((sub) => { streamData.subtitles.forEach((sub) => {
var _a;
subtitles.push({ subtitles.push({
language: sub?.lang?.slice(0, 2), language: (_a = sub === null || sub === void 0 ? void 0 : sub.lang) === null || _a === void 0 ? void 0 : _a.slice(0, 2),
uri: sub?.url, uri: sub === null || sub === void 0 ? void 0 : sub.url,
type: types_1.TextTrackType.VTT, type: types_1.TextTrackType.VTT,
title: sub?.lang, title: sub === null || sub === void 0 ? void 0 : sub.lang,
}); });
}); });
} }
streamData.sources.forEach((source) => { streamData.sources.forEach((source) => {
var _a;
streamLinks.push({ streamLinks.push({
server: server?.name + server: (server === null || server === void 0 ? void 0 : server.name) +
"-" + "-" +
source?.quality?.replace("auto", "MultiQuality"), ((_a = source === null || source === void 0 ? void 0 : source.quality) === null || _a === void 0 ? void 0 : _a.replace("auto", "MultiQuality")),
link: source.url, link: source.url,
type: source.isM3U8 ? "m3u8" : "mp4", type: source.isM3U8 ? "m3u8" : "mp4",
subtitles: subtitles, subtitles: subtitles,
@@ -51,5 +64,6 @@ const getStream = async function ({ link: id, providerContext, }) {
console.error(err); console.error(err);
return []; return [];
} }
});
}; };
exports.getStream = getStream; exports.getStream = getStream;

View File

@@ -32,6 +32,15 @@ var __importStar = (this && this.__importStar) || (function () {
return result; return result;
}; };
})(); })();
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());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) { var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod }; return (mod && mod.__esModule) ? mod : { "default": mod };
}; };
@@ -40,22 +49,22 @@ exports.gdFlixExtracter = gdFlixExtracter;
const axios_1 = __importDefault(require("axios")); const axios_1 = __importDefault(require("axios"));
const cheerio = __importStar(require("cheerio")); const cheerio = __importStar(require("cheerio"));
const headers_1 = require("./headers"); const headers_1 = require("./headers");
async function gdFlixExtracter(link, signal) { function gdFlixExtracter(link, signal) {
return __awaiter(this, void 0, void 0, function* () {
var _a, _b, _c, _d, _e, _f, _g, _h;
try { try {
const streamLinks = []; const streamLinks = [];
const res = await (0, axios_1.default)(`${link}`, { headers: headers_1.headers, signal }); const res = yield (0, axios_1.default)(`${link}`, { headers: headers_1.headers, signal });
console.log('gdFlixExtracter', link); console.log('gdFlixExtracter', link);
const data = res.data; const data = res.data;
let $drive = cheerio.load(data); let $drive = cheerio.load(data);
// handle if redirected to another link // handle if redirected to another link
if ($drive('body').attr('onload')?.includes('location.replace')) { if ((_a = $drive('body').attr('onload')) === null || _a === void 0 ? void 0 : _a.includes('location.replace')) {
const newLink = $drive('body') const newLink = (_d = (_c = (_b = $drive('body')
.attr('onload') .attr('onload')) === null || _b === void 0 ? void 0 : _b.split("location.replace('")) === null || _c === void 0 ? void 0 : _c[1].split("'")) === null || _d === void 0 ? void 0 : _d[0];
?.split("location.replace('")?.[1]
.split("'")?.[0];
console.log('newLink', newLink); console.log('newLink', newLink);
if (newLink) { if (newLink) {
const newRes = await axios_1.default.get(newLink, { headers: headers_1.headers, signal }); const newRes = yield axios_1.default.get(newLink, { headers: headers_1.headers, signal });
$drive = cheerio.load(newRes.data); $drive = cheerio.load(newRes.data);
} }
} }
@@ -104,7 +113,7 @@ async function gdFlixExtracter(link, signal) {
const resumeDrive = $drive('.btn-secondary').attr('href') || ''; const resumeDrive = $drive('.btn-secondary').attr('href') || '';
console.log('resumeDrive', resumeDrive); console.log('resumeDrive', resumeDrive);
if (resumeDrive.includes('indexbot')) { if (resumeDrive.includes('indexbot')) {
const resumeBotRes = await axios_1.default.get(resumeDrive, { headers: headers_1.headers }); const resumeBotRes = yield axios_1.default.get(resumeDrive, { headers: headers_1.headers });
const resumeBotToken = resumeBotRes.data.match(/formData\.append\('token', '([a-f0-9]+)'\)/)[1]; const resumeBotToken = resumeBotRes.data.match(/formData\.append\('token', '([a-f0-9]+)'\)/)[1];
const resumeBotBody = new FormData(); const resumeBotBody = new FormData();
resumeBotBody.append('token', resumeBotToken); resumeBotBody.append('token', resumeBotToken);
@@ -115,7 +124,7 @@ async function gdFlixExtracter(link, signal) {
// resumeBotBaseUrl + '/download?id=' + resumeBotPath, // resumeBotBaseUrl + '/download?id=' + resumeBotPath,
// ); // );
// console.log('resumeBotBody', resumeBotToken); // console.log('resumeBotBody', resumeBotToken);
const resumeBotDownload = await fetch(resumeBotBaseUrl + '/download?id=' + resumeBotPath, { const resumeBotDownload = yield fetch(resumeBotBaseUrl + '/download?id=' + resumeBotPath, {
method: 'POST', method: 'POST',
body: resumeBotBody, body: resumeBotBody,
headers: { headers: {
@@ -123,7 +132,7 @@ async function gdFlixExtracter(link, signal) {
Cookie: 'PHPSESSID=7e9658ce7c805dab5bbcea9046f7f308', Cookie: 'PHPSESSID=7e9658ce7c805dab5bbcea9046f7f308',
}, },
}); });
const resumeBotDownloadData = await resumeBotDownload.json(); const resumeBotDownloadData = yield resumeBotDownload.json();
console.log('resumeBotDownloadData', resumeBotDownloadData.url); console.log('resumeBotDownloadData', resumeBotDownloadData.url);
streamLinks.push({ streamLinks.push({
server: 'ResumeBot', server: 'ResumeBot',
@@ -133,7 +142,7 @@ async function gdFlixExtracter(link, signal) {
} }
else { else {
const url = baseUrl + resumeDrive; const url = baseUrl + resumeDrive;
const resumeDriveRes = await axios_1.default.get(url, { headers: headers_1.headers }); const resumeDriveRes = yield axios_1.default.get(url, { headers: headers_1.headers });
const resumeDriveHtml = resumeDriveRes.data; const resumeDriveHtml = resumeDriveRes.data;
const $resumeDrive = cheerio.load(resumeDriveHtml); const $resumeDrive = cheerio.load(resumeDriveHtml);
const resumeLink = $resumeDrive('.btn-success').attr('href'); const resumeLink = $resumeDrive('.btn-success').attr('href');
@@ -155,9 +164,9 @@ async function gdFlixExtracter(link, signal) {
const seed = $drive('.btn-danger').attr('href') || ''; const seed = $drive('.btn-danger').attr('href') || '';
console.log('seed', seed); console.log('seed', seed);
if (!seed.includes('?url=')) { if (!seed.includes('?url=')) {
const newLinkRes = await axios_1.default.head(seed, { headers: headers_1.headers, signal }); const newLinkRes = yield axios_1.default.head(seed, { headers: headers_1.headers, signal });
console.log('newLinkRes', newLinkRes.request?.responseURL); console.log('newLinkRes', (_e = newLinkRes.request) === null || _e === void 0 ? void 0 : _e.responseURL);
const newLink = newLinkRes.request?.responseURL?.split('?url=')?.[1] || seed; const newLink = ((_h = (_g = (_f = newLinkRes.request) === null || _f === void 0 ? void 0 : _f.responseURL) === null || _g === void 0 ? void 0 : _g.split('?url=')) === null || _h === void 0 ? void 0 : _h[1]) || seed;
streamLinks.push({ server: 'G-Drive', link: newLink, type: 'mkv' }); streamLinks.push({ server: 'G-Drive', link: newLink, type: 'mkv' });
} }
else { else {
@@ -167,14 +176,14 @@ async function gdFlixExtracter(link, signal) {
InstantFromData.append('keys', instantToken); InstantFromData.append('keys', instantToken);
const videoSeedUrl = seed.split('/').slice(0, 3).join('/') + '/api'; const videoSeedUrl = seed.split('/').slice(0, 3).join('/') + '/api';
// console.log('videoSeedUrl', videoSeedUrl); // console.log('videoSeedUrl', videoSeedUrl);
const instantLinkRes = await fetch(videoSeedUrl, { const instantLinkRes = yield fetch(videoSeedUrl, {
method: 'POST', method: 'POST',
body: InstantFromData, body: InstantFromData,
headers: { headers: {
'x-token': videoSeedUrl, 'x-token': videoSeedUrl,
}, },
}); });
const instantLinkData = await instantLinkRes.json(); const instantLinkData = yield instantLinkRes.json();
// console.log('instantLinkData', instantLinkData); // console.log('instantLinkData', instantLinkData);
if (instantLinkData.error === false) { if (instantLinkData.error === false) {
const instantLink = instantLinkData.url; const instantLink = instantLinkData.url;
@@ -198,4 +207,5 @@ async function gdFlixExtracter(link, signal) {
console.log('gdflix error: ', error); console.log('gdflix error: ', error);
return []; return [];
} }
});
} }

17
dist/getBaseUrl.js vendored
View File

@@ -1,10 +1,19 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getBaseUrl = void 0; exports.getBaseUrl = void 0;
const storage_1 = require("../storage"); const storage_1 = require("../storage");
// 1 hour // 1 hour
const expireTime = 60 * 60 * 1000; const expireTime = 60 * 60 * 1000;
const getBaseUrl = async (providerValue) => { const getBaseUrl = (providerValue) => __awaiter(void 0, void 0, void 0, function* () {
try { try {
let baseUrl = ''; let baseUrl = '';
const cacheKey = 'CacheBaseUrl' + providerValue; const cacheKey = 'CacheBaseUrl' + providerValue;
@@ -17,8 +26,8 @@ const getBaseUrl = async (providerValue) => {
baseUrl = cachedUrl; baseUrl = cachedUrl;
} }
else { else {
const baseUrlRes = await fetch('https://himanshu8443.github.io/providers/modflix.json'); const baseUrlRes = yield fetch('https://himanshu8443.github.io/providers/modflix.json');
const baseUrlData = await baseUrlRes.json(); const baseUrlData = yield baseUrlRes.json();
baseUrl = baseUrlData[providerValue].url; baseUrl = baseUrlData[providerValue].url;
storage_1.cacheStorageService.setString(cacheKey, baseUrl); storage_1.cacheStorageService.setString(cacheKey, baseUrl);
storage_1.cacheStorageService.setObject(timeKey, Date.now()); storage_1.cacheStorageService.setObject(timeKey, Date.now());
@@ -29,5 +38,5 @@ const getBaseUrl = async (providerValue) => {
console.error(`Error fetching baseUrl: ${providerValue}`, error); console.error(`Error fetching baseUrl: ${providerValue}`, error);
return ''; return '';
} }
}; });
exports.getBaseUrl = getBaseUrl; exports.getBaseUrl = getBaseUrl;

View File

@@ -1,20 +1,30 @@
"use strict"; "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());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) { var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod }; return (mod && mod.__esModule) ? mod : { "default": mod };
}; };
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.gofileExtracter = gofileExtracter; exports.gofileExtracter = gofileExtracter;
const axios_1 = __importDefault(require("axios")); const axios_1 = __importDefault(require("axios"));
async function gofileExtracter(id) { function gofileExtracter(id) {
return __awaiter(this, void 0, void 0, function* () {
try { try {
const gofileRes = await axios_1.default.get('https://gofile.io/d/' + id); const gofileRes = yield axios_1.default.get('https://gofile.io/d/' + id);
const genAccountres = await axios_1.default.post('https://api.gofile.io/accounts'); const genAccountres = yield axios_1.default.post('https://api.gofile.io/accounts');
const token = genAccountres.data.data.token; const token = genAccountres.data.data.token;
console.log('gofile token', token); console.log('gofile token', token);
const wtRes = await axios_1.default.get('https://gofile.io/dist/js/global.js'); const wtRes = yield axios_1.default.get('https://gofile.io/dist/js/global.js');
const wt = wtRes.data.match(/appdata\.wt\s*=\s*["']([^"']+)["']/)[1]; const wt = wtRes.data.match(/appdata\.wt\s*=\s*["']([^"']+)["']/)[1];
console.log('gofile wt', wt); console.log('gofile wt', wt);
const res = await axios_1.default.get(`https://api.gofile.io/contents/${id}?wt=${wt}`, { const res = yield axios_1.default.get(`https://api.gofile.io/contents/${id}?wt=${wt}`, {
headers: { headers: {
Authorization: `Bearer ${token}`, Authorization: `Bearer ${token}`,
}, },
@@ -34,4 +44,5 @@ async function gofileExtracter(id) {
token: '', token: '',
}; };
} }
});
} }

64
dist/guardahd/meta.js vendored
View File

@@ -1,40 +1,52 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getMeta = void 0; exports.getMeta = void 0;
const getMeta = async function ({ link, providerContext, }) { const getMeta = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ link, providerContext, }) {
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
const axios = providerContext.axios; const axios = providerContext.axios;
try { try {
console.log("all", link); console.log("all", link);
const res = await axios.get(link); const res = yield axios.get(link);
const data = res.data; const data = res.data;
const meta = { const meta = {
title: "", title: "",
synopsis: "", synopsis: "",
image: "", image: "",
imdbId: data?.meta?.imdb_id || "", imdbId: ((_b = data === null || data === void 0 ? void 0 : data.meta) === null || _b === void 0 ? void 0 : _b.imdb_id) || "",
type: data?.meta?.type || "movie", type: ((_c = data === null || data === void 0 ? void 0 : data.meta) === null || _c === void 0 ? void 0 : _c.type) || "movie",
}; };
const links = []; const links = [];
let directLinks = []; let directLinks = [];
let season = new Map(); let season = new Map();
if (meta.type === "series") { if (meta.type === "series") {
data?.meta?.videos?.map((video) => { (_e = (_d = data === null || data === void 0 ? void 0 : data.meta) === null || _d === void 0 ? void 0 : _d.videos) === null || _e === void 0 ? void 0 : _e.map((video) => {
if (video?.season <= 0) var _a, _b, _c, _d, _e, _f, _g, _h;
if ((video === null || video === void 0 ? void 0 : video.season) <= 0)
return; return;
if (!season.has(video?.season)) { if (!season.has(video === null || video === void 0 ? void 0 : video.season)) {
season.set(video?.season, []); season.set(video === null || video === void 0 ? void 0 : video.season, []);
} }
season.get(video?.season).push({ season.get(video === null || video === void 0 ? void 0 : video.season).push({
title: "Episode " + video?.episode, title: "Episode " + (video === null || video === void 0 ? void 0 : video.episode),
type: "series", type: "series",
link: JSON.stringify({ link: JSON.stringify({
title: data?.meta?.name, title: (_a = data === null || data === void 0 ? void 0 : data.meta) === null || _a === void 0 ? void 0 : _a.name,
imdbId: data?.meta?.imdb_id, imdbId: (_b = data === null || data === void 0 ? void 0 : data.meta) === null || _b === void 0 ? void 0 : _b.imdb_id,
season: video?.id?.split(":")[1], season: (_c = video === null || video === void 0 ? void 0 : video.id) === null || _c === void 0 ? void 0 : _c.split(":")[1],
episode: video?.id?.split(":")[2], episode: (_d = video === null || video === void 0 ? void 0 : video.id) === null || _d === void 0 ? void 0 : _d.split(":")[2],
type: data?.meta?.type, type: (_e = data === null || data === void 0 ? void 0 : data.meta) === null || _e === void 0 ? void 0 : _e.type,
tmdbId: data?.meta?.moviedb_id?.toString() || "", tmdbId: ((_g = (_f = data === null || data === void 0 ? void 0 : data.meta) === null || _f === void 0 ? void 0 : _f.moviedb_id) === null || _g === void 0 ? void 0 : _g.toString()) || "",
year: data?.meta?.year, year: (_h = data === null || data === void 0 ? void 0 : data.meta) === null || _h === void 0 ? void 0 : _h.year,
}), }),
}); });
}); });
@@ -51,28 +63,25 @@ const getMeta = async function ({ link, providerContext, }) {
else { else {
console.log("all meta Mv🔥🔥", meta); console.log("all meta Mv🔥🔥", meta);
links.push({ links.push({
title: data?.meta?.name, title: (_f = data === null || data === void 0 ? void 0 : data.meta) === null || _f === void 0 ? void 0 : _f.name,
directLinks: [ directLinks: [
{ {
title: "Movie", title: "Movie",
type: "movie", type: "movie",
link: JSON.stringify({ link: JSON.stringify({
title: data?.meta?.name, title: (_g = data === null || data === void 0 ? void 0 : data.meta) === null || _g === void 0 ? void 0 : _g.name,
imdbId: data?.meta?.imdb_id, imdbId: (_h = data === null || data === void 0 ? void 0 : data.meta) === null || _h === void 0 ? void 0 : _h.imdb_id,
season: "", season: "",
episode: "", episode: "",
type: data?.meta?.type, type: (_j = data === null || data === void 0 ? void 0 : data.meta) === null || _j === void 0 ? void 0 : _j.type,
tmdbId: data?.meta?.moviedb_id?.toString() || "", tmdbId: ((_l = (_k = data === null || data === void 0 ? void 0 : data.meta) === null || _k === void 0 ? void 0 : _k.moviedb_id) === null || _l === void 0 ? void 0 : _l.toString()) || "",
year: data?.meta?.year, year: (_m = data === null || data === void 0 ? void 0 : data.meta) === null || _m === void 0 ? void 0 : _m.year,
}), }),
}, },
], ],
}); });
} }
return { return Object.assign(Object.assign({}, meta), { linkList: links });
...meta,
linkList: links,
};
} }
catch (err) { catch (err) {
console.error(err); console.error(err);
@@ -85,5 +94,6 @@ const getMeta = async function ({ link, providerContext, }) {
linkList: [], linkList: [],
}; };
} }
});
}; };
exports.getMeta = getMeta; exports.getMeta = getMeta;

View File

@@ -1,21 +1,31 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getSearchPosts = exports.getPosts = void 0; exports.getSearchPosts = exports.getPosts = void 0;
const getPosts = async function ({ filter, signal, providerContext, }) { const getPosts = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ filter, signal, providerContext, }) {
try { try {
const catalog = []; const catalog = [];
const url = "https://cinemeta-catalogs.strem.io" + filter; const url = "https://cinemeta-catalogs.strem.io" + filter;
console.log("allGetPostUrl", url); console.log("allGetPostUrl", url);
const res = await providerContext.axios.get(url, { const res = yield providerContext.axios.get(url, {
headers: providerContext.commonHeaders, headers: providerContext.commonHeaders,
signal, signal,
}); });
const data = res.data; const data = res.data;
data?.metas.map((result) => { data === null || data === void 0 ? void 0 : data.metas.map((result) => {
const title = result?.name; const title = result === null || result === void 0 ? void 0 : result.name;
const id = result?.imdb_id || result?.id; const id = (result === null || result === void 0 ? void 0 : result.imdb_id) || (result === null || result === void 0 ? void 0 : result.id);
const type = result?.type; const type = result === null || result === void 0 ? void 0 : result.type;
const image = result?.poster; const image = result === null || result === void 0 ? void 0 : result.poster;
if (id) { if (id) {
catalog.push({ catalog.push({
title: title, title: title,
@@ -31,9 +41,11 @@ const getPosts = async function ({ filter, signal, providerContext, }) {
console.error("AutoEmbed error ", err); console.error("AutoEmbed error ", err);
return []; return [];
} }
});
}; };
exports.getPosts = getPosts; exports.getPosts = getPosts;
const getSearchPosts = async function ({ searchQuery, page, signal, providerContext, }) { const getSearchPosts = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ searchQuery, page, signal, providerContext, }) {
try { try {
const { axios, commonHeaders: headers } = providerContext; const { axios, commonHeaders: headers } = providerContext;
if (page > 1) { if (page > 1) {
@@ -41,13 +53,13 @@ const getSearchPosts = async function ({ searchQuery, page, signal, providerCont
} }
const catalog = []; const catalog = [];
const url2 = `https://v3-cinemeta.strem.io/catalog/movie/top/search=${encodeURI(searchQuery)}.json`; const url2 = `https://v3-cinemeta.strem.io/catalog/movie/top/search=${encodeURI(searchQuery)}.json`;
const res2 = await axios.get(url2, { headers, signal }); const res2 = yield axios.get(url2, { headers, signal });
const data2 = res2.data; const data2 = res2.data;
data2?.metas.map((result) => { data2 === null || data2 === void 0 ? void 0 : data2.metas.map((result) => {
const title = result?.name || ""; const title = (result === null || result === void 0 ? void 0 : result.name) || "";
const id = result?.imdb_id || result?.id; const id = (result === null || result === void 0 ? void 0 : result.imdb_id) || (result === null || result === void 0 ? void 0 : result.id);
const image = result?.poster; const image = result === null || result === void 0 ? void 0 : result.poster;
const type = result?.type; const type = result === null || result === void 0 ? void 0 : result.type;
if (id) { if (id) {
catalog.push({ catalog.push({
title: title, title: title,
@@ -62,5 +74,6 @@ const getSearchPosts = async function ({ searchQuery, page, signal, providerCont
console.error("AutoEmbed error ", err); console.error("AutoEmbed error ", err);
return []; return [];
} }
});
}; };
exports.getSearchPosts = getSearchPosts; exports.getSearchPosts = getSearchPosts;

View File

@@ -1,18 +1,29 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getStream = void 0; exports.getStream = void 0;
const getStream = async function ({ link: id, type, providerContext, }) { const getStream = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ link: id, type, providerContext, }) {
try { try {
const { axios, cheerio, extractors } = providerContext; const { axios, cheerio, extractors } = providerContext;
const { superVideoExtractor } = extractors; const { superVideoExtractor } = extractors;
async function ExtractGuardahd({ imdb, // type, // season, function ExtractGuardahd(_a) {
return __awaiter(this, arguments, void 0, function* ({ imdb, // type, // season,
}) { }) {
try { try {
const baseUrl = "https://guardahd.stream"; const baseUrl = "https://guardahd.stream";
const path = "/set-movie-a/" + imdb; const path = "/set-movie-a/" + imdb;
const url = baseUrl + path; const url = baseUrl + path;
console.log("url:", url); console.log("url:", url);
const res = await axios.get(url, { timeout: 4000 }); const res = yield axios.get(url, { timeout: 4000 });
const html = res.data; const html = res.data;
const $ = cheerio.load(html); const $ = cheerio.load(html);
const superVideoUrl = $('li:contains("supervideo")').attr("data-link"); const superVideoUrl = $('li:contains("supervideo")').attr("data-link");
@@ -23,17 +34,19 @@ const getStream = async function ({ link: id, type, providerContext, }) {
const controller2 = new AbortController(); const controller2 = new AbortController();
const signal2 = controller2.signal; const signal2 = controller2.signal;
setTimeout(() => controller2.abort(), 4000); setTimeout(() => controller2.abort(), 4000);
const res2 = await fetch("https:" + superVideoUrl, { signal: signal2 }); const res2 = yield fetch("https:" + superVideoUrl, { signal: signal2 });
const data = await res2.text(); const data = yield res2.text();
// console.log('mostraguarda data:', data); // console.log('mostraguarda data:', data);
const streamUrl = await superVideoExtractor(data); const streamUrl = yield superVideoExtractor(data);
return streamUrl; return streamUrl;
} }
catch (err) { catch (err) {
console.error("Error in GetMostraguardaStram:", err); console.error("Error in GetMostraguardaStram:", err);
} }
});
} }
async function GetMostraguardaStream({ imdb, type, season, episode, }) { function GetMostraguardaStream(_a) {
return __awaiter(this, arguments, void 0, function* ({ imdb, type, season, episode, }) {
try { try {
const baseUrl = "https://mostraguarda.stream"; const baseUrl = "https://mostraguarda.stream";
const path = type === "tv" const path = type === "tv"
@@ -41,7 +54,7 @@ const getStream = async function ({ link: id, type, providerContext, }) {
: `/movie/${imdb}`; : `/movie/${imdb}`;
const url = baseUrl + path; const url = baseUrl + path;
console.log("url:", url); console.log("url:", url);
const res = await axios(url, { timeout: 4000 }); const res = yield axios(url, { timeout: 4000 });
const html = res.data; const html = res.data;
const $ = cheerio.load(html); const $ = cheerio.load(html);
const superVideoUrl = $('li:contains("supervideo")').attr("data-link"); const superVideoUrl = $('li:contains("supervideo")').attr("data-link");
@@ -52,21 +65,22 @@ const getStream = async function ({ link: id, type, providerContext, }) {
const controller2 = new AbortController(); const controller2 = new AbortController();
const signal2 = controller2.signal; const signal2 = controller2.signal;
setTimeout(() => controller2.abort(), 4000); setTimeout(() => controller2.abort(), 4000);
const res2 = await fetch("https:" + superVideoUrl, { signal: signal2 }); const res2 = yield fetch("https:" + superVideoUrl, { signal: signal2 });
const data = await res2.text(); const data = yield res2.text();
// console.log('mostraguarda data:', data); // console.log('mostraguarda data:', data);
const streamUrl = await superVideoExtractor(data); const streamUrl = yield superVideoExtractor(data);
return streamUrl; return streamUrl;
} }
catch (err) { catch (err) {
console.error("Error in GetMostraguardaStram:", err); console.error("Error in GetMostraguardaStram:", err);
} }
});
} }
console.log(id); console.log(id);
const streams = []; const streams = [];
const { imdbId, season, episode } = JSON.parse(id); const { imdbId, season, episode } = JSON.parse(id);
///// mostraguarda ///// mostraguarda
const mostraguardaStream = await GetMostraguardaStream({ const mostraguardaStream = yield GetMostraguardaStream({
imdb: imdbId, imdb: imdbId,
type: type, type: type,
season: season, season: season,
@@ -79,7 +93,7 @@ const getStream = async function ({ link: id, type, providerContext, }) {
type: "m3u8", type: "m3u8",
}); });
} }
const guardahdStream = await ExtractGuardahd({ const guardahdStream = yield ExtractGuardahd({
imdb: imdbId, imdb: imdbId,
type: type, type: type,
season: season, season: season,
@@ -98,5 +112,6 @@ const getStream = async function ({ link: id, type, providerContext, }) {
console.error(err); console.error(err);
return []; return [];
} }
});
}; };
exports.getStream = getStream; exports.getStream = getStream;

26
dist/hdhub4u/meta.js vendored
View File

@@ -1,4 +1,13 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getMeta = void 0; exports.getMeta = void 0;
const hdbHeaders = { const hdbHeaders = {
@@ -6,18 +15,19 @@ const hdbHeaders = {
Referer: "https://google.com", Referer: "https://google.com",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0",
}; };
const getMeta = async function ({ link, providerContext, }) { const getMeta = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ link, providerContext, }) {
var _b;
try { try {
const { axios, cheerio } = providerContext; const { axios, cheerio } = providerContext;
const url = link; const url = link;
const res = await axios.get(url, { headers: hdbHeaders }); const res = yield axios.get(url, { headers: hdbHeaders });
const data = res.data; const data = res.data;
const $ = cheerio.load(data); const $ = cheerio.load(data);
const container = $(".page-body"); const container = $(".page-body");
const imdbId = container const imdbId = ((_b = container
.find('a[href*="imdb.com/title/tt"]:not([href*="imdb.com/title/tt/"])') .find('a[href*="imdb.com/title/tt"]:not([href*="imdb.com/title/tt/"])')
.attr("href") .attr("href")) === null || _b === void 0 ? void 0 : _b.split("/")[4]) || "";
?.split("/")[4] || "";
const title = container const title = container
.find('h2[data-ved="2ahUKEwjL0NrBk4vnAhWlH7cAHRCeAlwQ3B0oATAfegQIFBAM"],h2[data-ved="2ahUKEwiP0pGdlermAhUFYVAKHV8tAmgQ3B0oATAZegQIDhAM"]') .find('h2[data-ved="2ahUKEwjL0NrBk4vnAhWlH7cAHRCeAlwQ3B0oATAfegQIFBAM"],h2[data-ved="2ahUKEwiP0pGdlermAhUFYVAKHV8tAmgQ3B0oATAZegQIDhAM"]')
.text(); .text();
@@ -74,9 +84,10 @@ const getMeta = async function ({ link, providerContext, }) {
container container
.find('a:contains("480"),a:contains("720"),a:contains("1080"),a:contains("2160"),a:contains("4K")') .find('a:contains("480"),a:contains("720"),a:contains("1080"),a:contains("2160"),a:contains("4K")')
.map((i, element) => { .map((i, element) => {
const quality = $(element) var _a;
const quality = ((_a = $(element)
.text() .text()
.match(/\b(480p|720p|1080p|2160p)\b/i)?.[0] || ""; .match(/\b(480p|720p|1080p|2160p)\b/i)) === null || _a === void 0 ? void 0 : _a[0]) || "";
const movieLinks = $(element).attr("href"); const movieLinks = $(element).attr("href");
const title = $(element).text(); const title = $(element).text();
if (movieLinks) { if (movieLinks) {
@@ -111,5 +122,6 @@ const getMeta = async function ({ link, providerContext, }) {
linkList: [], linkList: [],
}; };
} }
});
}; };
exports.getMeta = getMeta; exports.getMeta = getMeta;

29
dist/hdhub4u/posts.js vendored
View File

@@ -1,4 +1,13 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getSearchPosts = exports.getPosts = void 0; exports.getSearchPosts = exports.getPosts = void 0;
const hdbHeaders = { const hdbHeaders = {
@@ -6,28 +15,33 @@ const hdbHeaders = {
Referer: "https://google.com", Referer: "https://google.com",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0",
}; };
const getPosts = async function ({ filter, page, signal, providerContext, }) { const getPosts = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ filter, page, signal, providerContext, }) {
const { getBaseUrl } = providerContext; const { getBaseUrl } = providerContext;
const baseUrl = await getBaseUrl("hdhub"); const baseUrl = yield getBaseUrl("hdhub");
const url = `${baseUrl + filter}/page/${page}/`; const url = `${baseUrl + filter}/page/${page}/`;
return posts({ url, signal, providerContext }); return posts({ url, signal, providerContext });
});
}; };
exports.getPosts = getPosts; exports.getPosts = getPosts;
const getSearchPosts = async function ({ searchQuery, page, signal, providerContext, }) { const getSearchPosts = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ searchQuery, page, signal, providerContext, }) {
const { getBaseUrl } = providerContext; const { getBaseUrl } = providerContext;
const baseUrl = await getBaseUrl("hdhub"); const baseUrl = yield getBaseUrl("hdhub");
const url = `${baseUrl}/page/${page}/?s=${searchQuery}`; const url = `${baseUrl}/page/${page}/?s=${searchQuery}`;
return posts({ url, signal, providerContext }); return posts({ url, signal, providerContext });
});
}; };
exports.getSearchPosts = getSearchPosts; exports.getSearchPosts = getSearchPosts;
async function posts({ url, signal, providerContext, }) { function posts(_a) {
return __awaiter(this, arguments, void 0, function* ({ url, signal, providerContext, }) {
const { cheerio } = providerContext; const { cheerio } = providerContext;
try { try {
const res = await fetch(url, { const res = yield fetch(url, {
headers: hdbHeaders, headers: hdbHeaders,
signal, signal,
}); });
const data = await res.text(); const data = yield res.text();
const $ = cheerio.load(data); const $ = cheerio.load(data);
const catalog = []; const catalog = [];
$(".recent-movies") $(".recent-movies")
@@ -50,4 +64,5 @@ async function posts({ url, signal, providerContext, }) {
console.error("hdhubGetPosts error ", err); console.error("hdhubGetPosts error ", err);
return []; return [];
} }
});
} }

View File

@@ -1,34 +1,45 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getStream = getStream; exports.getStream = getStream;
exports.getRedirectLinks = getRedirectLinks; exports.getRedirectLinks = getRedirectLinks;
exports.decodeString = decodeString; exports.decodeString = decodeString;
async function getStream({ link, signal, providerContext, }) { function getStream(_a) {
return __awaiter(this, arguments, void 0, function* ({ link, signal, providerContext, }) {
var _b, _c, _d, _e;
const { axios, cheerio, extractors, commonHeaders: headers, } = providerContext; const { axios, cheerio, extractors, commonHeaders: headers, } = providerContext;
const { hubcloudExtracter } = extractors; const { hubcloudExtracter } = extractors;
let hubdriveLink = ""; let hubdriveLink = "";
if (link.includes("hubdrive")) { if (link.includes("hubdrive")) {
const hubdriveRes = await axios.get(link, { headers, signal }); const hubdriveRes = yield axios.get(link, { headers, signal });
const hubdriveText = hubdriveRes.data; const hubdriveText = hubdriveRes.data;
const $ = cheerio.load(hubdriveText); const $ = cheerio.load(hubdriveText);
hubdriveLink = hubdriveLink =
$(".btn.btn-primary.btn-user.btn-success1.m-1").attr("href") || link; $(".btn.btn-primary.btn-user.btn-success1.m-1").attr("href") || link;
} }
else { else {
const res = await axios.get(link, { headers, signal }); const res = yield axios.get(link, { headers, signal });
const text = res.data; const text = res.data;
const encryptedString = text.split("s('o','")?.[1]?.split("',180")?.[0]; const encryptedString = (_d = (_c = (_b = text.split("s('o','")) === null || _b === void 0 ? void 0 : _b[1]) === null || _c === void 0 ? void 0 : _c.split("',180")) === null || _d === void 0 ? void 0 : _d[0];
const decodedString = decodeString(encryptedString); const decodedString = decodeString(encryptedString);
link = atob(decodedString?.o); link = atob(decodedString === null || decodedString === void 0 ? void 0 : decodedString.o);
const redirectLink = await getRedirectLinks(link, signal, headers); const redirectLink = yield getRedirectLinks(link, signal, headers);
const redirectLinkRes = await axios.get(redirectLink, { headers, signal }); const redirectLinkRes = yield axios.get(redirectLink, { headers, signal });
const redirectLinkText = redirectLinkRes.data; const redirectLinkText = redirectLinkRes.data;
const $ = cheerio.load(redirectLinkText); const $ = cheerio.load(redirectLinkText);
hubdriveLink = hubdriveLink =
$('h3:contains("1080p")').find("a").attr("href") || $('h3:contains("1080p")').find("a").attr("href") ||
redirectLinkText.match(/href="(https:\/\/hubcloud\.[^\/]+\/drive\/[^"]+)"/)[1]; redirectLinkText.match(/href="(https:\/\/hubcloud\.[^\/]+\/drive\/[^"]+)"/)[1];
if (hubdriveLink.includes("hubdrive")) { if (hubdriveLink.includes("hubdrive")) {
const hubdriveRes = await axios.get(hubdriveLink, { headers, signal }); const hubdriveRes = yield axios.get(hubdriveLink, { headers, signal });
const hubdriveText = hubdriveRes.data; const hubdriveText = hubdriveRes.data;
const $$ = cheerio.load(hubdriveText); const $$ = cheerio.load(hubdriveText);
hubdriveLink = hubdriveLink =
@@ -36,16 +47,17 @@ async function getStream({ link, signal, providerContext, }) {
hubdriveLink; hubdriveLink;
} }
} }
const hubdriveLinkRes = await axios.get(hubdriveLink, { headers, signal }); const hubdriveLinkRes = yield axios.get(hubdriveLink, { headers, signal });
const hubcloudText = hubdriveLinkRes.data; const hubcloudText = hubdriveLinkRes.data;
const hubcloudLink = hubcloudText.match(/<META HTTP-EQUIV="refresh" content="0; url=([^"]+)">/i)?.[1] || hubdriveLink; const hubcloudLink = ((_e = hubcloudText.match(/<META HTTP-EQUIV="refresh" content="0; url=([^"]+)">/i)) === null || _e === void 0 ? void 0 : _e[1]) || hubdriveLink;
try { try {
return await hubcloudExtracter(hubcloudLink, signal); return yield hubcloudExtracter(hubcloudLink, signal);
} }
catch (error) { catch (error) {
console.log("hd hub 4 getStream error: ", error); console.log("hd hub 4 getStream error: ", error);
return []; return [];
} }
});
} }
const encode = function (value) { const encode = function (value) {
return btoa(value.toString()); return btoa(value.toString());
@@ -78,10 +90,11 @@ const abortableTimeout = (ms, { signal } = {}) => {
} }
}); });
}; };
async function getRedirectLinks(link, signal, headers) { function getRedirectLinks(link, signal, headers) {
return __awaiter(this, void 0, void 0, function* () {
try { try {
const res = await fetch(link, { headers, signal }); const res = yield fetch(link, { headers, signal });
const resText = await res.text(); const resText = yield res.text();
var regex = /ck\('_wp_http_\d+','([^']+)'/g; var regex = /ck\('_wp_http_\d+','([^']+)'/g;
var combinedString = ""; var combinedString = "";
var match; var match;
@@ -94,18 +107,18 @@ async function getRedirectLinks(link, signal, headers) {
// console.log(decodedString); // console.log(decodedString);
const data = JSON.parse(decodedString); const data = JSON.parse(decodedString);
console.log(data); console.log(data);
const token = encode(data?.data); const token = encode(data === null || data === void 0 ? void 0 : data.data);
const blogLink = data?.wp_http1 + "?re=" + token; const blogLink = (data === null || data === void 0 ? void 0 : data.wp_http1) + "?re=" + token;
// abort timeout on signal // abort timeout on signal
let wait = abortableTimeout((Number(data?.total_time) + 3) * 1000, { let wait = abortableTimeout((Number(data === null || data === void 0 ? void 0 : data.total_time) + 3) * 1000, {
signal, signal,
}); });
await wait; yield wait;
console.log("blogLink", blogLink); console.log("blogLink", blogLink);
let vcloudLink = "Invalid Request"; let vcloudLink = "Invalid Request";
while (vcloudLink.includes("Invalid Request")) { while (vcloudLink.includes("Invalid Request")) {
const blogRes = await fetch(blogLink, { headers, signal }); const blogRes = yield fetch(blogLink, { headers, signal });
const blogResText = (await blogRes.text()); const blogResText = (yield blogRes.text());
if (blogResText.includes("Invalid Request")) { if (blogResText.includes("Invalid Request")) {
console.log(blogResText); console.log(blogResText);
} }
@@ -121,6 +134,7 @@ async function getRedirectLinks(link, signal, headers) {
console.log("Error in getRedirectLinks", err); console.log("Error in getRedirectLinks", err);
return link; return link;
} }
});
} }
function rot13(str) { function rot13(str) {
return str.replace(/[a-zA-Z]/g, function (char) { return str.replace(/[a-zA-Z]/g, function (char) {

36
dist/hiAnime/meta.js vendored
View File

@@ -1,20 +1,30 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getMeta = void 0; exports.getMeta = void 0;
const getMeta = async function ({ link, providerContext, }) { const getMeta = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ link, providerContext, }) {
try { try {
const { getBaseUrl, axios } = providerContext; const { getBaseUrl, axios } = providerContext;
const baseUrl = await getBaseUrl("consumet"); const baseUrl = yield getBaseUrl("consumet");
const url = `${baseUrl}/anime/zoro/info?id=` + link; const url = `${baseUrl}/anime/zoro/info?id=` + link;
const res = await axios.get(url); const res = yield axios.get(url);
const data = res.data; const data = res.data;
const meta = { const meta = {
title: data.title, title: data.title,
synopsis: data.description, synopsis: data.description,
image: data.image, image: data.image,
tags: [ tags: [
data?.type, data === null || data === void 0 ? void 0 : data.type,
data?.subOrDub === "both" ? "Sub And Dub" : data?.subOrDub, (data === null || data === void 0 ? void 0 : data.subOrDub) === "both" ? "Sub And Dub" : data === null || data === void 0 ? void 0 : data.subOrDub,
], ],
imdbId: "", imdbId: "",
type: data.episodes.length > 0 ? "series" : "movie", type: data.episodes.length > 0 ? "series" : "movie",
@@ -22,10 +32,10 @@ const getMeta = async function ({ link, providerContext, }) {
const linkList = []; const linkList = [];
const subLinks = []; const subLinks = [];
data.episodes.forEach((episode) => { data.episodes.forEach((episode) => {
if (!episode?.isSubbed) { if (!(episode === null || episode === void 0 ? void 0 : episode.isSubbed)) {
return; return;
} }
const title = "Episode " + episode.number + (episode?.isFiller ? " (Filler)" : ""); const title = "Episode " + episode.number + ((episode === null || episode === void 0 ? void 0 : episode.isFiller) ? " (Filler)" : "");
const link = episode.id + "$sub"; const link = episode.id + "$sub";
if (link && title) { if (link && title) {
subLinks.push({ subLinks.push({
@@ -38,13 +48,13 @@ const getMeta = async function ({ link, providerContext, }) {
title: meta.title + " (Sub)", title: meta.title + " (Sub)",
directLinks: subLinks, directLinks: subLinks,
}); });
if (data?.subOrDub === "both") { if ((data === null || data === void 0 ? void 0 : data.subOrDub) === "both") {
const dubLinks = []; const dubLinks = [];
data.episodes.forEach((episode) => { data.episodes.forEach((episode) => {
if (!episode?.isDubbed) { if (!(episode === null || episode === void 0 ? void 0 : episode.isDubbed)) {
return; return;
} }
const title = "Episode " + episode.number + (episode?.isFiller ? " (Filler)" : ""); const title = "Episode " + episode.number + ((episode === null || episode === void 0 ? void 0 : episode.isFiller) ? " (Filler)" : "");
const link = episode.id + "$dub"; const link = episode.id + "$dub";
if (link && title) { if (link && title) {
dubLinks.push({ dubLinks.push({
@@ -58,10 +68,7 @@ const getMeta = async function ({ link, providerContext, }) {
directLinks: dubLinks, directLinks: dubLinks,
}); });
} }
return { return Object.assign(Object.assign({}, meta), { linkList: linkList });
...meta,
linkList: linkList,
};
} }
catch (err) { catch (err) {
console.error(err); console.error(err);
@@ -74,5 +81,6 @@ const getMeta = async function ({ link, providerContext, }) {
linkList: [], linkList: [],
}; };
} }
});
}; };
exports.getMeta = getMeta; exports.getMeta = getMeta;

32
dist/hiAnime/posts.js vendored
View File

@@ -1,26 +1,41 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getSearchPosts = exports.getPosts = void 0; exports.getSearchPosts = exports.getPosts = void 0;
const getPosts = async function ({ filter, page, signal, providerContext, }) { const getPosts = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ filter, page, signal, providerContext, }) {
const { getBaseUrl, axios } = providerContext; const { getBaseUrl, axios } = providerContext;
const baseUrl = await getBaseUrl("consumet"); const baseUrl = yield getBaseUrl("consumet");
const url = `${baseUrl + filter}?page=${page}`; const url = `${baseUrl + filter}?page=${page}`;
return posts({ url, signal, axios }); return posts({ url, signal, axios });
});
}; };
exports.getPosts = getPosts; exports.getPosts = getPosts;
const getSearchPosts = async function ({ searchQuery, page, signal, providerContext, }) { const getSearchPosts = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ searchQuery, page, signal, providerContext, }) {
const { getBaseUrl, axios } = providerContext; const { getBaseUrl, axios } = providerContext;
const baseUrl = await getBaseUrl("consumet"); const baseUrl = yield getBaseUrl("consumet");
const url = `${baseUrl}/anime/zoro/${searchQuery}?page=${page}`; const url = `${baseUrl}/anime/zoro/${searchQuery}?page=${page}`;
return posts({ url, signal, axios }); return posts({ url, signal, axios });
});
}; };
exports.getSearchPosts = getSearchPosts; exports.getSearchPosts = getSearchPosts;
async function posts({ url, signal, axios, }) { function posts(_a) {
return __awaiter(this, arguments, void 0, function* ({ url, signal, axios, }) {
var _b;
try { try {
const res = await axios.get(url, { signal }); const res = yield axios.get(url, { signal });
const data = res.data?.results; const data = (_b = res.data) === null || _b === void 0 ? void 0 : _b.results;
const catalog = []; const catalog = [];
data?.map((element) => { data === null || data === void 0 ? void 0 : data.map((element) => {
const title = element.title; const title = element.title;
const link = element.id; const link = element.id;
const image = element.image; const image = element.image;
@@ -38,4 +53,5 @@ async function posts({ url, signal, axios, }) {
console.error("zoro error ", err); console.error("zoro error ", err);
return []; return [];
} }
});
} }

View File

@@ -1,36 +1,48 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getStream = void 0; exports.getStream = void 0;
const types_1 = require("../types"); const types_1 = require("../types");
const getStream = async function ({ link: id, providerContext, }) { const getStream = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ link: id, providerContext, }) {
try { try {
const { getBaseUrl, axios } = providerContext; const { getBaseUrl, axios } = providerContext;
const baseUrl = await getBaseUrl("consumet"); const baseUrl = yield getBaseUrl("consumet");
const servers = ["vidcloud", "vidstreaming"]; const servers = ["vidcloud", "vidstreaming"];
const url = `${baseUrl}/anime/zoro/watch?episodeId=${id}&server=`; const url = `${baseUrl}/anime/zoro/watch?episodeId=${id}&server=`;
const streamLinks = []; const streamLinks = [];
await Promise.all(servers.map(async (server) => { yield Promise.all(servers.map((server) => __awaiter(this, void 0, void 0, function* () {
var _a, _b;
try { try {
const res = await axios.get(url + server); const res = yield axios.get(url + server);
if (res.data) { if (res.data) {
const subtitles = []; const subtitles = [];
res.data?.subtitles.forEach((sub) => { (_a = res.data) === null || _a === void 0 ? void 0 : _a.subtitles.forEach((sub) => {
if (sub?.lang === "Thumbnails") var _a, _b;
if ((sub === null || sub === void 0 ? void 0 : sub.lang) === "Thumbnails")
return; return;
subtitles.push({ subtitles.push({
language: sub?.lang?.slice(0, 2) || "Und", language: ((_a = sub === null || sub === void 0 ? void 0 : sub.lang) === null || _a === void 0 ? void 0 : _a.slice(0, 2)) || "Und",
uri: sub?.url, uri: sub === null || sub === void 0 ? void 0 : sub.url,
title: sub?.lang || "Undefined", title: (sub === null || sub === void 0 ? void 0 : sub.lang) || "Undefined",
type: sub?.url?.endsWith(".vtt") type: ((_b = sub === null || sub === void 0 ? void 0 : sub.url) === null || _b === void 0 ? void 0 : _b.endsWith(".vtt"))
? types_1.TextTrackType.VTT ? types_1.TextTrackType.VTT
: types_1.TextTrackType.SUBRIP, : types_1.TextTrackType.SUBRIP,
}); });
}); });
res.data?.sources.forEach((source) => { (_b = res.data) === null || _b === void 0 ? void 0 : _b.sources.forEach((source) => {
streamLinks.push({ streamLinks.push({
server: server, server: server,
link: source?.url, link: source === null || source === void 0 ? void 0 : source.url,
type: source?.isM3U8 ? "m3u8" : "mp4", type: (source === null || source === void 0 ? void 0 : source.isM3U8) ? "m3u8" : "mp4",
headers: { headers: {
Referer: "https://megacloud.club/", Referer: "https://megacloud.club/",
Origin: "https://megacloud.club", Origin: "https://megacloud.club",
@@ -43,12 +55,13 @@ const getStream = async function ({ link: id, providerContext, }) {
catch (e) { catch (e) {
console.log(e); console.log(e);
} }
})); })));
return streamLinks; return streamLinks;
} }
catch (err) { catch (err) {
console.error(err); console.error(err);
return []; return [];
} }
});
}; };
exports.getStream = getStream; exports.getStream = getStream;

View File

@@ -32,6 +32,15 @@ var __importStar = (this && this.__importStar) || (function () {
return result; return result;
}; };
})(); })();
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());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) { var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod }; return (mod && mod.__esModule) ? mod : { "default": mod };
}; };
@@ -46,60 +55,62 @@ const decode = function (value) {
} }
return atob(value.toString()); return atob(value.toString());
}; };
async function hubcloudExtracter(link, signal) { function hubcloudExtracter(link, signal) {
return __awaiter(this, void 0, void 0, function* () {
var _a, _b, _c, _d, _e;
try { try {
console.log('hubcloudExtracter', link); console.log('hubcloudExtracter', link);
const baseUrl = link.split('/').slice(0, 3).join('/'); const baseUrl = link.split('/').slice(0, 3).join('/');
const streamLinks = []; const streamLinks = [];
const vLinkRes = await (0, axios_1.default)(`${link}`, { headers: headers_1.headers, signal }); const vLinkRes = yield (0, axios_1.default)(`${link}`, { headers: headers_1.headers, signal });
const vLinkText = vLinkRes.data; const vLinkText = vLinkRes.data;
const $vLink = cheerio.load(vLinkText); const $vLink = cheerio.load(vLinkText);
const vLinkRedirect = vLinkText.match(/var\s+url\s*=\s*'([^']+)';/) || []; const vLinkRedirect = vLinkText.match(/var\s+url\s*=\s*'([^']+)';/) || [];
let vcloudLink = decode(vLinkRedirect[1]?.split('r=')?.[1]) || let vcloudLink = decode((_b = (_a = vLinkRedirect[1]) === null || _a === void 0 ? void 0 : _a.split('r=')) === null || _b === void 0 ? void 0 : _b[1]) ||
vLinkRedirect[1] || vLinkRedirect[1] ||
$vLink('.fa-file-download.fa-lg').parent().attr('href') || $vLink('.fa-file-download.fa-lg').parent().attr('href') ||
link; link;
console.log('vcloudLink', vcloudLink); console.log('vcloudLink', vcloudLink);
if (vcloudLink?.startsWith('/')) { if (vcloudLink === null || vcloudLink === void 0 ? void 0 : vcloudLink.startsWith('/')) {
vcloudLink = `${baseUrl}${vcloudLink}`; vcloudLink = `${baseUrl}${vcloudLink}`;
console.log('New vcloudLink', vcloudLink); console.log('New vcloudLink', vcloudLink);
} }
const vcloudRes = await fetch(vcloudLink, { const vcloudRes = yield fetch(vcloudLink, {
headers: headers_1.headers, headers: headers_1.headers,
signal, signal,
redirect: 'follow', redirect: 'follow',
}); });
const $ = cheerio.load(await vcloudRes.text()); const $ = cheerio.load(yield vcloudRes.text());
// console.log('vcloudRes', $.text()); // console.log('vcloudRes', $.text());
const linkClass = $('.btn-success.btn-lg.h6,.btn-danger,.btn-secondary'); const linkClass = $('.btn-success.btn-lg.h6,.btn-danger,.btn-secondary');
for (const element of linkClass) { for (const element of linkClass) {
const itm = $(element); const itm = $(element);
let link = itm.attr('href') || ''; let link = itm.attr('href') || '';
if (link?.includes('.dev') && !link?.includes('/?id=')) { if ((link === null || link === void 0 ? void 0 : link.includes('.dev')) && !(link === null || link === void 0 ? void 0 : link.includes('/?id='))) {
streamLinks.push({ server: 'Cf Worker', link: link, type: 'mkv' }); streamLinks.push({ server: 'Cf Worker', link: link, type: 'mkv' });
} }
if (link?.includes('pixeld')) { if (link === null || link === void 0 ? void 0 : link.includes('pixeld')) {
if (!link?.includes('api')) { if (!(link === null || link === void 0 ? void 0 : link.includes('api'))) {
const token = link.split('/').pop(); const token = link.split('/').pop();
const baseUrl = link.split('/').slice(0, -2).join('/'); const baseUrl = link.split('/').slice(0, -2).join('/');
link = `${baseUrl}/api/file/${token}?download`; link = `${baseUrl}/api/file/${token}?download`;
} }
streamLinks.push({ server: 'Pixeldrain', link: link, type: 'mkv' }); streamLinks.push({ server: 'Pixeldrain', link: link, type: 'mkv' });
} }
if (link?.includes('hubcloud') || link?.includes('/?id=')) { if ((link === null || link === void 0 ? void 0 : link.includes('hubcloud')) || (link === null || link === void 0 ? void 0 : link.includes('/?id='))) {
try { try {
const newLinkRes = await axios_1.default.head(link, { headers: headers_1.headers, signal }); const newLinkRes = yield axios_1.default.head(link, { headers: headers_1.headers, signal });
const newLink = newLinkRes.request?.responseURL?.split('link=')?.[1] || link; const newLink = ((_e = (_d = (_c = newLinkRes.request) === null || _c === void 0 ? void 0 : _c.responseURL) === null || _d === void 0 ? void 0 : _d.split('link=')) === null || _e === void 0 ? void 0 : _e[1]) || link;
streamLinks.push({ server: 'hubcloud', link: newLink, type: 'mkv' }); streamLinks.push({ server: 'hubcloud', link: newLink, type: 'mkv' });
} }
catch (error) { catch (error) {
console.log('hubcloudExtracter error in hubcloud link: ', error); console.log('hubcloudExtracter error in hubcloud link: ', error);
} }
} }
if (link?.includes('cloudflarestorage')) { if (link === null || link === void 0 ? void 0 : link.includes('cloudflarestorage')) {
streamLinks.push({ server: 'CfStorage', link: link, type: 'mkv' }); streamLinks.push({ server: 'CfStorage', link: link, type: 'mkv' });
} }
if (link?.includes('fastdl')) { if (link === null || link === void 0 ? void 0 : link.includes('fastdl')) {
streamLinks.push({ server: 'FastDl', link: link, type: 'mkv' }); streamLinks.push({ server: 'FastDl', link: link, type: 'mkv' });
} }
if (link.includes('hubcdn')) { if (link.includes('hubcdn')) {
@@ -117,4 +128,5 @@ async function hubcloudExtracter(link, signal) {
console.log('hubcloudExtracter error: ', error); console.log('hubcloudExtracter error: ', error);
return []; return [];
} }
});
} }

View File

@@ -1,18 +1,29 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getEpisodes = void 0; exports.getEpisodes = void 0;
exports.extractKmhdLink = extractKmhdLink; exports.extractKmhdLink = extractKmhdLink;
const getEpisodes = async function ({ url, providerContext, }) { const getEpisodes = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ url, providerContext, }) {
var _b;
const { axios, cheerio } = providerContext; const { axios, cheerio } = providerContext;
const episodesLink = []; const episodesLink = [];
try { try {
if (url.includes("gdflix")) { if (url.includes("gdflix")) {
const baseUrl = url.split("/pack")?.[0]; const baseUrl = (_b = url.split("/pack")) === null || _b === void 0 ? void 0 : _b[0];
const res = await axios.get(url); const res = yield axios.get(url);
const data = res.data; const data = res.data;
const $ = cheerio.load(data); const $ = cheerio.load(data);
const links = $(".list-group-item"); const links = $(".list-group-item");
links?.map((i, link) => { links === null || links === void 0 ? void 0 : links.map((i, link) => {
episodesLink.push({ episodesLink.push({
title: $(link).text() || "", title: $(link).text() || "",
link: baseUrl + $(link).find("a").attr("href") || "", link: baseUrl + $(link).find("a").attr("href") || "",
@@ -23,15 +34,15 @@ const getEpisodes = async function ({ url, providerContext, }) {
} }
} }
if (url.includes("/pack")) { if (url.includes("/pack")) {
const epIds = await extractKmhdEpisodes(url, providerContext); const epIds = yield extractKmhdEpisodes(url, providerContext);
epIds?.forEach((id, index) => { epIds === null || epIds === void 0 ? void 0 : epIds.forEach((id, index) => {
episodesLink.push({ episodesLink.push({
title: `Episode ${index + 1}`, title: `Episode ${index + 1}`,
link: url.split("/pack")[0] + "/file/" + id, link: url.split("/pack")[0] + "/file/" + id,
}); });
}); });
} }
const res = await axios.get(url, { const res = yield axios.get(url, {
headers: { headers: {
Cookie: "_ga_GNR438JY8N=GS1.1.1722240350.5.0.1722240350.0.0.0; _ga=GA1.1.372196696.1722150754; unlocked=true", Cookie: "_ga_GNR438JY8N=GS1.1.1722240350.5.0.1722240350.0.0.0; _ga=GA1.1.372196696.1722150754; unlocked=true",
}, },
@@ -39,7 +50,7 @@ const getEpisodes = async function ({ url, providerContext, }) {
const episodeData = res.data; const episodeData = res.data;
const $ = cheerio.load(episodeData); const $ = cheerio.load(episodeData);
const links = $(".autohyperlink"); const links = $(".autohyperlink");
links?.map((i, link) => { links === null || links === void 0 ? void 0 : links.map((i, link) => {
episodesLink.push({ episodesLink.push({
title: $(link).parent().children().remove().end().text() || "", title: $(link).parent().children().remove().end().text() || "",
link: $(link).attr("href") || "", link: $(link).attr("href") || "",
@@ -51,20 +62,25 @@ const getEpisodes = async function ({ url, providerContext, }) {
console.error(err); console.error(err);
return []; return [];
} }
});
}; };
exports.getEpisodes = getEpisodes; exports.getEpisodes = getEpisodes;
async function extractKmhdLink(katlink, providerContext) { function extractKmhdLink(katlink, providerContext) {
return __awaiter(this, void 0, void 0, function* () {
const { axios } = providerContext; const { axios } = providerContext;
const res = await axios.get(katlink); const res = yield axios.get(katlink);
const data = res.data; const data = res.data;
const hubDriveRes = data.match(/hubdrive_res:\s*"([^"]+)"/)[1]; const hubDriveRes = data.match(/hubdrive_res:\s*"([^"]+)"/)[1];
const hubDriveLink = data.match(/hubdrive_res\s*:\s*{[^}]*?link\s*:\s*"([^"]+)"/)[1]; const hubDriveLink = data.match(/hubdrive_res\s*:\s*{[^}]*?link\s*:\s*"([^"]+)"/)[1];
return hubDriveLink + hubDriveRes; return hubDriveLink + hubDriveRes;
});
} }
async function extractKmhdEpisodes(katlink, providerContext) { function extractKmhdEpisodes(katlink, providerContext) {
return __awaiter(this, void 0, void 0, function* () {
const { axios } = providerContext; const { axios } = providerContext;
const res = await axios.get(katlink); const res = yield axios.get(katlink);
const data = res.data; const data = res.data;
const ids = data.match(/[\w]+_[a-f0-9]{8}/g); const ids = data.match(/[\w]+_[a-f0-9]{8}/g);
return ids; return ids;
});
} }

View File

@@ -1,20 +1,30 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getMeta = void 0; exports.getMeta = void 0;
const getMeta = async function ({ link, providerContext, }) { const getMeta = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ link, providerContext, }) {
var _b;
try { try {
const { axios, cheerio } = providerContext; const { axios, cheerio } = providerContext;
const url = link; const url = link;
const res = await axios.get(url); const res = yield axios.get(url);
const data = res.data; const data = res.data;
const $ = cheerio.load(data); const $ = cheerio.load(data);
const container = $(".yQ8hqd.ksSzJd.LoQAYe").html() const container = $(".yQ8hqd.ksSzJd.LoQAYe").html()
? $(".yQ8hqd.ksSzJd.LoQAYe") ? $(".yQ8hqd.ksSzJd.LoQAYe")
: $(".FxvUNb"); : $(".FxvUNb");
const imdbId = container const imdbId = ((_b = container
.find('a[href*="imdb.com/title/tt"]:not([href*="imdb.com/title/tt/"])') .find('a[href*="imdb.com/title/tt"]:not([href*="imdb.com/title/tt/"])')
.attr("href") .attr("href")) === null || _b === void 0 ? void 0 : _b.split("/")[4]) || "";
?.split("/")[4] || "";
const title = container const title = container
.find('li:contains("Name")') .find('li:contains("Name")')
.children() .children()
@@ -57,10 +67,11 @@ const getMeta = async function ({ link, providerContext, }) {
.nextUntil("div") .nextUntil("div")
.filter("h2") .filter("h2")
.each((i, element) => { .each((i, element) => {
var _a;
const link = $(element).find("a").attr("href"); const link = $(element).find("a").attr("href");
const quality = $(element) const quality = ((_a = $(element)
.text() .text()
.match(/\b(480p|720p|1080p|2160p)\b/i)?.[0] || ""; .match(/\b(480p|720p|1080p|2160p)\b/i)) === null || _a === void 0 ? void 0 : _a[0]) || "";
const title = $(element).text(); const title = $(element).text();
if (link && title.includes("")) { if (link && title.includes("")) {
links.push({ links.push({
@@ -76,10 +87,11 @@ const getMeta = async function ({ link, providerContext, }) {
.nextUntil("pre,div") .nextUntil("pre,div")
.filter("h2") .filter("h2")
.each((i, element) => { .each((i, element) => {
var _a;
const link = $(element).find("a").attr("href"); const link = $(element).find("a").attr("href");
const quality = $(element) const quality = ((_a = $(element)
.text() .text()
.match(/\b(480p|720p|1080p|2160p)\b/i)?.[0] || ""; .match(/\b(480p|720p|1080p|2160p)\b/i)) === null || _a === void 0 ? void 0 : _a[0]) || "";
const title = $(element).text(); const title = $(element).text();
if (link && !title.includes("Online")) { if (link && !title.includes("Online")) {
links.push({ links.push({
@@ -111,5 +123,6 @@ const getMeta = async function ({ link, providerContext, }) {
linkList: [], linkList: [],
}; };
} }
});
}; };
exports.getMeta = getMeta; exports.getMeta = getMeta;

View File

@@ -1,24 +1,38 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getSearchPosts = exports.getPosts = void 0; exports.getSearchPosts = exports.getPosts = void 0;
const getPosts = async function ({ filter, page, signal, providerContext, }) { const getPosts = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ filter, page, signal, providerContext, }) {
const { getBaseUrl, cheerio } = providerContext; const { getBaseUrl, cheerio } = providerContext;
const baseUrl = await getBaseUrl("kat"); const baseUrl = yield getBaseUrl("kat");
const url = `${baseUrl + filter}/page/${page}/`; const url = `${baseUrl + filter}/page/${page}/`;
return posts({ url, signal, cheerio }); return posts({ url, signal, cheerio });
});
}; };
exports.getPosts = getPosts; exports.getPosts = getPosts;
const getSearchPosts = async function ({ searchQuery, page, signal, providerContext, }) { const getSearchPosts = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ searchQuery, page, signal, providerContext, }) {
const { getBaseUrl, cheerio } = providerContext; const { getBaseUrl, cheerio } = providerContext;
const baseUrl = await getBaseUrl("kat"); const baseUrl = yield getBaseUrl("kat");
const url = `${baseUrl}/page/${page}/?s=${searchQuery}`; const url = `${baseUrl}/page/${page}/?s=${searchQuery}`;
return posts({ url, signal, cheerio }); return posts({ url, signal, cheerio });
});
}; };
exports.getSearchPosts = getSearchPosts; exports.getSearchPosts = getSearchPosts;
async function posts({ url, signal, cheerio, }) { function posts(_a) {
return __awaiter(this, arguments, void 0, function* ({ url, signal, cheerio, }) {
try { try {
const res = await fetch(url, { signal }); const res = yield fetch(url, { signal });
const data = await res.text(); const data = yield res.text();
const $ = cheerio.load(data); const $ = cheerio.load(data);
const catalog = []; const catalog = [];
$(".recent-posts") $(".recent-posts")
@@ -41,4 +55,5 @@ async function posts({ url, signal, cheerio, }) {
console.error("katmovies error ", err); console.error("katmovies error ", err);
return []; return [];
} }
});
} }

View File

@@ -1,33 +1,45 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getStream = void 0; exports.getStream = void 0;
async function extractKmhdLink(katlink, providerContext) { function extractKmhdLink(katlink, providerContext) {
return __awaiter(this, void 0, void 0, function* () {
const { axios } = providerContext; const { axios } = providerContext;
const res = await axios.get(katlink); const res = yield axios.get(katlink);
const data = res.data; const data = res.data;
const hubDriveRes = data.match(/hubdrive_res:\s*"([^"]+)"/)[1]; const hubDriveRes = data.match(/hubdrive_res:\s*"([^"]+)"/)[1];
const hubDriveLink = data.match(/hubdrive_res\s*:\s*{[^}]*?link\s*:\s*"([^"]+)"/)[1]; const hubDriveLink = data.match(/hubdrive_res\s*:\s*{[^}]*?link\s*:\s*"([^"]+)"/)[1];
return hubDriveLink + hubDriveRes; return hubDriveLink + hubDriveRes;
});
} }
const getStream = async function ({ link, signal, providerContext, }) { const getStream = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ link, signal, providerContext, }) {
const { axios, cheerio, extractors } = providerContext; const { axios, cheerio, extractors } = providerContext;
const { hubcloudExtracter, gdFlixExtracter } = extractors; const { hubcloudExtracter, gdFlixExtracter } = extractors;
const streamLinks = []; const streamLinks = [];
console.log("katGetStream", link); console.log("katGetStream", link);
try { try {
if (link.includes("gdflix")) { if (link.includes("gdflix")) {
return await gdFlixExtracter(link, signal); return yield gdFlixExtracter(link, signal);
} }
if (link.includes("kmhd")) { if (link.includes("kmhd")) {
const hubcloudLink = await extractKmhdLink(link, providerContext); const hubcloudLink = yield extractKmhdLink(link, providerContext);
return await hubcloudExtracter(hubcloudLink, signal); return yield hubcloudExtracter(hubcloudLink, signal);
} }
if (link.includes("gdflix")) { if (link.includes("gdflix")) {
// resume link // resume link
try { try {
const resumeDrive = link.replace("/file", "/zfile"); const resumeDrive = link.replace("/file", "/zfile");
// console.log('resumeDrive', resumeDrive); // console.log('resumeDrive', resumeDrive);
const resumeDriveRes = await axios.get(resumeDrive); const resumeDriveRes = yield axios.get(resumeDrive);
const resumeDriveHtml = resumeDriveRes.data; const resumeDriveHtml = resumeDriveRes.data;
const $resumeDrive = cheerio.load(resumeDriveHtml); const $resumeDrive = cheerio.load(resumeDriveHtml);
const resumeLink = $resumeDrive(".btn-success").attr("href"); const resumeLink = $resumeDrive(".btn-success").attr("href");
@@ -45,7 +57,7 @@ const getStream = async function ({ link, signal, providerContext, }) {
} }
//instant link //instant link
try { try {
const driveres = await axios.get(link, { timeout: 10000 }); const driveres = yield axios.get(link, { timeout: 10000 });
const $drive = cheerio.load(driveres.data); const $drive = cheerio.load(driveres.data);
const seed = $drive(".btn-danger").attr("href") || ""; const seed = $drive(".btn-danger").attr("href") || "";
const instantToken = seed.split("=")[1]; const instantToken = seed.split("=")[1];
@@ -54,14 +66,14 @@ const getStream = async function ({ link, signal, providerContext, }) {
InstantFromData.append("keys", instantToken); InstantFromData.append("keys", instantToken);
const videoSeedUrl = seed.split("/").slice(0, 3).join("/") + "/api"; const videoSeedUrl = seed.split("/").slice(0, 3).join("/") + "/api";
// console.log('videoSeedUrl', videoSeedUrl); // console.log('videoSeedUrl', videoSeedUrl);
const instantLinkRes = await fetch(videoSeedUrl, { const instantLinkRes = yield fetch(videoSeedUrl, {
method: "POST", method: "POST",
body: InstantFromData, body: InstantFromData,
headers: { headers: {
"x-token": videoSeedUrl, "x-token": videoSeedUrl,
}, },
}); });
const instantLinkData = await instantLinkRes.json(); const instantLinkData = yield instantLinkRes.json();
console.log("instantLinkData", instantLinkData); console.log("instantLinkData", instantLinkData);
if (instantLinkData.error === false) { if (instantLinkData.error === false) {
const instantLink = instantLinkData.url; const instantLink = instantLinkData.url;
@@ -80,12 +92,13 @@ const getStream = async function ({ link, signal, providerContext, }) {
} }
return streamLinks; return streamLinks;
} }
const stereams = await hubcloudExtracter(link, signal); const stereams = yield hubcloudExtracter(link, signal);
return stereams; return stereams;
} }
catch (error) { catch (error) {
console.log("katgetStream error: ", error); console.log("katgetStream error: ", error);
return []; return [];
} }
});
}; };
exports.getStream = getStream; exports.getStream = getStream;

30
dist/kissKh/meta.js vendored
View File

@@ -1,24 +1,36 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getMeta = void 0; exports.getMeta = void 0;
const getMeta = async function ({ link, providerContext, }) { const getMeta = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ link, providerContext, }) {
var _b, _c;
try { try {
const { axios } = providerContext; const { axios } = providerContext;
const res = await axios.get(link); const res = yield axios.get(link);
const data = res.data; const data = res.data;
const meta = { const meta = {
title: data.title, title: data.title,
synopsis: data.description, synopsis: data.description,
image: data.thumbnail, image: data.thumbnail,
tags: [data?.releaseDate?.split("-")[0], data?.status, data?.type], tags: [(_b = data === null || data === void 0 ? void 0 : data.releaseDate) === null || _b === void 0 ? void 0 : _b.split("-")[0], data === null || data === void 0 ? void 0 : data.status, data === null || data === void 0 ? void 0 : data.type],
imdbId: "", imdbId: "",
type: data.episodesCount > 1 ? "series" : "movie", type: data.episodesCount > 1 ? "series" : "movie",
}; };
const linkList = []; const linkList = [];
const subLinks = []; const subLinks = [];
data?.episodes?.reverse().map((episode) => { (_c = data === null || data === void 0 ? void 0 : data.episodes) === null || _c === void 0 ? void 0 : _c.reverse().map((episode) => {
const title = "Episode " + episode?.number; var _a;
const link = episode?.id?.toString(); const title = "Episode " + (episode === null || episode === void 0 ? void 0 : episode.number);
const link = (_a = episode === null || episode === void 0 ? void 0 : episode.id) === null || _a === void 0 ? void 0 : _a.toString();
if (link && title) { if (link && title) {
subLinks.push({ subLinks.push({
title, title,
@@ -30,10 +42,7 @@ const getMeta = async function ({ link, providerContext, }) {
title: meta.title, title: meta.title,
directLinks: subLinks, directLinks: subLinks,
}); });
return { return Object.assign(Object.assign({}, meta), { linkList: linkList });
...meta,
linkList: linkList,
};
} }
catch (err) { catch (err) {
console.error(err); console.error(err);
@@ -46,5 +55,6 @@ const getMeta = async function ({ link, providerContext, }) {
linkList: [], linkList: [],
}; };
} }
});
}; };
exports.getMeta = getMeta; exports.getMeta = getMeta;

36
dist/kissKh/posts.js vendored
View File

@@ -1,17 +1,28 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getSearchPosts = exports.getPosts = void 0; exports.getSearchPosts = exports.getPosts = void 0;
const getPosts = async function ({ filter, signal, providerContext, }) { const getPosts = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ filter, signal, providerContext, }) {
var _b;
const { getBaseUrl, axios } = providerContext; const { getBaseUrl, axios } = providerContext;
const baseUrl = await getBaseUrl("kissKh"); const baseUrl = yield getBaseUrl("kissKh");
const url = `${baseUrl + filter}&type=0`; const url = `${baseUrl + filter}&type=0`;
try { try {
const res = await axios.get(url, { signal }); const res = yield axios.get(url, { signal });
const data = res.data?.data; const data = (_b = res.data) === null || _b === void 0 ? void 0 : _b.data;
const catalog = []; const catalog = [];
data?.map((element) => { data === null || data === void 0 ? void 0 : data.map((element) => {
const title = element.title; const title = element.title;
const link = baseUrl + `/api/DramaList/Drama/${element?.id}?isq=false`; const link = baseUrl + `/api/DramaList/Drama/${element === null || element === void 0 ? void 0 : element.id}?isq=false`;
const image = element.thumbnail; const image = element.thumbnail;
if (title && link && image) { if (title && link && image) {
catalog.push({ catalog.push({
@@ -27,19 +38,21 @@ const getPosts = async function ({ filter, signal, providerContext, }) {
console.error("kiss error ", err); console.error("kiss error ", err);
return []; return [];
} }
});
}; };
exports.getPosts = getPosts; exports.getPosts = getPosts;
const getSearchPosts = async function ({ searchQuery, signal, providerContext, }) { const getSearchPosts = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ searchQuery, signal, providerContext, }) {
const { getBaseUrl, axios } = providerContext; const { getBaseUrl, axios } = providerContext;
const baseUrl = await getBaseUrl("kissKh"); const baseUrl = yield getBaseUrl("kissKh");
const url = `${baseUrl}/api/DramaList/Search?q=${searchQuery}&type=0`; const url = `${baseUrl}/api/DramaList/Search?q=${searchQuery}&type=0`;
try { try {
const res = await axios.get(url, { signal }); const res = yield axios.get(url, { signal });
const data = res.data; const data = res.data;
const catalog = []; const catalog = [];
data?.map((element) => { data === null || data === void 0 ? void 0 : data.map((element) => {
const title = element.title; const title = element.title;
const link = baseUrl + `/api/DramaList/Drama/${element?.id}?isq=false`; const link = baseUrl + `/api/DramaList/Drama/${element === null || element === void 0 ? void 0 : element.id}?isq=false`;
const image = element.thumbnail; const image = element.thumbnail;
if (title && link && image) { if (title && link && image) {
catalog.push({ catalog.push({
@@ -55,5 +68,6 @@ const getSearchPosts = async function ({ searchQuery, signal, providerContext, }
console.error("kiss error ", err); console.error("kiss error ", err);
return []; return [];
} }
});
}; };
exports.getSearchPosts = getSearchPosts; exports.getSearchPosts = getSearchPosts;

33
dist/kissKh/stream.js vendored
View File

@@ -1,26 +1,38 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getStream = void 0; exports.getStream = void 0;
const types_1 = require("../types"); const types_1 = require("../types");
const getStream = async function ({ link: id, providerContext, }) { const getStream = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ link: id, providerContext, }) {
var _b, _c, _d;
try { try {
const { axios, getBaseUrl } = providerContext; const { axios, getBaseUrl } = providerContext;
const streamLinks = []; const streamLinks = [];
const subtitles = []; const subtitles = [];
const baseUrl = await getBaseUrl("kissKh"); const baseUrl = yield getBaseUrl("kissKh");
const streamUrl = "https://adorable-salamander-ecbb21.netlify.app/api/kisskh/video?id=" + const streamUrl = "https://adorable-salamander-ecbb21.netlify.app/api/kisskh/video?id=" +
id; id;
const res = await axios.get(streamUrl); const res = yield axios.get(streamUrl);
const stream = res.data?.source?.Video; const stream = (_c = (_b = res.data) === null || _b === void 0 ? void 0 : _b.source) === null || _c === void 0 ? void 0 : _c.Video;
const subData = res.data?.subtitles; const subData = (_d = res.data) === null || _d === void 0 ? void 0 : _d.subtitles;
subData?.map((sub) => { subData === null || subData === void 0 ? void 0 : subData.map((sub) => {
var _a;
subtitles.push({ subtitles.push({
title: sub?.label, title: sub === null || sub === void 0 ? void 0 : sub.label,
language: sub?.land, language: sub === null || sub === void 0 ? void 0 : sub.land,
type: sub?.src?.includes(".vtt") type: ((_a = sub === null || sub === void 0 ? void 0 : sub.src) === null || _a === void 0 ? void 0 : _a.includes(".vtt"))
? types_1.TextTrackType.VTT ? types_1.TextTrackType.VTT
: types_1.TextTrackType.SUBRIP, : types_1.TextTrackType.SUBRIP,
uri: sub?.src, uri: sub === null || sub === void 0 ? void 0 : sub.src,
}); });
}); });
streamLinks.push({ streamLinks.push({
@@ -38,5 +50,6 @@ const getStream = async function ({ link: id, providerContext, }) {
console.error(err); console.error(err);
return []; return [];
} }
});
}; };
exports.getStream = getStream; exports.getStream = getStream;

View File

@@ -1,11 +1,21 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getEpisodes = void 0; exports.getEpisodes = void 0;
const getEpisodes = async function ({ url, providerContext, }) { const getEpisodes = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ url, providerContext, }) {
const { axios, cheerio, commonHeaders: headers } = providerContext; const { axios, cheerio, commonHeaders: headers } = providerContext;
console.log("getEpisodeLinks", url); console.log("getEpisodeLinks", url);
try { try {
const res = await axios.get(url, { headers }); const res = yield axios.get(url, { headers });
const $ = cheerio.load(res.data); const $ = cheerio.load(res.data);
const container = $(".entry-content,.entry-inner"); const container = $(".entry-content,.entry-inner");
$(".unili-content,.code-block-1").remove(); $(".unili-content,.code-block-1").remove();
@@ -30,5 +40,6 @@ const getEpisodes = async function ({ url, providerContext, }) {
// console.error(err); // console.error(err);
return []; return [];
} }
});
}; };
exports.getEpisodes = getEpisodes; exports.getEpisodes = getEpisodes;

View File

@@ -1,4 +1,13 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getMeta = void 0; exports.getMeta = void 0;
const headers = { const headers = {
@@ -17,88 +26,69 @@ const headers = {
"Upgrade-Insecure-Requests": "1", "Upgrade-Insecure-Requests": "1",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0",
}; };
const getMeta = async ({ link, providerContext, }) => { const getMeta = (_a) => __awaiter(void 0, [_a], void 0, function* ({ link, providerContext, }) {
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
try { try {
const { axios, cheerio } = providerContext; const { axios, cheerio } = providerContext;
const url = link; const url = link;
console.log("url", url); console.log("url", url);
const baseUrl = url.split("/").slice(0, 3).join("/"); const baseUrl = url.split("/").slice(0, 3).join("/");
const response = await axios.get(url, { const response = yield axios.get(url, {
headers: { headers: Object.assign(Object.assign({}, headers), { Referer: baseUrl }),
...headers,
Referer: baseUrl,
},
}); });
const $ = cheerio.load(response.data); const $ = cheerio.load(response.data);
const infoContainer = $(".entry-content,.post-inner"); const infoContainer = $(".entry-content,.post-inner");
const heading = infoContainer?.find("h3"); const heading = infoContainer === null || infoContainer === void 0 ? void 0 : infoContainer.find("h3");
const imdbId = const imdbId =
//@ts-ignore //@ts-ignore
heading?.next("p")?.find("a")?.[0]?.attribs?.href?.match(/tt\d+/g)?.[0] || ((_g = (_f = (_e = (_d = (_c = (_b = heading === null || heading === void 0 ? void 0 : heading.next("p")) === null || _b === void 0 ? void 0 : _b.find("a")) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.attribs) === null || _e === void 0 ? void 0 : _e.href) === null || _f === void 0 ? void 0 : _f.match(/tt\d+/g)) === null || _g === void 0 ? void 0 : _g[0]) ||
infoContainer.text().match(/tt\d+/g)?.[0] || ((_h = infoContainer.text().match(/tt\d+/g)) === null || _h === void 0 ? void 0 : _h[0]) ||
""; "";
// console.log(imdbId) // console.log(imdbId)
const type = heading?.next("p")?.text()?.includes("Series Name") const type = ((_k = (_j = heading === null || heading === void 0 ? void 0 : heading.next("p")) === null || _j === void 0 ? void 0 : _j.text()) === null || _k === void 0 ? void 0 : _k.includes("Series Name"))
? "series" ? "series"
: "movie"; : "movie";
// console.log(type); // console.log(type);
// title // title
const titleRegex = /Name: (.+)/; const titleRegex = /Name: (.+)/;
const title = heading?.next("p")?.text()?.match(titleRegex)?.[1] || ""; const title = ((_o = (_m = (_l = heading === null || heading === void 0 ? void 0 : heading.next("p")) === null || _l === void 0 ? void 0 : _l.text()) === null || _m === void 0 ? void 0 : _m.match(titleRegex)) === null || _o === void 0 ? void 0 : _o[1]) || "";
// console.log(title); // console.log(title);
// synopsis // synopsis
const synopsisNode = //@ts-ignore const synopsisNode = //@ts-ignore
infoContainer?.find("p")?.next("h3,h4")?.next("p")?.[0]?.children?.[0]; (_t = (_s = (_r = (_q = (_p = infoContainer === null || infoContainer === void 0 ? void 0 : infoContainer.find("p")) === null || _p === void 0 ? void 0 : _p.next("h3,h4")) === null || _q === void 0 ? void 0 : _q.next("p")) === null || _r === void 0 ? void 0 : _r[0]) === null || _s === void 0 ? void 0 : _s.children) === null || _t === void 0 ? void 0 : _t[0];
const synopsis = synopsisNode && "data" in synopsisNode ? synopsisNode.data : ""; const synopsis = synopsisNode && "data" in synopsisNode ? synopsisNode.data : "";
// console.log(synopsis); // console.log(synopsis);
// image // image
let image = infoContainer?.find("img[data-lazy-src]")?.attr("data-lazy-src") || ""; let image = ((_u = infoContainer === null || infoContainer === void 0 ? void 0 : infoContainer.find("img[data-lazy-src]")) === null || _u === void 0 ? void 0 : _u.attr("data-lazy-src")) || "";
if (image.startsWith("//")) { if (image.startsWith("//")) {
image = "https:" + image; image = "https:" + image;
} }
// console.log(image); // console.log(image);
// console.log({title, synopsis, image, imdbId, type}); // console.log({title, synopsis, image, imdbId, type});
/// Links /// Links
const hr = infoContainer?.first()?.find("hr"); const hr = (_v = infoContainer === null || infoContainer === void 0 ? void 0 : infoContainer.first()) === null || _v === void 0 ? void 0 : _v.find("hr");
const list = hr?.nextUntil("hr"); const list = hr === null || hr === void 0 ? void 0 : hr.nextUntil("hr");
const links = []; const links = [];
list.each((index, element) => { list.each((index, element) => {
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
element = $(element); element = $(element);
// title // title
const title = element?.text() || ""; const title = (element === null || element === void 0 ? void 0 : element.text()) || "";
const quality = element?.text().match(/\d+p\b/)?.[0] || ""; const quality = ((_a = element === null || element === void 0 ? void 0 : element.text().match(/\d+p\b/)) === null || _a === void 0 ? void 0 : _a[0]) || "";
// console.log(title); // console.log(title);
// movieLinks // movieLinks
const movieLinks = element const movieLinks = (element === null || element === void 0 ? void 0 : element.next().find(".dwd-button").text().toLowerCase().includes("download"))
?.next() ? (_c = (_b = element === null || element === void 0 ? void 0 : element.next().find(".dwd-button")) === null || _b === void 0 ? void 0 : _b.parent()) === null || _c === void 0 ? void 0 : _c.attr("href")
.find(".dwd-button")
.text()
.toLowerCase()
.includes("download")
? element?.next().find(".dwd-button")?.parent()?.attr("href")
: ""; : "";
// episode links // episode links
const vcloudLinks = element const vcloudLinks = (_e = (_d = element === null || element === void 0 ? void 0 : element.next().find(".btn-outline[style='background:linear-gradient(135deg,#ed0b0b,#f2d152); color: white;'],.btn-outline[style='background:linear-gradient(135deg,#ed0b0b,#f2d152); color: #fdf8f2;']")) === null || _d === void 0 ? void 0 : _d.parent()) === null || _e === void 0 ? void 0 : _e.attr("href");
?.next()
.find(".btn-outline[style='background:linear-gradient(135deg,#ed0b0b,#f2d152); color: white;'],.btn-outline[style='background:linear-gradient(135deg,#ed0b0b,#f2d152); color: #fdf8f2;']")
?.parent()
?.attr("href");
console.log(title); console.log(title);
const episodesLink = (vcloudLinks const episodesLink = (vcloudLinks
? vcloudLinks ? vcloudLinks
: element : (element === null || element === void 0 ? void 0 : element.next().find(".dwd-button").text().toLowerCase().includes("episode"))
?.next() ? (_g = (_f = element === null || element === void 0 ? void 0 : element.next().find(".dwd-button")) === null || _f === void 0 ? void 0 : _f.parent()) === null || _g === void 0 ? void 0 : _g.attr("href")
.find(".dwd-button")
.text()
.toLowerCase()
.includes("episode")
? element?.next().find(".dwd-button")?.parent()?.attr("href")
: "") || : "") ||
element ((_j = (_h = element === null || element === void 0 ? void 0 : element.next().find(".btn-outline[style='background:linear-gradient(135deg,#0ebac3,#09d261); color: white;']")) === null || _h === void 0 ? void 0 : _h.parent()) === null || _j === void 0 ? void 0 : _j.attr("href"));
?.next()
.find(".btn-outline[style='background:linear-gradient(135deg,#0ebac3,#09d261); color: white;']")
?.parent()
?.attr("href");
if (movieLinks || episodesLink) { if (movieLinks || episodesLink) {
links.push({ links.push({
title, title,
@@ -133,5 +123,5 @@ const getMeta = async ({ link, providerContext, }) => {
linkList: [], linkList: [],
}; };
} }
}; });
exports.getMeta = getMeta; exports.getMeta = getMeta;

View File

@@ -1,4 +1,13 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getSearchPosts = exports.getPosts = void 0; exports.getSearchPosts = exports.getPosts = void 0;
const headers = { const headers = {
@@ -17,42 +26,39 @@ const headers = {
"Upgrade-Insecure-Requests": "1", "Upgrade-Insecure-Requests": "1",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0",
}; };
const getPosts = async ({ filter, page, providerValue, signal, providerContext, }) => { const getPosts = (_a) => __awaiter(void 0, [_a], void 0, function* ({ filter, page, providerValue, signal, providerContext, }) {
const { getBaseUrl } = providerContext; const { getBaseUrl } = providerContext;
const baseUrl = await getBaseUrl("lux"); const baseUrl = yield getBaseUrl("lux");
console.log("vegaGetPosts baseUrl:", providerValue, baseUrl); console.log("vegaGetPosts baseUrl:", providerValue, baseUrl);
const url = `${baseUrl}/${filter}/page/${page}/`; const url = `${baseUrl}/${filter}/page/${page}/`;
console.log("lux url:", url); console.log("lux url:", url);
return posts(url, signal, providerContext); return posts(url, signal, providerContext);
}; });
exports.getPosts = getPosts; exports.getPosts = getPosts;
const getSearchPosts = async ({ searchQuery, page, providerValue, signal, providerContext, }) => { const getSearchPosts = (_a) => __awaiter(void 0, [_a], void 0, function* ({ searchQuery, page, providerValue, signal, providerContext, }) {
const { getBaseUrl } = providerContext; const { getBaseUrl } = providerContext;
const baseUrl = await getBaseUrl("lux"); const baseUrl = yield getBaseUrl("lux");
console.log("vegaGetPosts baseUrl:", providerValue, baseUrl); console.log("vegaGetPosts baseUrl:", providerValue, baseUrl);
const url = `${baseUrl}/page/${page}/?s=${searchQuery}`; const url = `${baseUrl}/page/${page}/?s=${searchQuery}`;
console.log("lux url:", url); console.log("lux url:", url);
return posts(url, signal, providerContext); return posts(url, signal, providerContext);
}; });
exports.getSearchPosts = getSearchPosts; exports.getSearchPosts = getSearchPosts;
async function posts(url, signal, providerContext) { function posts(url, signal, providerContext) {
return __awaiter(this, void 0, void 0, function* () {
var _a, _b;
try { try {
const { axios, cheerio } = providerContext; const { axios, cheerio } = providerContext;
const urlRes = await axios.get(url, { headers, signal }); const urlRes = yield axios.get(url, { headers, signal });
const $ = cheerio.load(urlRes.data); const $ = cheerio.load(urlRes.data);
const posts = []; const posts = [];
$(".blog-items") (_b = (_a = $(".blog-items")) === null || _a === void 0 ? void 0 : _a.children("article")) === null || _b === void 0 ? void 0 : _b.each((index, element) => {
?.children("article") var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
?.each((index, element) => {
const post = { const post = {
title: $(element) title: ((_e = (_d = (_c = (_b = (_a = $(element)) === null || _a === void 0 ? void 0 : _a.find("a")) === null || _b === void 0 ? void 0 : _b.attr("title")) === null || _c === void 0 ? void 0 : _c.replace("Download", "")) === null || _d === void 0 ? void 0 : _d.match(/^(.*?)\s*\((\d{4})\)|^(.*?)\s*\((Season \d+)\)/)) === null || _e === void 0 ? void 0 : _e[0]) ||
?.find("a") ((_h = (_g = (_f = $(element)) === null || _f === void 0 ? void 0 : _f.find("a")) === null || _g === void 0 ? void 0 : _g.attr("title")) === null || _h === void 0 ? void 0 : _h.replace("Download", "")) ||
?.attr("title")
?.replace("Download", "")
?.match(/^(.*?)\s*\((\d{4})\)|^(.*?)\s*\((Season \d+)\)/)?.[0] ||
$(element)?.find("a")?.attr("title")?.replace("Download", "") ||
"", "",
link: $(element)?.find("a")?.attr("href") || "", link: ((_k = (_j = $(element)) === null || _j === void 0 ? void 0 : _j.find("a")) === null || _k === void 0 ? void 0 : _k.attr("href")) || "",
image: $(element).find("a").find("img").attr("data-lazy-src") || image: $(element).find("a").find("img").attr("data-lazy-src") ||
$(element).find("a").find("img").attr("data-src") || $(element).find("a").find("img").attr("data-src") ||
$(element).find("a").find("img").attr("src") || $(element).find("a").find("img").attr("src") ||
@@ -70,4 +76,5 @@ async function posts(url, signal, providerContext) {
console.error("vegaGetPosts error:", error); console.error("vegaGetPosts error:", error);
return []; return [];
} }
});
} }

View File

@@ -1,4 +1,13 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getStream = getStream; exports.getStream = getStream;
const headers = { const headers = {
@@ -17,7 +26,9 @@ const headers = {
"Upgrade-Insecure-Requests": "1", "Upgrade-Insecure-Requests": "1",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0",
}; };
async function getStream({ link, type, signal, providerContext, }) { function getStream(_a) {
return __awaiter(this, arguments, void 0, function* ({ link, type, signal, providerContext, }) {
var _b, _c, _d, _e;
const { axios, cheerio, extractors } = providerContext; const { axios, cheerio, extractors } = providerContext;
const { hubcloudExtracter } = extractors; const { hubcloudExtracter } = extractors;
try { try {
@@ -25,7 +36,7 @@ async function getStream({ link, type, signal, providerContext, }) {
console.log("dotlink", link); console.log("dotlink", link);
if (type === "movie") { if (type === "movie") {
// vlink // vlink
const dotlinkRes = await axios(`${link}`, { headers }); const dotlinkRes = yield axios(`${link}`, { headers });
const dotlinkText = dotlinkRes.data; const dotlinkText = dotlinkRes.data;
// console.log('dotlinkText', dotlinkText); // console.log('dotlinkText', dotlinkText);
const vlink = dotlinkText.match(/<a\s+href="([^"]*cloud\.[^"]*)"/i) || []; const vlink = dotlinkText.match(/<a\s+href="([^"]*cloud\.[^"]*)"/i) || [];
@@ -38,14 +49,11 @@ async function getStream({ link, type, signal, providerContext, }) {
.parent() .parent()
.attr("href"); .attr("href");
// console.log('filepressLink', filepressLink); // console.log('filepressLink', filepressLink);
const filepressID = filepressLink?.split("/").pop(); const filepressID = filepressLink === null || filepressLink === void 0 ? void 0 : filepressLink.split("/").pop();
const filepressBaseUrl = filepressLink const filepressBaseUrl = filepressLink === null || filepressLink === void 0 ? void 0 : filepressLink.split("/").slice(0, -2).join("/");
?.split("/")
.slice(0, -2)
.join("/");
// console.log('filepressID', filepressID); // console.log('filepressID', filepressID);
// console.log('filepressBaseUrl', filepressBaseUrl); // console.log('filepressBaseUrl', filepressBaseUrl);
const filepressTokenRes = await axios.post(filepressBaseUrl + "/api/file/downlaod/", { const filepressTokenRes = yield axios.post(filepressBaseUrl + "/api/file/downlaod/", {
id: filepressID, id: filepressID,
method: "indexDownlaod", method: "indexDownlaod",
captchaValue: null, captchaValue: null,
@@ -56,9 +64,9 @@ async function getStream({ link, type, signal, providerContext, }) {
}, },
}); });
// console.log('filepressTokenRes', filepressTokenRes.data); // console.log('filepressTokenRes', filepressTokenRes.data);
if (filepressTokenRes.data?.status) { if ((_b = filepressTokenRes.data) === null || _b === void 0 ? void 0 : _b.status) {
const filepressToken = filepressTokenRes.data?.data; const filepressToken = (_c = filepressTokenRes.data) === null || _c === void 0 ? void 0 : _c.data;
const filepressStreamLink = await axios.post(filepressBaseUrl + "/api/file/downlaod2/", { const filepressStreamLink = yield axios.post(filepressBaseUrl + "/api/file/downlaod2/", {
id: filepressToken, id: filepressToken,
method: "indexDownlaod", method: "indexDownlaod",
captchaValue: null, captchaValue: null,
@@ -71,7 +79,7 @@ async function getStream({ link, type, signal, providerContext, }) {
// console.log('filepressStreamLink', filepressStreamLink.data); // console.log('filepressStreamLink', filepressStreamLink.data);
streamLinks.push({ streamLinks.push({
server: "filepress", server: "filepress",
link: filepressStreamLink.data?.data?.[0], link: (_e = (_d = filepressStreamLink.data) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e[0],
type: "mkv", type: "mkv",
}); });
} }
@@ -81,7 +89,7 @@ async function getStream({ link, type, signal, providerContext, }) {
// console.error(error); // console.error(error);
} }
} }
return await hubcloudExtracter(link, signal); return yield hubcloudExtracter(link, signal);
} }
catch (error) { catch (error) {
console.log("getStream error: ", error); console.log("getStream error: ", error);
@@ -91,4 +99,5 @@ async function getStream({ link, type, signal, providerContext, }) {
} }
return []; return [];
} }
});
} }

23
dist/mod/episodes.js vendored
View File

@@ -1,20 +1,30 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getEpisodes = void 0; exports.getEpisodes = void 0;
const getEpisodes = async function ({ url, providerContext, }) { const getEpisodes = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ url, providerContext, }) {
var _b;
const { axios, cheerio } = providerContext; const { axios, cheerio } = providerContext;
try { try {
if (url.includes("url=")) { if (url.includes("url=")) {
url = atob(url.split("url=")[1]); url = atob(url.split("url=")[1]);
} }
const res = await axios.get(url); const res = yield axios.get(url);
const html = res.data; const html = res.data;
let $ = cheerio.load(html); let $ = cheerio.load(html);
if (url.includes("url=")) { if (url.includes("url=")) {
const newUrl = $("meta[http-equiv='refresh']") const newUrl = (_b = $("meta[http-equiv='refresh']")
.attr("content") .attr("content")) === null || _b === void 0 ? void 0 : _b.split("url=")[1];
?.split("url=")[1]; const res2 = yield axios.get(newUrl || url);
const res2 = await axios.get(newUrl || url);
const html2 = res2.data; const html2 = res2.data;
$ = cheerio.load(html2); $ = cheerio.load(html2);
} }
@@ -45,5 +55,6 @@ const getEpisodes = async function ({ url, providerContext, }) {
console.error(err); console.error(err);
return []; return [];
} }
});
}; };
exports.getEpisodes = getEpisodes; exports.getEpisodes = getEpisodes;

23
dist/mod/meta.js vendored
View File

@@ -1,24 +1,36 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getMeta = void 0; exports.getMeta = void 0;
const getMeta = async function ({ link, providerContext, }) { const getMeta = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ link, providerContext, }) {
var _b;
try { try {
const { axios, cheerio } = providerContext; const { axios, cheerio } = providerContext;
const url = link; const url = link;
const res = await axios.get(url); const res = yield axios.get(url);
const data = res.data; const data = res.data;
const $ = cheerio.load(data); const $ = cheerio.load(data);
const meta = { const meta = {
title: $(".imdbwp__title").text(), title: $(".imdbwp__title").text(),
synopsis: $(".imdbwp__teaser").text(), synopsis: $(".imdbwp__teaser").text(),
image: $(".imdbwp__thumb").find("img").attr("src") || "", image: $(".imdbwp__thumb").find("img").attr("src") || "",
imdbId: $(".imdbwp__link").attr("href")?.split("/")[4] || "", imdbId: ((_b = $(".imdbwp__link").attr("href")) === null || _b === void 0 ? void 0 : _b.split("/")[4]) || "",
type: $(".thecontent").text().toLocaleLowerCase().includes("season") type: $(".thecontent").text().toLocaleLowerCase().includes("season")
? "series" ? "series"
: "movie", : "movie",
}; };
const links = []; const links = [];
$("h3,h4").map((i, element) => { $("h3,h4").map((i, element) => {
var _a;
const seriesTitle = $(element).text(); const seriesTitle = $(element).text();
// const batchZipLink = $(element) // const batchZipLink = $(element)
// .next("p") // .next("p")
@@ -40,12 +52,12 @@ const getMeta = async function ({ link, providerContext, }) {
directLinks: movieLink directLinks: movieLink
? [{ link: movieLink, title: "Movie", type: "movie" }] ? [{ link: movieLink, title: "Movie", type: "movie" }]
: [], : [],
quality: seriesTitle?.match(/\d+p\b/)?.[0] || "", quality: ((_a = seriesTitle === null || seriesTitle === void 0 ? void 0 : seriesTitle.match(/\d+p\b/)) === null || _a === void 0 ? void 0 : _a[0]) || "",
}); });
} }
}); });
// console.log('mod meta', links); // console.log('mod meta', links);
return { ...meta, linkList: links }; return Object.assign(Object.assign({}, meta), { linkList: links });
} }
catch (err) { catch (err) {
console.error(err); console.error(err);
@@ -58,5 +70,6 @@ const getMeta = async function ({ link, providerContext, }) {
linkList: [], linkList: [],
}; };
} }
});
}; };
exports.getMeta = getMeta; exports.getMeta = getMeta;

27
dist/mod/posts.js vendored
View File

@@ -1,23 +1,37 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getSearchPosts = exports.getPosts = void 0; exports.getSearchPosts = exports.getPosts = void 0;
const getPosts = async function ({ filter, page, signal, providerContext, }) { const getPosts = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ filter, page, signal, providerContext, }) {
const { getBaseUrl, axios, cheerio } = providerContext; const { getBaseUrl, axios, cheerio } = providerContext;
const baseUrl = await getBaseUrl("Moviesmod"); const baseUrl = yield getBaseUrl("Moviesmod");
const url = `${baseUrl + filter}/page/${page}/`; const url = `${baseUrl + filter}/page/${page}/`;
return posts({ url, signal, axios, cheerio }); return posts({ url, signal, axios, cheerio });
});
}; };
exports.getPosts = getPosts; exports.getPosts = getPosts;
const getSearchPosts = async function ({ searchQuery, page, signal, providerContext, }) { const getSearchPosts = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ searchQuery, page, signal, providerContext, }) {
const { getBaseUrl, axios, cheerio } = providerContext; const { getBaseUrl, axios, cheerio } = providerContext;
const baseUrl = await getBaseUrl("Moviesmod"); const baseUrl = yield getBaseUrl("Moviesmod");
const url = `${baseUrl}/search/${searchQuery}/page/${page}/`; const url = `${baseUrl}/search/${searchQuery}/page/${page}/`;
return posts({ url, signal, axios, cheerio }); return posts({ url, signal, axios, cheerio });
});
}; };
exports.getSearchPosts = getSearchPosts; exports.getSearchPosts = getSearchPosts;
async function posts({ url, signal, axios, cheerio, }) { function posts(_a) {
return __awaiter(this, arguments, void 0, function* ({ url, signal, axios, cheerio, }) {
try { try {
const res = await axios.get(url, { signal }); const res = yield axios.get(url, { signal });
const data = res.data; const data = res.data;
const $ = cheerio.load(data); const $ = cheerio.load(data);
const catalog = []; const catalog = [];
@@ -41,4 +55,5 @@ async function posts({ url, signal, axios, cheerio, }) {
console.error("modGetPosts error ", err); console.error("modGetPosts error ", err);
return []; return [];
} }
});
} }

82
dist/mod/stream.js vendored
View File

@@ -1,4 +1,13 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getStream = void 0; exports.getStream = void 0;
const headers = { const headers = {
@@ -17,23 +26,26 @@ const headers = {
"Upgrade-Insecure-Requests": "1", "Upgrade-Insecure-Requests": "1",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0",
}; };
const getStream = async function ({ link: url, type, providerContext, }) { const getStream = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ link: url, type, providerContext, }) {
var _b, _c;
const { axios, cheerio } = providerContext; const { axios, cheerio } = providerContext;
try { try {
const modGetEpisodeLinks = async function ({ url, providerContext, }) { const modGetEpisodeLinks = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ url, providerContext, }) {
var _b;
const { axios, cheerio } = providerContext; const { axios, cheerio } = providerContext;
try { try {
if (url.includes("url=")) { if (url.includes("url=")) {
url = atob(url.split("url=")[1]); url = atob(url.split("url=")[1]);
} }
const res = await axios.get(url); const res = yield axios.get(url);
const html = res.data; const html = res.data;
let $ = cheerio.load(html); let $ = cheerio.load(html);
if (url.includes("url=")) { if (url.includes("url=")) {
const newUrl = $("meta[http-equiv='refresh']") const newUrl = (_b = $("meta[http-equiv='refresh']")
.attr("content") .attr("content")) === null || _b === void 0 ? void 0 : _b.split("url=")[1];
?.split("url=")[1]; const res2 = yield axios.get(newUrl || url);
const res2 = await axios.get(newUrl || url);
const html2 = res2.data; const html2 = res2.data;
$ = cheerio.load(html2); $ = cheerio.load(html2);
} }
@@ -64,26 +76,27 @@ const getStream = async function ({ link: url, type, providerContext, }) {
console.error(err); console.error(err);
return []; return [];
} }
});
}; };
console.log("modGetStream", type, url); console.log("modGetStream", type, url);
if (type === "movie") { if (type === "movie") {
const servers = await modGetEpisodeLinks({ url, providerContext }); const servers = yield modGetEpisodeLinks({ url, providerContext });
url = servers[0].link || url; url = servers[0].link || url;
} }
let downloadLink = await modExtractor(url, providerContext); let downloadLink = yield modExtractor(url, providerContext);
// console.log(downloadLink.data); // console.log(downloadLink.data);
const ddl = downloadLink?.data?.match(/content="0;url=(.*?)"/)?.[1] || url; const ddl = ((_c = (_b = downloadLink === null || downloadLink === void 0 ? void 0 : downloadLink.data) === null || _b === void 0 ? void 0 : _b.match(/content="0;url=(.*?)"/)) === null || _c === void 0 ? void 0 : _c[1]) || url;
// console.log('ddl', url); // console.log('ddl', url);
// console.log(ddl); // console.log(ddl);
// console.log(ddl); // console.log(ddl);
const servers = []; const servers = [];
const driveLink = await isDriveLink(ddl); const driveLink = yield isDriveLink(ddl);
const driveRes = await axios.get(driveLink, { headers }); const driveRes = yield axios.get(driveLink, { headers });
const driveHtml = driveRes.data; const driveHtml = driveRes.data;
const $drive = cheerio.load(driveHtml); const $drive = cheerio.load(driveHtml);
try { try {
const resumeBot = $drive(".btn.btn-light").attr("href") || ""; const resumeBot = $drive(".btn.btn-light").attr("href") || "";
const resumeBotRes = await axios.get(resumeBot, { headers }); const resumeBotRes = yield axios.get(resumeBot, { headers });
const resumeBotToken = resumeBotRes.data.match(/formData\.append\('token', '([a-f0-9]+)'\)/)[1]; const resumeBotToken = resumeBotRes.data.match(/formData\.append\('token', '([a-f0-9]+)'\)/)[1];
const resumeBotBody = new FormData(); const resumeBotBody = new FormData();
resumeBotBody.append("token", resumeBotToken); resumeBotBody.append("token", resumeBotToken);
@@ -94,7 +107,7 @@ const getStream = async function ({ link: url, type, providerContext, }) {
// resumeBotBaseUrl + '/download?id=' + resumeBotPath, // resumeBotBaseUrl + '/download?id=' + resumeBotPath,
// ); // );
// console.log('resumeBotBody', resumeBotToken); // console.log('resumeBotBody', resumeBotToken);
const resumeBotDownload = await fetch(resumeBotBaseUrl + "/download?id=" + resumeBotPath, { const resumeBotDownload = yield fetch(resumeBotBaseUrl + "/download?id=" + resumeBotPath, {
method: "POST", method: "POST",
body: resumeBotBody, body: resumeBotBody,
headers: { headers: {
@@ -102,7 +115,7 @@ const getStream = async function ({ link: url, type, providerContext, }) {
Cookie: "PHPSESSID=7e9658ce7c805dab5bbcea9046f7f308", Cookie: "PHPSESSID=7e9658ce7c805dab5bbcea9046f7f308",
}, },
}); });
const resumeBotDownloadData = await resumeBotDownload.json(); const resumeBotDownloadData = yield resumeBotDownload.json();
console.log("resumeBotDownloadData", resumeBotDownloadData.url); console.log("resumeBotDownloadData", resumeBotDownloadData.url);
servers.push({ servers.push({
server: "ResumeBot", server: "ResumeBot",
@@ -116,12 +129,13 @@ const getStream = async function ({ link: url, type, providerContext, }) {
// CF workers type 1 // CF workers type 1
try { try {
const cfWorkersLink = driveLink.replace("/file", "/wfile") + "?type=1"; const cfWorkersLink = driveLink.replace("/file", "/wfile") + "?type=1";
const cfWorkersRes = await axios.get(cfWorkersLink, { headers }); const cfWorkersRes = yield axios.get(cfWorkersLink, { headers });
const cfWorkersHtml = cfWorkersRes.data; const cfWorkersHtml = cfWorkersRes.data;
const $cfWorkers = cheerio.load(cfWorkersHtml); const $cfWorkers = cheerio.load(cfWorkersHtml);
const cfWorkersStream = $cfWorkers(".btn-success"); const cfWorkersStream = $cfWorkers(".btn-success");
cfWorkersStream.each((i, el) => { cfWorkersStream.each((i, el) => {
const link = el.attribs?.href; var _a;
const link = (_a = el.attribs) === null || _a === void 0 ? void 0 : _a.href;
if (link) { if (link) {
servers.push({ servers.push({
server: "Cf Worker 1." + i, server: "Cf Worker 1." + i,
@@ -137,12 +151,13 @@ const getStream = async function ({ link: url, type, providerContext, }) {
// CF workers type 2 // CF workers type 2
try { try {
const cfWorkersLink = driveLink.replace("/file", "/wfile") + "?type=2"; const cfWorkersLink = driveLink.replace("/file", "/wfile") + "?type=2";
const cfWorkersRes = await axios.get(cfWorkersLink, { headers }); const cfWorkersRes = yield axios.get(cfWorkersLink, { headers });
const cfWorkersHtml = cfWorkersRes.data; const cfWorkersHtml = cfWorkersRes.data;
const $cfWorkers = cheerio.load(cfWorkersHtml); const $cfWorkers = cheerio.load(cfWorkersHtml);
const cfWorkersStream = $cfWorkers(".btn-success"); const cfWorkersStream = $cfWorkers(".btn-success");
cfWorkersStream.each((i, el) => { cfWorkersStream.each((i, el) => {
const link = el.attribs?.href; var _a;
const link = (_a = el.attribs) === null || _a === void 0 ? void 0 : _a.href;
if (link) { if (link) {
servers.push({ servers.push({
server: "Cf Worker 2." + i, server: "Cf Worker 2." + i,
@@ -165,14 +180,14 @@ const getStream = async function ({ link: url, type, providerContext, }) {
InstantFromData.append("keys", instantToken); InstantFromData.append("keys", instantToken);
const videoSeedUrl = seed.split("/").slice(0, 3).join("/") + "/api"; const videoSeedUrl = seed.split("/").slice(0, 3).join("/") + "/api";
// console.log('videoSeedUrl', videoSeedUrl); // console.log('videoSeedUrl', videoSeedUrl);
const instantLinkRes = await fetch(videoSeedUrl, { const instantLinkRes = yield fetch(videoSeedUrl, {
method: "POST", method: "POST",
body: InstantFromData, body: InstantFromData,
headers: { headers: {
"x-token": videoSeedUrl, "x-token": videoSeedUrl,
}, },
}); });
const instantLinkData = await instantLinkRes.json(); const instantLinkData = yield instantLinkRes.json();
// console.log('instantLinkData', instantLinkData); // console.log('instantLinkData', instantLinkData);
if (instantLinkData.error === false) { if (instantLinkData.error === false) {
const instantLink = instantLinkData.url; const instantLink = instantLinkData.url;
@@ -195,14 +210,15 @@ const getStream = async function ({ link: url, type, providerContext, }) {
console.log("getStream error", err); console.log("getStream error", err);
return []; return [];
} }
});
}; };
exports.getStream = getStream; exports.getStream = getStream;
const isDriveLink = async (ddl) => { const isDriveLink = (ddl) => __awaiter(void 0, void 0, void 0, function* () {
if (ddl.includes("drive")) { if (ddl.includes("drive")) {
const driveLeach = await fetch(ddl); const driveLeach = yield fetch(ddl);
const driveLeachData = await driveLeach.text(); const driveLeachData = yield driveLeach.text();
const pathMatch = driveLeachData.match(/window\.location\.replace\("([^"]+)"\)/); const pathMatch = driveLeachData.match(/window\.location\.replace\("([^"]+)"\)/);
const path = pathMatch?.[1]; const path = pathMatch === null || pathMatch === void 0 ? void 0 : pathMatch[1];
const mainUrl = ddl.split("/")[2]; const mainUrl = ddl.split("/")[2];
console.log(`driveUrl = https://${mainUrl}${path}`); console.log(`driveUrl = https://${mainUrl}${path}`);
return `https://${mainUrl}${path}`; return `https://${mainUrl}${path}`;
@@ -210,18 +226,19 @@ const isDriveLink = async (ddl) => {
else { else {
return ddl; return ddl;
} }
}; });
async function modExtractor(url, providerContext) { function modExtractor(url, providerContext) {
return __awaiter(this, void 0, void 0, function* () {
const { axios, cheerio } = providerContext; const { axios, cheerio } = providerContext;
try { try {
const wpHttp = url.split("sid=")[1]; const wpHttp = url.split("sid=")[1];
var bodyFormData0 = new FormData(); var bodyFormData0 = new FormData();
bodyFormData0.append("_wp_http", wpHttp); bodyFormData0.append("_wp_http", wpHttp);
const res = await fetch(url.split("?")[0], { const res = yield fetch(url.split("?")[0], {
method: "POST", method: "POST",
body: bodyFormData0, body: bodyFormData0,
}); });
const data = await res.text(); const data = yield res.text();
// console.log('', data); // console.log('', data);
const html = data; const html = data;
const $ = cheerio.load(html); const $ = cheerio.load(html);
@@ -233,16 +250,16 @@ async function modExtractor(url, providerContext) {
bodyFormData.append("_wp_http2", wpHttp2); bodyFormData.append("_wp_http2", wpHttp2);
const formUrl1 = $("form").attr("action"); const formUrl1 = $("form").attr("action");
const formUrl = formUrl1 || url.split("?")[0]; const formUrl = formUrl1 || url.split("?")[0];
const res2 = await fetch(formUrl, { const res2 = yield fetch(formUrl, {
method: "POST", method: "POST",
body: bodyFormData, body: bodyFormData,
}); });
const html2 = await res2.text(); const html2 = yield res2.text();
const link = html2.match(/setAttribute\("href",\s*"(.*?)"/)[1]; const link = html2.match(/setAttribute\("href",\s*"(.*?)"/)[1];
console.log(link); console.log(link);
const cookie = link.split("=")[1]; const cookie = link.split("=")[1];
console.log("cookie", cookie); console.log("cookie", cookie);
const downloadLink = await axios.get(link, { const downloadLink = yield axios.get(link, {
headers: { headers: {
Referer: formUrl, Referer: formUrl,
Cookie: `${cookie}=${wpHttp2}`, Cookie: `${cookie}=${wpHttp2}`,
@@ -253,4 +270,5 @@ async function modExtractor(url, providerContext) {
catch (err) { catch (err) {
console.log("modGetStream error", err); console.log("modGetStream error", err);
} }
});
} }

View File

@@ -1,25 +1,36 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.mpGetStream = void 0; exports.mpGetStream = void 0;
const types_1 = require("../types"); const types_1 = require("../types");
const mpGetStream = async function ({ link: id, type, providerContext, }) { const mpGetStream = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ link: id, type, providerContext, }) {
var _b, _c;
try { try {
const { getBaseUrl, cheerio } = providerContext; const { getBaseUrl, cheerio } = providerContext;
const streams = []; const streams = [];
const { season, episode, tmdbId } = JSON.parse(id); const { season, episode, tmdbId } = JSON.parse(id);
const baseUrl = await getBaseUrl('moviesapi'); const baseUrl = yield getBaseUrl('moviesapi');
const link = type === 'movie' const link = type === 'movie'
? `${baseUrl}/movie/${tmdbId}` ? `${baseUrl}/movie/${tmdbId}`
: `${baseUrl}/tv/${tmdbId}-${season}-${episode}`; : `${baseUrl}/tv/${tmdbId}-${season}-${episode}`;
const res = await fetch(link, { const res = yield fetch(link, {
headers: { headers: {
referer: baseUrl, referer: baseUrl,
}, },
}); });
const baseData = await res.text(); const baseData = yield res.text();
const $ = cheerio.load(baseData); const $ = cheerio.load(baseData);
const embededUrl = $('iframe').attr('src') || ''; const embededUrl = $('iframe').attr('src') || '';
const response = await fetch(embededUrl, { const response = yield fetch(embededUrl, {
credentials: 'omit', credentials: 'omit',
headers: { headers: {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0',
@@ -39,28 +50,31 @@ const mpGetStream = async function ({ link: id, type, providerContext, }) {
method: 'GET', method: 'GET',
mode: 'cors', mode: 'cors',
}); });
const data2 = await response.text(); const data2 = yield response.text();
// Extract the encrypted content // Extract the encrypted content
const contents = data2.match(/const\s+Encrypted\s*=\s*['"]({.*})['"]/)?.[1] || ''; const contents = ((_b = data2.match(/const\s+Encrypted\s*=\s*['"]({.*})['"]/)) === null || _b === void 0 ? void 0 : _b[1]) || '';
if (embededUrl) { if (embededUrl) {
const res2 = await fetch('https://ext.8man.me/api/decrypt?passphrase==JV[t}{trEV=Ilh5', { const res2 = yield fetch('https://ext.8man.me/api/decrypt?passphrase==JV[t}{trEV=Ilh5', {
method: 'POST', method: 'POST',
body: contents, body: contents,
}); });
const finalData = await res2.json(); const finalData = yield res2.json();
const subtitle = finalData?.subtitles?.map((sub) => ({ const subtitle = (_c = finalData === null || finalData === void 0 ? void 0 : finalData.subtitles) === null || _c === void 0 ? void 0 : _c.map((sub) => {
title: sub?.label || 'Unknown', var _a;
language: sub?.label, return ({
type: sub?.file?.includes('.vtt') title: (sub === null || sub === void 0 ? void 0 : sub.label) || 'Unknown',
language: sub === null || sub === void 0 ? void 0 : sub.label,
type: ((_a = sub === null || sub === void 0 ? void 0 : sub.file) === null || _a === void 0 ? void 0 : _a.includes('.vtt'))
? types_1.TextTrackType.VTT ? types_1.TextTrackType.VTT
: types_1.TextTrackType.SUBRIP, : types_1.TextTrackType.SUBRIP,
uri: sub?.file, uri: sub === null || sub === void 0 ? void 0 : sub.file,
})); });
});
streams.push({ streams.push({
server: 'vidstreaming ', server: 'vidstreaming ',
type: 'm3u8', type: 'm3u8',
subtitles: subtitle, subtitles: subtitle,
link: finalData?.videoUrl, link: finalData === null || finalData === void 0 ? void 0 : finalData.videoUrl,
headers: { headers: {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0',
Referer: baseUrl, Referer: baseUrl,
@@ -81,5 +95,6 @@ const mpGetStream = async function ({ link: id, type, providerContext, }) {
console.error(err); console.error(err);
return []; return [];
} }
});
}; };
exports.mpGetStream = mpGetStream; exports.mpGetStream = mpGetStream;

15
dist/multi/meta.js vendored
View File

@@ -1,11 +1,21 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getMeta = void 0; exports.getMeta = void 0;
const getMeta = async function ({ link, providerContext, }) { const getMeta = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ link, providerContext, }) {
try { try {
const { axios, cheerio } = providerContext; const { axios, cheerio } = providerContext;
const url = link; const url = link;
const res = await axios.get(url); const res = yield axios.get(url);
const data = res.data; const data = res.data;
const $ = cheerio.load(data); const $ = cheerio.load(data);
const type = url.includes("tvshows") ? "series" : "movie"; const type = url.includes("tvshows") ? "series" : "movie";
@@ -72,5 +82,6 @@ const getMeta = async function ({ link, providerContext, }) {
linkList: [], linkList: [],
}; };
} }
});
}; };
exports.getMeta = getMeta; exports.getMeta = getMeta;

29
dist/multi/posts.js vendored
View File

@@ -1,24 +1,38 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getSearchPosts = exports.getPosts = void 0; exports.getSearchPosts = exports.getPosts = void 0;
const getPosts = async function ({ filter, page, signal, providerContext, }) { const getPosts = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ filter, page, signal, providerContext, }) {
const { getBaseUrl, cheerio } = providerContext; const { getBaseUrl, cheerio } = providerContext;
const baseUrl = await getBaseUrl("multi"); const baseUrl = yield getBaseUrl("multi");
const url = `${baseUrl + filter}page/${page}/`; const url = `${baseUrl + filter}page/${page}/`;
return posts({ url, signal, cheerio }); return posts({ url, signal, cheerio });
});
}; };
exports.getPosts = getPosts; exports.getPosts = getPosts;
const getSearchPosts = async function ({ searchQuery, signal, providerContext, }) { const getSearchPosts = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ searchQuery, signal, providerContext, }) {
const { getBaseUrl, cheerio } = providerContext; const { getBaseUrl, cheerio } = providerContext;
const baseUrl = await getBaseUrl("multi"); const baseUrl = yield getBaseUrl("multi");
const url = `${baseUrl}/?s=${searchQuery}`; const url = `${baseUrl}/?s=${searchQuery}`;
return posts({ url, signal, cheerio }); return posts({ url, signal, cheerio });
});
}; };
exports.getSearchPosts = getSearchPosts; exports.getSearchPosts = getSearchPosts;
async function posts({ url, signal, cheerio, }) { function posts(_a) {
return __awaiter(this, arguments, void 0, function* ({ url, signal, cheerio, }) {
try { try {
const res = await fetch(url, { signal }); const res = yield fetch(url, { signal });
const data = await res.text(); const data = yield res.text();
const $ = cheerio.load(data); const $ = cheerio.load(data);
const catalog = []; const catalog = [];
$(".items.full") $(".items.full")
@@ -42,4 +56,5 @@ async function posts({ url, signal, cheerio, }) {
console.error("multiGetPosts error ", err); console.error("multiGetPosts error ", err);
return []; return [];
} }
});
} }

58
dist/multi/stream.js vendored
View File

@@ -1,8 +1,19 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getStream = void 0; exports.getStream = void 0;
const types_1 = require("../types"); const types_1 = require("../types");
const getStream = async function ({ link: url, providerContext, }) { const getStream = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ link: url, providerContext, }) {
var _b, _c, _d, _e, _f, _g, _h, _j, _k;
const { axios, cheerio } = providerContext; const { axios, cheerio } = providerContext;
const headers = { const headers = {
"sec-ch-ua": '"Not_A Brand";v="8", "Chromium";v="120", "Microsoft Edge";v="120"', "sec-ch-ua": '"Not_A Brand";v="8", "Chromium";v="120", "Microsoft Edge";v="120"',
@@ -13,7 +24,7 @@ const getStream = async function ({ link: url, providerContext, }) {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0",
}; };
try { try {
const res = await axios.get(url, { headers }); const res = yield axios.get(url, { headers });
const html = res.data; const html = res.data;
const $ = cheerio.load(html); const $ = cheerio.load(html);
const streamLinks = []; const streamLinks = [];
@@ -28,50 +39,44 @@ const getStream = async function ({ link: url, providerContext, }) {
formData.append("nume", nume || ""); formData.append("nume", nume || "");
formData.append("type", typeValue || ""); formData.append("type", typeValue || "");
console.log("formData", formData); console.log("formData", formData);
const playerRes = await fetch(`${baseUrl}/wp-admin/admin-ajax.php`, { const playerRes = yield fetch(`${baseUrl}/wp-admin/admin-ajax.php`, {
headers: headers, headers: headers,
body: formData, body: formData,
method: "POST", method: "POST",
}); });
const playerData = await playerRes.json(); const playerData = yield playerRes.json();
console.log("playerData", playerData); console.log("playerData", playerData);
let ifameUrl = playerData?.embed_url?.match(/<iframe[^>]+src="([^"]+)"[^>]*>/i)?.[1] || let ifameUrl = ((_c = (_b = playerData === null || playerData === void 0 ? void 0 : playerData.embed_url) === null || _b === void 0 ? void 0 : _b.match(/<iframe[^>]+src="([^"]+)"[^>]*>/i)) === null || _c === void 0 ? void 0 : _c[1]) ||
playerData?.embed_url; (playerData === null || playerData === void 0 ? void 0 : playerData.embed_url);
console.log("ifameUrl", ifameUrl); console.log("ifameUrl", ifameUrl);
if (!ifameUrl.includes("multimovies")) { if (!ifameUrl.includes("multimovies")) {
let playerBaseUrl = ifameUrl.split("/").slice(0, 3).join("/"); let playerBaseUrl = ifameUrl.split("/").slice(0, 3).join("/");
const newPlayerBaseUrl = await axios.head(playerBaseUrl, { headers }); const newPlayerBaseUrl = yield axios.head(playerBaseUrl, { headers });
if (newPlayerBaseUrl) { if (newPlayerBaseUrl) {
playerBaseUrl = newPlayerBaseUrl.request?.responseURL playerBaseUrl = (_e = (_d = newPlayerBaseUrl.request) === null || _d === void 0 ? void 0 : _d.responseURL) === null || _e === void 0 ? void 0 : _e.split("/").slice(0, 3).join("/");
?.split("/")
.slice(0, 3)
.join("/");
} }
const playerId = ifameUrl.split("/").pop(); const playerId = ifameUrl.split("/").pop();
const NewformData = new FormData(); const NewformData = new FormData();
NewformData.append("sid", playerId); NewformData.append("sid", playerId);
console.log("NewformData", playerBaseUrl + "/embedhelper.php", NewformData); console.log("NewformData", playerBaseUrl + "/embedhelper.php", NewformData);
const playerRes = await fetch(`${playerBaseUrl}/embedhelper.php`, { const playerRes = yield fetch(`${playerBaseUrl}/embedhelper.php`, {
headers: headers, headers: headers,
body: NewformData, body: NewformData,
method: "POST", method: "POST",
}); });
const playerData = await playerRes.json(); const playerData = yield playerRes.json();
// console.log('playerData', playerData); // console.log('playerData', playerData);
const siteUrl = playerData?.siteUrls?.smwh; const siteUrl = (_f = playerData === null || playerData === void 0 ? void 0 : playerData.siteUrls) === null || _f === void 0 ? void 0 : _f.smwh;
const siteId = JSON.parse(atob(playerData?.mresult))?.smwh || const siteId = ((_g = JSON.parse(atob(playerData === null || playerData === void 0 ? void 0 : playerData.mresult))) === null || _g === void 0 ? void 0 : _g.smwh) ||
playerData?.mresult?.smwh; ((_h = playerData === null || playerData === void 0 ? void 0 : playerData.mresult) === null || _h === void 0 ? void 0 : _h.smwh);
const newIframeUrl = siteUrl + siteId; const newIframeUrl = siteUrl + siteId;
console.log("newIframeUrl", newIframeUrl); console.log("newIframeUrl", newIframeUrl);
if (newIframeUrl) { if (newIframeUrl) {
ifameUrl = newIframeUrl; ifameUrl = newIframeUrl;
} }
} }
const iframeRes = await axios.get(ifameUrl, { const iframeRes = yield axios.get(ifameUrl, {
headers: { headers: Object.assign(Object.assign({}, headers), { Referer: url }),
...headers,
Referer: url,
},
}); });
const iframeData = iframeRes.data; const iframeData = iframeRes.data;
// Step 1: Extract the function parameters and the encoded string // Step 1: Extract the function parameters and the encoded string
@@ -83,7 +88,7 @@ const getStream = async function ({ link: url, providerContext, }) {
var encodedString = match[2]; var encodedString = match[2];
// console.log('Parameters:', params); // console.log('Parameters:', params);
// console.log('Encoded String:', encodedString.split("',36,")[0], '🔥🔥'); // console.log('Encoded String:', encodedString.split("',36,")[0], '🔥🔥');
p = encodedString.split("',36,")?.[0].trim(); p = (_j = encodedString.split("',36,")) === null || _j === void 0 ? void 0 : _j[0].trim();
let a = 36; let a = 36;
let c = encodedString.split("',36,")[1].slice(2).split("|").length; let c = encodedString.split("',36,")[1].slice(2).split("|").length;
let k = encodedString.split("',36,")[1].slice(2).split("|"); let k = encodedString.split("',36,")[1].slice(2).split("|");
@@ -98,12 +103,12 @@ const getStream = async function ({ link: url, providerContext, }) {
else { else {
console.log("No match found"); console.log("No match found");
} }
const streamUrl = p?.match(/https?:\/\/[^"]+?\.m3u8[^"]*/)?.[0]; const streamUrl = (_k = p === null || p === void 0 ? void 0 : p.match(/https?:\/\/[^"]+?\.m3u8[^"]*/)) === null || _k === void 0 ? void 0 : _k[0];
const subtitles = []; const subtitles = [];
const subtitleMatch = p?.match(/https:\/\/[^\s"]+\.vtt/g); const subtitleMatch = p === null || p === void 0 ? void 0 : p.match(/https:\/\/[^\s"]+\.vtt/g);
// console.log('subtitleMatch', subtitleMatch); // console.log('subtitleMatch', subtitleMatch);
// console.log('streamUrl', streamUrl); // console.log('streamUrl', streamUrl);
if (subtitleMatch?.length) { if (subtitleMatch === null || subtitleMatch === void 0 ? void 0 : subtitleMatch.length) {
subtitleMatch.forEach((sub) => { subtitleMatch.forEach((sub) => {
const lang = sub.match(/_([a-zA-Z]{3})\.vtt$/)[1]; const lang = sub.match(/_([a-zA-Z]{3})\.vtt$/)[1];
subtitles.push({ subtitles.push({
@@ -115,7 +120,7 @@ const getStream = async function ({ link: url, providerContext, }) {
}); });
} }
console.log("streamUrl", streamUrl); console.log("streamUrl", streamUrl);
console.log("newUrl", streamUrl?.replace(/&i=\d+,'\.4&/, "&i=0.4&")); console.log("newUrl", streamUrl === null || streamUrl === void 0 ? void 0 : streamUrl.replace(/&i=\d+,'\.4&/, "&i=0.4&"));
if (streamUrl) { if (streamUrl) {
streamLinks.push({ streamLinks.push({
server: "Multi", server: "Multi",
@@ -130,5 +135,6 @@ const getStream = async function ({ link: url, providerContext, }) {
console.error(err); console.error(err);
return []; return [];
} }
});
}; };
exports.getStream = getStream; exports.getStream = getStream;

View File

@@ -1,11 +1,22 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getEpisodes = void 0; exports.getEpisodes = void 0;
const getEpisodes = async function ({ url: link, providerContext, }) { const getEpisodes = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ url: link, providerContext, }) {
var _b;
const { getBaseUrl, axios } = providerContext; const { getBaseUrl, axios } = providerContext;
let providerValue = "netflixMirror"; let providerValue = "netflixMirror";
try { try {
const baseUrl = await getBaseUrl("nfMirror"); const baseUrl = yield getBaseUrl("nfMirror");
const url = `${baseUrl}${providerValue === "netflixMirror" const url = `${baseUrl}${providerValue === "netflixMirror"
? "/episodes.php?s=" ? "/episodes.php?s="
: "/pv/episodes.php?s="}` + : "/pv/episodes.php?s="}` +
@@ -13,7 +24,7 @@ const getEpisodes = async function ({ url: link, providerContext, }) {
"&t=" + "&t=" +
Math.round(new Date().getTime() / 1000); Math.round(new Date().getTime() / 1000);
console.log("nfEpisodesUrl", url); console.log("nfEpisodesUrl", url);
const res = await axios.get(url, { const res = yield axios.get(url, {
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36",
@@ -23,10 +34,10 @@ const getEpisodes = async function ({ url: link, providerContext, }) {
const data = res.data; const data = res.data;
console.log("nfEpisodes", data); console.log("nfEpisodes", data);
const episodeList = []; const episodeList = [];
data?.episodes?.map((episode) => { (_b = data === null || data === void 0 ? void 0 : data.episodes) === null || _b === void 0 ? void 0 : _b.map((episode) => {
episodeList.push({ episodeList.push({
title: "Episode " + episode?.ep.replace("E", ""), title: "Episode " + (episode === null || episode === void 0 ? void 0 : episode.ep.replace("E", "")),
link: episode?.id, link: episode === null || episode === void 0 ? void 0 : episode.id,
}); });
}); });
return episodeList; return episodeList;
@@ -35,5 +46,6 @@ const getEpisodes = async function ({ url: link, providerContext, }) {
console.error("nfGetEpisodes error", err); console.error("nfGetEpisodes error", err);
return []; return [];
} }
});
}; };
exports.getEpisodes = getEpisodes; exports.getEpisodes = getEpisodes;

View File

@@ -1,33 +1,44 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getMeta = void 0; exports.getMeta = void 0;
const getMeta = async function ({ link, }) { const getMeta = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ link, }) {
var _b, _c, _d, _e;
let providerValue = "netflixMirror"; let providerValue = "netflixMirror";
try { try {
const isPrime = providerValue === "primeMirror" ? "isPrime=true" : "isPrime=false"; const isPrime = providerValue === "primeMirror" ? "isPrime=true" : "isPrime=false";
const url = `https://netmirror.8man.me/api/net-proxy?${isPrime}&url=${encodeURIComponent(link)}`; const url = `https://netmirror.8man.me/api/net-proxy?${isPrime}&url=${encodeURIComponent(link)}`;
console.log("nfifo", url); console.log("nfifo", url);
const res = await fetch(url, { const res = yield fetch(url, {
credentials: "omit", credentials: "omit",
}); });
const data = await res.json(); const data = yield res.json();
const id = link.split("id=")[1]?.split("&")[0]; const id = (_b = link.split("id=")[1]) === null || _b === void 0 ? void 0 : _b.split("&")[0];
const meta = { const meta = {
title: data.title, title: data.title,
synopsis: data.desc, synopsis: data.desc,
image: `https://img.nfmirrorcdn.top/poster/h/${id}.jpg`, image: `https://img.nfmirrorcdn.top/poster/h/${id}.jpg`,
cast: data?.short_cast?.split(","), cast: (_c = data === null || data === void 0 ? void 0 : data.short_cast) === null || _c === void 0 ? void 0 : _c.split(","),
tags: [data?.year, data?.hdsd, ...data?.thismovieis?.split(",")], tags: [data === null || data === void 0 ? void 0 : data.year, data === null || data === void 0 ? void 0 : data.hdsd, ...(_d = data === null || data === void 0 ? void 0 : data.thismovieis) === null || _d === void 0 ? void 0 : _d.split(",")],
imdbId: "", imdbId: "",
type: "series", type: "series",
}; };
console.log("nfinfo", meta); console.log("nfinfo", meta);
const linkList = []; const linkList = [];
if (data?.season?.length > 0) { if (((_e = data === null || data === void 0 ? void 0 : data.season) === null || _e === void 0 ? void 0 : _e.length) > 0) {
data.season.map((season) => { data.season.map((season) => {
linkList.push({ linkList.push({
title: "Season " + season?.s, title: "Season " + (season === null || season === void 0 ? void 0 : season.s),
episodesLink: season?.id, episodesLink: season === null || season === void 0 ? void 0 : season.id,
}); });
}); });
} }
@@ -37,10 +48,7 @@ const getMeta = async function ({ link, }) {
directLinks: [{ link: id, title: "Movie", type: "movie" }], directLinks: [{ link: id, title: "Movie", type: "movie" }],
}); });
} }
return { return Object.assign(Object.assign({}, meta), { linkList: linkList });
...meta,
linkList: linkList,
};
} }
catch (err) { catch (err) {
console.error(err); console.error(err);
@@ -53,5 +61,6 @@ const getMeta = async function ({ link, }) {
linkList: [], linkList: [],
}; };
} }
});
}; };
exports.getMeta = getMeta; exports.getMeta = getMeta;

View File

@@ -1,10 +1,20 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getSearchPosts = exports.getPosts = void 0; exports.getSearchPosts = exports.getPosts = void 0;
const getPosts = async function ({ filter, page, providerValue, signal, providerContext, }) { const getPosts = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ filter, page, providerValue, signal, providerContext, }) {
try { try {
const { getBaseUrl, cheerio } = providerContext; const { getBaseUrl, cheerio } = providerContext;
const baseUrl = await getBaseUrl("nfMirror"); const baseUrl = yield getBaseUrl("nfMirror");
const catalog = []; const catalog = [];
if (page > 1) { if (page > 1) {
return []; return [];
@@ -12,12 +22,12 @@ const getPosts = async function ({ filter, page, providerValue, signal, provider
// console.log(filter); // console.log(filter);
const isPrime = providerValue === "primeMirror" ? "isPrime=true" : "isPrime=false"; const isPrime = providerValue === "primeMirror" ? "isPrime=true" : "isPrime=false";
const url = `https://netmirror.8man.me/api/net-proxy?${isPrime}&url=${baseUrl + filter}`; const url = `https://netmirror.8man.me/api/net-proxy?${isPrime}&url=${baseUrl + filter}`;
const res = await fetch(url, { const res = yield fetch(url, {
signal: signal, signal: signal,
method: "GET", method: "GET",
credentials: "omit", credentials: "omit",
}); });
const data = await res.text(); const data = yield res.text();
// console.log('nfPost', data); // console.log('nfPost', data);
const $ = cheerio.load(data); const $ = cheerio.load(data);
$("a.post-data").map((i, element) => { $("a.post-data").map((i, element) => {
@@ -46,27 +56,30 @@ const getPosts = async function ({ filter, page, providerValue, signal, provider
console.error("nf error ", err); console.error("nf error ", err);
return []; return [];
} }
});
}; };
exports.getPosts = getPosts; exports.getPosts = getPosts;
const getSearchPosts = async function ({ searchQuery, page, providerValue, signal, providerContext, }) { const getSearchPosts = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ searchQuery, page, providerValue, signal, providerContext, }) {
var _b;
const { getBaseUrl } = providerContext; const { getBaseUrl } = providerContext;
try { try {
if (page > 1) { if (page > 1) {
return []; return [];
} }
const catalog = []; const catalog = [];
const baseUrl = await getBaseUrl("nfMirror"); const baseUrl = yield getBaseUrl("nfMirror");
const isPrime = providerValue === "primeMirror" ? "isPrime=true" : "isPrime=false"; const isPrime = providerValue === "primeMirror" ? "isPrime=true" : "isPrime=false";
const url = `https://netmirror.8man.me/api/net-proxy?${isPrime}&url=${baseUrl}${providerValue === "netflixMirror" ? "" : "/pv"}/search.php?s=${encodeURI(searchQuery)}`; const url = `https://netmirror.8man.me/api/net-proxy?${isPrime}&url=${baseUrl}${providerValue === "netflixMirror" ? "" : "/pv"}/search.php?s=${encodeURI(searchQuery)}`;
const res = await fetch(url, { const res = yield fetch(url, {
signal: signal, signal: signal,
method: "GET", method: "GET",
credentials: "omit", credentials: "omit",
}); });
const data = await res.json(); const data = yield res.json();
data?.searchResult?.forEach((result) => { (_b = data === null || data === void 0 ? void 0 : data.searchResult) === null || _b === void 0 ? void 0 : _b.forEach((result) => {
const title = result?.t || ""; const title = (result === null || result === void 0 ? void 0 : result.t) || "";
const id = result?.id; const id = result === null || result === void 0 ? void 0 : result.id;
const image = providerValue === "netflixMirror" const image = providerValue === "netflixMirror"
? `https://imgcdn.media/poster/v/${id}.jpg` ? `https://imgcdn.media/poster/v/${id}.jpg`
: ""; : "";
@@ -90,5 +103,6 @@ const getSearchPosts = async function ({ searchQuery, page, providerValue, signa
console.error("Search error:", err); console.error("Search error:", err);
return []; return [];
} }
});
}; };
exports.getSearchPosts = getSearchPosts; exports.getSearchPosts = getSearchPosts;

View File

@@ -1,25 +1,35 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getStream = void 0; exports.getStream = void 0;
const getStream = async ({ link: id, providerContext, }) => { const getStream = (_a) => __awaiter(void 0, [_a], void 0, function* ({ link: id, providerContext, }) {
const { getBaseUrl } = providerContext; const { getBaseUrl } = providerContext;
try { try {
let providerValue = "netflixMirror"; let providerValue = "netflixMirror";
const baseUrl = await getBaseUrl("nfMirror"); const baseUrl = yield getBaseUrl("nfMirror");
const url = `https://netmirror.8man.me/api/net-proxy?url=${baseUrl}${providerValue === "netflixMirror" const url = `https://netmirror.8man.me/api/net-proxy?url=${baseUrl}${providerValue === "netflixMirror"
? "/mobile/playlist.php?id=" ? "/mobile/playlist.php?id="
: "/pv/playlist.php?id="}${id}&t=${Math.round(new Date().getTime() / 1000)}`; : "/pv/playlist.php?id="}${id}&t=${Math.round(new Date().getTime() / 1000)}`;
console.log("nfGetStream, url:", url); console.log("nfGetStream, url:", url);
const res = await fetch(url, { const res = yield fetch(url, {
credentials: "omit", credentials: "omit",
}); });
const resJson = await res.json(); const resJson = yield res.json();
const data = resJson?.[0]; const data = resJson === null || resJson === void 0 ? void 0 : resJson[0];
const streamLinks = []; const streamLinks = [];
data?.sources.forEach((source) => { data === null || data === void 0 ? void 0 : data.sources.forEach((source) => {
var _a;
streamLinks.push({ streamLinks.push({
server: source.label, server: source.label,
link: (baseUrl + source.file)?.replace(":su", ":ni"), link: (_a = (baseUrl + source.file)) === null || _a === void 0 ? void 0 : _a.replace(":su", ":ni"),
type: "m3u8", type: "m3u8",
headers: { headers: {
Referer: baseUrl, Referer: baseUrl,
@@ -35,5 +45,5 @@ const getStream = async ({ link: id, providerContext, }) => {
console.error(err); console.error(err);
return []; return [];
} }
}; });
exports.getStream = getStream; exports.getStream = getStream;

View File

@@ -1,11 +1,22 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getEpisodes = void 0; exports.getEpisodes = void 0;
const getEpisodes = async function ({ url: link, providerContext, }) { const getEpisodes = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ url: link, providerContext, }) {
var _b;
const { getBaseUrl, axios } = providerContext; const { getBaseUrl, axios } = providerContext;
let providerValue = "primeMirror"; let providerValue = "primeMirror";
try { try {
const baseUrl = await getBaseUrl("nfMirror"); const baseUrl = yield getBaseUrl("nfMirror");
const url = `${baseUrl}${providerValue === "netflixMirror" const url = `${baseUrl}${providerValue === "netflixMirror"
? "/episodes.php?s=" ? "/episodes.php?s="
: "/pv/episodes.php?s="}` + : "/pv/episodes.php?s="}` +
@@ -13,7 +24,7 @@ const getEpisodes = async function ({ url: link, providerContext, }) {
"&t=" + "&t=" +
Math.round(new Date().getTime() / 1000); Math.round(new Date().getTime() / 1000);
console.log("nfEpisodesUrl", url); console.log("nfEpisodesUrl", url);
const res = await axios.get(url, { const res = yield axios.get(url, {
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36",
@@ -23,10 +34,10 @@ const getEpisodes = async function ({ url: link, providerContext, }) {
const data = res.data; const data = res.data;
console.log("nfEpisodes", data); console.log("nfEpisodes", data);
const episodeList = []; const episodeList = [];
data?.episodes?.map((episode) => { (_b = data === null || data === void 0 ? void 0 : data.episodes) === null || _b === void 0 ? void 0 : _b.map((episode) => {
episodeList.push({ episodeList.push({
title: "Episode " + episode?.ep.replace("E", ""), title: "Episode " + (episode === null || episode === void 0 ? void 0 : episode.ep.replace("E", "")),
link: episode?.id, link: episode === null || episode === void 0 ? void 0 : episode.id,
}); });
}); });
return episodeList; return episodeList;
@@ -35,5 +46,6 @@ const getEpisodes = async function ({ url: link, providerContext, }) {
console.error("nfGetEpisodes error", err); console.error("nfGetEpisodes error", err);
return []; return [];
} }
});
}; };
exports.getEpisodes = getEpisodes; exports.getEpisodes = getEpisodes;

View File

@@ -1,33 +1,44 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getMeta = void 0; exports.getMeta = void 0;
const getMeta = async function ({ link, }) { const getMeta = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ link, }) {
var _b, _c, _d, _e;
let providerValue = "primeMirror"; let providerValue = "primeMirror";
try { try {
const isPrime = providerValue === "primeMirror" ? "isPrime=true" : "isPrime=false"; const isPrime = providerValue === "primeMirror" ? "isPrime=true" : "isPrime=false";
const url = `https://netmirror.8man.me/api/net-proxy?${isPrime}&url=${encodeURIComponent(link)}`; const url = `https://netmirror.8man.me/api/net-proxy?${isPrime}&url=${encodeURIComponent(link)}`;
console.log("nfifo", url); console.log("nfifo", url);
const res = await fetch(url, { const res = yield fetch(url, {
credentials: "omit", credentials: "omit",
}); });
const data = await res.json(); const data = yield res.json();
const id = link.split("id=")[1]?.split("&")[0]; const id = (_b = link.split("id=")[1]) === null || _b === void 0 ? void 0 : _b.split("&")[0];
const meta = { const meta = {
title: data.title, title: data.title,
synopsis: data.desc, synopsis: data.desc,
image: `https://img.nfmirrorcdn.top/poster/h/${id}.jpg`, image: `https://img.nfmirrorcdn.top/poster/h/${id}.jpg`,
cast: data?.short_cast?.split(","), cast: (_c = data === null || data === void 0 ? void 0 : data.short_cast) === null || _c === void 0 ? void 0 : _c.split(","),
tags: [data?.year, data?.hdsd, ...data?.thismovieis?.split(",")], tags: [data === null || data === void 0 ? void 0 : data.year, data === null || data === void 0 ? void 0 : data.hdsd, ...(_d = data === null || data === void 0 ? void 0 : data.thismovieis) === null || _d === void 0 ? void 0 : _d.split(",")],
imdbId: "", imdbId: "",
type: "series", type: "series",
}; };
console.log("nfinfo", meta); console.log("nfinfo", meta);
const linkList = []; const linkList = [];
if (data?.season?.length > 0) { if (((_e = data === null || data === void 0 ? void 0 : data.season) === null || _e === void 0 ? void 0 : _e.length) > 0) {
data.season.map((season) => { data.season.map((season) => {
linkList.push({ linkList.push({
title: "Season " + season?.s, title: "Season " + (season === null || season === void 0 ? void 0 : season.s),
episodesLink: season?.id, episodesLink: season === null || season === void 0 ? void 0 : season.id,
}); });
}); });
} }
@@ -37,10 +48,7 @@ const getMeta = async function ({ link, }) {
directLinks: [{ link: id, title: "Movie", type: "movie" }], directLinks: [{ link: id, title: "Movie", type: "movie" }],
}); });
} }
return { return Object.assign(Object.assign({}, meta), { linkList: linkList });
...meta,
linkList: linkList,
};
} }
catch (err) { catch (err) {
console.error(err); console.error(err);
@@ -53,5 +61,6 @@ const getMeta = async function ({ link, }) {
linkList: [], linkList: [],
}; };
} }
});
}; };
exports.getMeta = getMeta; exports.getMeta = getMeta;

View File

@@ -1,10 +1,20 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getSearchPosts = exports.getPosts = void 0; exports.getSearchPosts = exports.getPosts = void 0;
const getPosts = async function ({ filter, page, providerValue, signal, providerContext, }) { const getPosts = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ filter, page, providerValue, signal, providerContext, }) {
try { try {
const { getBaseUrl, cheerio } = providerContext; const { getBaseUrl, cheerio } = providerContext;
const baseUrl = await getBaseUrl("nfMirror"); const baseUrl = yield getBaseUrl("nfMirror");
const catalog = []; const catalog = [];
if (page > 1) { if (page > 1) {
return []; return [];
@@ -12,12 +22,12 @@ const getPosts = async function ({ filter, page, providerValue, signal, provider
// console.log(filter); // console.log(filter);
const isPrime = providerValue === "primeMirror" ? "isPrime=true" : "isPrime=false"; const isPrime = providerValue === "primeMirror" ? "isPrime=true" : "isPrime=false";
const url = `https://netmirror.8man.me/api/net-proxy?${isPrime}&url=${baseUrl + filter}`; const url = `https://netmirror.8man.me/api/net-proxy?${isPrime}&url=${baseUrl + filter}`;
const res = await fetch(url, { const res = yield fetch(url, {
signal: signal, signal: signal,
method: "GET", method: "GET",
credentials: "omit", credentials: "omit",
}); });
const data = await res.text(); const data = yield res.text();
// console.log('nfPost', data); // console.log('nfPost', data);
const $ = cheerio.load(data); const $ = cheerio.load(data);
$("a.post-data").map((i, element) => { $("a.post-data").map((i, element) => {
@@ -46,27 +56,30 @@ const getPosts = async function ({ filter, page, providerValue, signal, provider
console.error("nf error ", err); console.error("nf error ", err);
return []; return [];
} }
});
}; };
exports.getPosts = getPosts; exports.getPosts = getPosts;
const getSearchPosts = async function ({ searchQuery, page, providerValue, signal, providerContext, }) { const getSearchPosts = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ searchQuery, page, providerValue, signal, providerContext, }) {
var _b;
const { getBaseUrl } = providerContext; const { getBaseUrl } = providerContext;
try { try {
if (page > 1) { if (page > 1) {
return []; return [];
} }
const catalog = []; const catalog = [];
const baseUrl = await getBaseUrl("nfMirror"); const baseUrl = yield getBaseUrl("nfMirror");
const isPrime = providerValue === "primeMirror" ? "isPrime=true" : "isPrime=false"; const isPrime = providerValue === "primeMirror" ? "isPrime=true" : "isPrime=false";
const url = `https://netmirror.8man.me/api/net-proxy?${isPrime}&url=${baseUrl}${providerValue === "netflixMirror" ? "" : "/pv"}/search.php?s=${encodeURI(searchQuery)}`; const url = `https://netmirror.8man.me/api/net-proxy?${isPrime}&url=${baseUrl}${providerValue === "netflixMirror" ? "" : "/pv"}/search.php?s=${encodeURI(searchQuery)}`;
const res = await fetch(url, { const res = yield fetch(url, {
signal: signal, signal: signal,
method: "GET", method: "GET",
credentials: "omit", credentials: "omit",
}); });
const data = await res.json(); const data = yield res.json();
data?.searchResult?.forEach((result) => { (_b = data === null || data === void 0 ? void 0 : data.searchResult) === null || _b === void 0 ? void 0 : _b.forEach((result) => {
const title = result?.t || ""; const title = (result === null || result === void 0 ? void 0 : result.t) || "";
const id = result?.id; const id = result === null || result === void 0 ? void 0 : result.id;
const image = providerValue === "netflixMirror" const image = providerValue === "netflixMirror"
? `https://imgcdn.media/poster/v/${id}.jpg` ? `https://imgcdn.media/poster/v/${id}.jpg`
: ""; : "";
@@ -90,5 +103,6 @@ const getSearchPosts = async function ({ searchQuery, page, providerValue, signa
console.error("Search error:", err); console.error("Search error:", err);
return []; return [];
} }
});
}; };
exports.getSearchPosts = getSearchPosts; exports.getSearchPosts = getSearchPosts;

View File

@@ -1,25 +1,35 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getStream = void 0; exports.getStream = void 0;
const getStream = async ({ link: id, providerContext, }) => { const getStream = (_a) => __awaiter(void 0, [_a], void 0, function* ({ link: id, providerContext, }) {
const { getBaseUrl } = providerContext; const { getBaseUrl } = providerContext;
try { try {
let providerValue = "primeMirror"; let providerValue = "primeMirror";
const baseUrl = await getBaseUrl("nfMirror"); const baseUrl = yield getBaseUrl("nfMirror");
const url = `https://netmirror.8man.me/api/net-proxy?url=${baseUrl}${providerValue === "netflixMirror" const url = `https://netmirror.8man.me/api/net-proxy?url=${baseUrl}${providerValue === "netflixMirror"
? "/mobile/playlist.php?id=" ? "/mobile/playlist.php?id="
: "/pv/playlist.php?id="}${id}&t=${Math.round(new Date().getTime() / 1000)}`; : "/pv/playlist.php?id="}${id}&t=${Math.round(new Date().getTime() / 1000)}`;
console.log("nfGetStream, url:", url); console.log("nfGetStream, url:", url);
const res = await fetch(url, { const res = yield fetch(url, {
credentials: "omit", credentials: "omit",
}); });
const resJson = await res.json(); const resJson = yield res.json();
const data = resJson?.[0]; const data = resJson === null || resJson === void 0 ? void 0 : resJson[0];
const streamLinks = []; const streamLinks = [];
data?.sources.forEach((source) => { data === null || data === void 0 ? void 0 : data.sources.forEach((source) => {
var _a;
streamLinks.push({ streamLinks.push({
server: source.label, server: source.label,
link: (baseUrl + source.file)?.replace(":su", ":ni"), link: (_a = (baseUrl + source.file)) === null || _a === void 0 ? void 0 : _a.replace(":su", ":ni"),
type: "m3u8", type: "m3u8",
headers: { headers: {
Referer: baseUrl, Referer: baseUrl,
@@ -35,5 +45,5 @@ const getStream = async ({ link: id, providerContext, }) => {
console.error(err); console.error(err);
return []; return [];
} }
}; });
exports.getStream = getStream; exports.getStream = getStream;

View File

@@ -1,18 +1,28 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getMeta = void 0; exports.getMeta = void 0;
const getMeta = async function ({ link, providerContext, }) { const getMeta = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ link, providerContext, }) {
var _b;
try { try {
const { axios, cheerio } = providerContext; const { axios, cheerio } = providerContext;
const url = link; const url = link;
const baseUrl = link.split("/").slice(0, 3).join("/"); const baseUrl = link.split("/").slice(0, 3).join("/");
const res = await axios.get(url); const res = yield axios.get(url);
const html = await res.data; const html = yield res.data;
const $ = cheerio.load(html); const $ = cheerio.load(html);
const imdbId = $(".movie_info") const imdbId = ((_b = $(".movie_info")
.find('a[href*="imdb.com/title/tt"]:not([href*="imdb.com/title/tt/"])') .find('a[href*="imdb.com/title/tt"]:not([href*="imdb.com/title/tt/"])')
.attr("href") .attr("href")) === null || _b === void 0 ? void 0 : _b.split("/")[4]) || "";
?.split("/")[4] || "";
const type = $(".show_season").html() ? "series" : "movie"; const type = $(".show_season").html() ? "series" : "movie";
const linkList = []; const linkList = [];
$(".show_season").each((i, element) => { $(".show_season").each((i, element) => {
@@ -74,5 +84,6 @@ const getMeta = async function ({ link, providerContext, }) {
type: "uhd", type: "uhd",
}; };
} }
});
}; };
exports.getMeta = getMeta; exports.getMeta = getMeta;

View File

@@ -1,27 +1,43 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getSearchPosts = exports.getPosts = void 0; exports.getSearchPosts = exports.getPosts = void 0;
const getPosts = async function ({ filter, page, signal, providerContext, }) { const getPosts = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ filter, page, signal, providerContext, }) {
const { getBaseUrl, axios, cheerio } = providerContext; const { getBaseUrl, axios, cheerio } = providerContext;
const baseUrl = await getBaseUrl("primewire"); const baseUrl = yield getBaseUrl("primewire");
const url = `${baseUrl + filter}&page=${page}`; const url = `${baseUrl + filter}&page=${page}`;
return posts({ baseUrl, url, signal, axios, cheerio }); return posts({ baseUrl, url, signal, axios, cheerio });
});
}; };
exports.getPosts = getPosts; exports.getPosts = getPosts;
const getSearchPosts = async function ({ searchQuery, page, signal, providerContext, }) { const getSearchPosts = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ searchQuery, page, signal, providerContext, }) {
const { getBaseUrl, axios, cheerio, Aes } = providerContext; const { getBaseUrl, axios, cheerio, Aes } = providerContext;
const getSHA256ofJSON = async function (input) { const getSHA256ofJSON = function (input) {
return await Aes.sha1(input); return __awaiter(this, void 0, void 0, function* () {
return yield Aes.sha1(input);
});
}; };
const baseUrl = await getBaseUrl("primewire"); const baseUrl = yield getBaseUrl("primewire");
const hash = await getSHA256ofJSON(searchQuery + "JyjId97F9PVqUPuMO0"); const hash = yield getSHA256ofJSON(searchQuery + "JyjId97F9PVqUPuMO0");
const url = `${baseUrl}/filter?s=${searchQuery}&page=${page}&ds=${hash.slice(0, 10)}`; const url = `${baseUrl}/filter?s=${searchQuery}&page=${page}&ds=${hash.slice(0, 10)}`;
return posts({ baseUrl, url, signal, axios, cheerio }); return posts({ baseUrl, url, signal, axios, cheerio });
});
}; };
exports.getSearchPosts = getSearchPosts; exports.getSearchPosts = getSearchPosts;
async function posts({ baseUrl, url, signal, axios, cheerio, }) { function posts(_a) {
return __awaiter(this, arguments, void 0, function* ({ baseUrl, url, signal, axios, cheerio, }) {
try { try {
const res = await axios.get(url, { signal }); const res = yield axios.get(url, { signal });
const data = res.data; const data = res.data;
const $ = cheerio.load(data); const $ = cheerio.load(data);
const catalog = []; const catalog = [];
@@ -43,4 +59,5 @@ async function posts({ baseUrl, url, signal, axios, cheerio, }) {
console.error("primewire error ", err); console.error("primewire error ", err);
return []; return [];
} }
});
} }

View File

@@ -1,14 +1,25 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getStream = void 0; exports.getStream = void 0;
const getStream = async function ({ link: url, type, providerContext, }) { const getStream = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ link: url, type, providerContext, }) {
var _b, _c, _d, _e, _f, _g;
const { axios, cheerio } = providerContext; const { axios, cheerio } = providerContext;
try { try {
console.log("pwGetStream", type, url); console.log("pwGetStream", type, url);
const baseUrl = url.split("/").slice(0, 3).join("/"); const baseUrl = url.split("/").slice(0, 3).join("/");
const streamLinks = []; const streamLinks = [];
const urls = []; const urls = [];
const res = await axios.get(url); const res = yield axios.get(url);
const data = res.data; const data = res.data;
const $ = cheerio.load(data); const $ = cheerio.load(data);
$('tr:contains("mixdrop")').map((i, element) => { $('tr:contains("mixdrop")').map((i, element) => {
@@ -20,9 +31,9 @@ const getStream = async function ({ link: url, type, providerContext, }) {
}); });
console.log("urls", urls); console.log("urls", urls);
for (const url of urls) { for (const url of urls) {
const res2 = await axios.head(url.id); const res2 = yield axios.head(url.id);
const location = res2.request?.responseURL.replace("/f/", "/e/"); const location = (_b = res2.request) === null || _b === void 0 ? void 0 : _b.responseURL.replace("/f/", "/e/");
const res3 = await fetch(location, { const res3 = yield fetch(location, {
credentials: "include", credentials: "include",
headers: { headers: {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0",
@@ -34,13 +45,13 @@ const getStream = async function ({ link: url, type, providerContext, }) {
"Sec-Fetch-Site": "same-origin", "Sec-Fetch-Site": "same-origin",
Pragma: "no-cache", Pragma: "no-cache",
"Cache-Control": "no-cache", "Cache-Control": "no-cache",
referer: res2.request?.responseURL, referer: (_c = res2.request) === null || _c === void 0 ? void 0 : _c.responseURL,
}, },
referrer: res2.request?.responseURL, referrer: (_d = res2.request) === null || _d === void 0 ? void 0 : _d.responseURL,
method: "GET", method: "GET",
mode: "cors", mode: "cors",
}); });
const data3 = await res3.text(); const data3 = yield res3.text();
// let MDCore: any = {}; // let MDCore: any = {};
// Step 1: Extract the function parameters and the encoded string // Step 1: Extract the function parameters and the encoded string
var functionRegex = /eval\(function\((.*?)\)\{.*?return p\}.*?\('(.*?)'\.split/; var functionRegex = /eval\(function\((.*?)\)\{.*?return p\}.*?\('(.*?)'\.split/;
@@ -54,7 +65,7 @@ const getStream = async function ({ link: url, type, providerContext, }) {
// console.log('Encoded String:', encodedString.split("',36,")[0], '🔥🔥'); // console.log('Encoded String:', encodedString.split("',36,")[0], '🔥🔥');
const base = Number(encodedString.split(",'|MDCore|")[0].split(",")[encodedString.split(",'|MDCore|")[0].split(",").length - 1]); const base = Number(encodedString.split(",'|MDCore|")[0].split(",")[encodedString.split(",'|MDCore|")[0].split(",").length - 1]);
console.log("Base:", base); console.log("Base:", base);
p = encodedString.split(`',${base},`)?.[0].trim(); p = (_e = encodedString.split(`',${base},`)) === null || _e === void 0 ? void 0 : _e[0].trim();
let a = base; let a = base;
let c = encodedString.split(`',${base},`)[1].slice(2).split("|").length; let c = encodedString.split(`',${base},`)[1].slice(2).split("|").length;
let k = encodedString.split(`',${base},`)[1].slice(2).split("|"); let k = encodedString.split(`',${base},`)[1].slice(2).split("|");
@@ -89,7 +100,7 @@ const getStream = async function ({ link: url, type, providerContext, }) {
}; };
const decoded = decode(p, a, c, k, 0, {}); const decoded = decode(p, a, c, k, 0, {});
// get MDCore.wurl= // get MDCore.wurl=
const wurl = decoded.match(/MDCore\.wurl="([^"]+)"/)?.[1]; const wurl = (_f = decoded.match(/MDCore\.wurl="([^"]+)"/)) === null || _f === void 0 ? void 0 : _f[1];
console.log("wurl:", wurl); console.log("wurl:", wurl);
const streamUrl = "https:" + wurl; const streamUrl = "https:" + wurl;
console.log("streamUrl:", streamUrl); console.log("streamUrl:", streamUrl);
@@ -107,7 +118,7 @@ const getStream = async function ({ link: url, type, providerContext, }) {
"Sec-Fetch-Site": "same-origin", "Sec-Fetch-Site": "same-origin",
Pragma: "no-cache", Pragma: "no-cache",
"Cache-Control": "no-cache", "Cache-Control": "no-cache",
referer: res2.request?.responseURL, referer: (_g = res2.request) === null || _g === void 0 ? void 0 : _g.responseURL,
}, },
}); });
} }
@@ -121,5 +132,6 @@ const getStream = async function ({ link: url, type, providerContext, }) {
console.error(err); console.error(err);
return []; return [];
} }
});
}; };
exports.getStream = getStream; exports.getStream = getStream;

View File

@@ -1,11 +1,22 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getMeta = void 0; exports.getMeta = void 0;
const getMeta = async function ({ link, providerContext, }) { const getMeta = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ link, providerContext, }) {
var _b, _c, _d, _e, _f;
try { try {
const { axios, cheerio, getBaseUrl } = providerContext; const { axios, cheerio, getBaseUrl } = providerContext;
console.log("all", link); console.log("all", link);
const res = await axios.get(link); const res = yield axios.get(link);
const data = res.data; const data = res.data;
function decodeHtml(encodedArray) { function decodeHtml(encodedArray) {
// Join array elements into a single string // Join array elements into a single string
@@ -26,12 +37,9 @@ const getMeta = async function ({ link, providerContext, }) {
return decoded; return decoded;
} }
const $$ = cheerio.load(data); const $$ = cheerio.load(data);
const htmlArray = $$('script:contains("decodeURIComponent")') const htmlArray = (_f = (_e = (_d = (_c = (_b = $$('script:contains("decodeURIComponent")')
.text() .text()
.split(" = ")?.[1] .split(" = ")) === null || _b === void 0 ? void 0 : _b[1]) === null || _c === void 0 ? void 0 : _c.split("protomovies")) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.trim()) === null || _f === void 0 ? void 0 : _f.slice(0, -1); // remove the last character
?.split("protomovies")?.[0]
?.trim()
?.slice(0, -1); // remove the last character
// console.log('protonGetInfo', htmlArray); // console.log('protonGetInfo', htmlArray);
const html = decodeHtml(JSON.parse(htmlArray)); const html = decodeHtml(JSON.parse(htmlArray));
// console.log('all', html); // console.log('all', html);
@@ -46,7 +54,7 @@ const getMeta = async function ({ link, providerContext, }) {
.map((i, el) => $(el).text()) .map((i, el) => $(el).text())
.slice(0, 3) .slice(0, 3)
.get(); .get();
const baseUrl = await getBaseUrl("protonMovies"); const baseUrl = yield getBaseUrl("protonMovies");
const links = []; const links = [];
if (type === "movie") { if (type === "movie") {
const directLinks = []; const directLinks = [];
@@ -89,5 +97,6 @@ const getMeta = async function ({ link, providerContext, }) {
linkList: [], linkList: [],
}; };
} }
});
}; };
exports.getMeta = getMeta; exports.getMeta = getMeta;

View File

@@ -1,21 +1,35 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getSearchPosts = exports.getPosts = void 0; exports.getSearchPosts = exports.getPosts = void 0;
const getPosts = async function ({ filter, page, signal, providerContext, }) { const getPosts = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ filter, page, signal, providerContext, }) {
const { getBaseUrl, axios, cheerio } = providerContext; const { getBaseUrl, axios, cheerio } = providerContext;
const baseUrl = await getBaseUrl("protonMovies"); const baseUrl = yield getBaseUrl("protonMovies");
const url = `${baseUrl + filter}/page/${page}/`; const url = `${baseUrl + filter}/page/${page}/`;
return posts({ url, baseUrl, signal, axios, cheerio }); return posts({ url, baseUrl, signal, axios, cheerio });
});
}; };
exports.getPosts = getPosts; exports.getPosts = getPosts;
const getSearchPosts = async function ({ searchQuery, page, signal, providerContext, }) { const getSearchPosts = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ searchQuery, page, signal, providerContext, }) {
const { getBaseUrl, axios, cheerio } = providerContext; const { getBaseUrl, axios, cheerio } = providerContext;
const baseUrl = await getBaseUrl("protonMovies"); const baseUrl = yield getBaseUrl("protonMovies");
const url = `${baseUrl}/search/${searchQuery}/page/${page}/`; const url = `${baseUrl}/search/${searchQuery}/page/${page}/`;
return posts({ url, baseUrl, signal, axios, cheerio }); return posts({ url, baseUrl, signal, axios, cheerio });
});
}; };
exports.getSearchPosts = getSearchPosts; exports.getSearchPosts = getSearchPosts;
async function posts({ url, baseUrl, signal, axios, cheerio, }) { function posts(_a) {
return __awaiter(this, arguments, void 0, function* ({ url, baseUrl, signal, axios, cheerio, }) {
function decodeHtml(encodedArray) { function decodeHtml(encodedArray) {
// Join array elements into a single string // Join array elements into a single string
const joined = encodedArray.join(""); const joined = encodedArray.join("");
@@ -35,7 +49,7 @@ async function posts({ url, baseUrl, signal, axios, cheerio, }) {
return decoded; return decoded;
} }
try { try {
const res = await axios.get(url, { const res = yield axios.get(url, {
headers: { headers: {
referer: baseUrl, referer: baseUrl,
}, },
@@ -43,7 +57,7 @@ async function posts({ url, baseUrl, signal, axios, cheerio, }) {
}); });
const data = res.data; const data = res.data;
const regex = /\[(?=.*?"<div class")(.*?)\]/g; const regex = /\[(?=.*?"<div class")(.*?)\]/g;
const htmlArray = data?.match(regex); const htmlArray = data === null || data === void 0 ? void 0 : data.match(regex);
const html = decodeHtml(JSON.parse(htmlArray[htmlArray.length - 1])); const html = decodeHtml(JSON.parse(htmlArray[htmlArray.length - 1]));
const $ = cheerio.load(html); const $ = cheerio.load(html);
const catalog = []; const catalog = [];
@@ -67,4 +81,5 @@ async function posts({ url, baseUrl, signal, axios, cheerio, }) {
console.error("protonGetPosts error ", err); console.error("protonGetPosts error ", err);
return []; return [];
} }
});
} }

View File

@@ -1,4 +1,13 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getStream = void 0; exports.getStream = void 0;
function LALLJLutmoZpvvbikjaWM(str) { function LALLJLutmoZpvvbikjaWM(str) {
@@ -13,11 +22,13 @@ function getOrCreateUID() {
const uid = "uid_" + Date.now() + "_" + Math.random().toString(36).substr(2, 9); const uid = "uid_" + Date.now() + "_" + Math.random().toString(36).substr(2, 9);
return uid; return uid;
} }
const getStream = async function ({ link, providerContext, }) { const getStream = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ link, providerContext, }) {
var _b, _c, _d, _e, _f, _g, _h, _j;
const { axios, cheerio, commonHeaders: headers, extractors, } = providerContext; const { axios, cheerio, commonHeaders: headers, extractors, } = providerContext;
const { gofileExtracter } = extractors; const { gofileExtracter } = extractors;
function generateMessageToken(baseUrlL) { function generateMessageToken(baseUrlL) {
const hostname = baseUrlL?.replace(/https?:\/\//, "").split("/")[0]; const hostname = baseUrlL === null || baseUrlL === void 0 ? void 0 : baseUrlL.replace(/https?:\/\//, "").split("/")[0];
console.log("generateMessageToken hostname", hostname); console.log("generateMessageToken hostname", hostname);
const NsmxUftCNibQ = `[hostname=${hostname}][agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36 Edg/137.0.0.0][tmz=India Standard Time][userTimezoneOffset=-330][{"url":"https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.4/jquery.min.js","type":"script","duration":253.30000000074506},{"url":"https://challenges.cloudflare.com/turnstile/v0/api.js?onload=onloadTurnstileCallback","type":"script","duration":397.19999999925494},{"url":"https://adoto.net/cdn-cgi/scripts/5c5dd728/cloudflare-static/email-decode.min.js","type":"img","duration":225.90000000223517},{"url":"https://code.jquery.com/jquery-3.3.1.slim.min.js","type":"script","duration":65.30000000074506},{"url":"https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015","type":"script","duration":225.89999999850988},{"url":"https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.4/jquery.min.js","type":"script","duration":253.30000000074506},{"url":"https://challenges.cloudflare.com/turnstile/v0/api.js?onload=onloadTurnstileCallback","type":"script","duration":397.19999999925494},{"url":"https://adoto.net/cdn-cgi/scripts/5c5dd728/cloudflare-static/email-decode.min.js","type":"img","duration":225.90000000223517},{"url":"https://code.jquery.com/jquery-3.3.1.slim.min.js","type":"script","duration":65.30000000074506},{"url":"https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015","type":"script","duration":225.89999999850988},{"url":"https://challenges.cloudflare.com/cdn-cgi/challenge-platform/h/b/turnstile/if/ov2/av0/rcv/b3dhg/0x4AAAAAAAQDru7r64xT2ifD/auto/fbE/new/normal/auto/","type":"iframe","duration":2050.300000000745},{"url":"https://new19.gdtot.dad/favicon.ico","type":"img","duration":1003.6999999992549},{"url":"https://vikingfile.com/assets/favicon-64375c377b5df8304acbdad4f4430694.ico","type":"img","duration":183.19999999925494},{"url":"https://gofile.io/dist/img/favicon32.png","type":"img","duration":19177.199999999255},{"url":"https://pub.clickadu.com/assets/scripts/supported-browsers.js","type":"fetch","duration":18.799999997019768},{"url":"https://challenges.cloudflare.com/cdn-cgi/challenge-platform/h/b/turnstile/if/ov2/av0/rcv/b3dhg/0x4AAAAAAAQDru7r64xT2ifD/auto/fbE/auto_expire/normal/auto/","type":"iframe","duration":1612.5999999977648},{"url":"https://challenges.cloudflare.com/cdn-cgi/challenge-platform/h/b/turnstile/if/ov2/av0/rcv/b3dhg/0x4AAAAAAAQDru7r64xT2ifD/auto/fbE/auto_expire/normal/auto/","type":"iframe","duration":1154.0999999977648},{"url":"https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.4/jquery.min.js","type":"script","duration":253.30000000074506},{"url":"https://challenges.cloudflare.com/turnstile/v0/api.js?onload=onloadTurnstileCallback","type":"script","duration":397.19999999925494},{"url":"https://adoto.net/cdn-cgi/scripts/5c5dd728/cloudflare-static/email-decode.min.js","type":"img","duration":225.90000000223517},{"url":"https://code.jquery.com/jquery-3.3.1.slim.min.js","type":"script","duration":65.30000000074506},{"url":"https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015","type":"script","duration":225.89999999850988},{"url":"https://challenges.cloudflare.com/cdn-cgi/challenge-platform/h/b/turnstile/if/ov2/av0/rcv/b3dhg/0x4AAAAAAAQDru7r64xT2ifD/auto/fbE/new/normal/auto/","type":"iframe","duration":2050.300000000745},{"url":"https://new19.gdtot.dad/favicon.ico","type":"img","duration":1003.6999999992549},{"url":"https://vikingfile.com/assets/favicon-64375c377b5df8304acbdad4f4430694.ico","type":"img","duration":183.19999999925494},{"url":"https://gofile.io/dist/img/favicon32.png","type":"img","duration":19177.199999999255},{"url":"https://pub.clickadu.com/assets/scripts/supported-browsers.js","type":"fetch","duration":18.799999997019768},{"url":"https://challenges.cloudflare.com/cdn-cgi/challenge-platform/h/b/turnstile/if/ov2/av0/rcv/b3dhg/0x4AAAAAAAQDru7r64xT2ifD/auto/fbE/auto_expire/normal/auto/","type":"iframe","duration":1612.5999999977648},{"url":"https://challenges.cloudflare.com/cdn-cgi/challenge-platform/h/b/turnstile/if/ov2/av0/rcv/b3dhg/0x4AAAAAAAQDru7r64xT2ifD/auto/fbE/auto_expire/normal/auto/","type":"iframe","duration":1154.0999999977648},{"url":"https://challenges.cloudflare.com/cdn-cgi/challenge-platform/h/b/turnstile/if/ov2/av0/rcv/b3dhg/0x4AAAAAAAQDru7r64xT2ifD/auto/fbE/auto_expire/normal/auto/","type":"iframe","duration":986}][{"elements":{"div":70,"span":68,"img":4,"iframe":0,"script":28,"link":20,"p":5,"a":213,"ul":28,"li":208,"button":9,"input":5},"hidden":{"div":13,"span":60,"img":1,"iframe":0,"script":28,"link":20,"p":0,"a":186,"ul":22,"li":184,"button":6,"input":2},"errors":{"network":0,"js":0},"eventListeners":0}]`; const NsmxUftCNibQ = `[hostname=${hostname}][agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36 Edg/137.0.0.0][tmz=India Standard Time][userTimezoneOffset=-330][{"url":"https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.4/jquery.min.js","type":"script","duration":253.30000000074506},{"url":"https://challenges.cloudflare.com/turnstile/v0/api.js?onload=onloadTurnstileCallback","type":"script","duration":397.19999999925494},{"url":"https://adoto.net/cdn-cgi/scripts/5c5dd728/cloudflare-static/email-decode.min.js","type":"img","duration":225.90000000223517},{"url":"https://code.jquery.com/jquery-3.3.1.slim.min.js","type":"script","duration":65.30000000074506},{"url":"https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015","type":"script","duration":225.89999999850988},{"url":"https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.4/jquery.min.js","type":"script","duration":253.30000000074506},{"url":"https://challenges.cloudflare.com/turnstile/v0/api.js?onload=onloadTurnstileCallback","type":"script","duration":397.19999999925494},{"url":"https://adoto.net/cdn-cgi/scripts/5c5dd728/cloudflare-static/email-decode.min.js","type":"img","duration":225.90000000223517},{"url":"https://code.jquery.com/jquery-3.3.1.slim.min.js","type":"script","duration":65.30000000074506},{"url":"https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015","type":"script","duration":225.89999999850988},{"url":"https://challenges.cloudflare.com/cdn-cgi/challenge-platform/h/b/turnstile/if/ov2/av0/rcv/b3dhg/0x4AAAAAAAQDru7r64xT2ifD/auto/fbE/new/normal/auto/","type":"iframe","duration":2050.300000000745},{"url":"https://new19.gdtot.dad/favicon.ico","type":"img","duration":1003.6999999992549},{"url":"https://vikingfile.com/assets/favicon-64375c377b5df8304acbdad4f4430694.ico","type":"img","duration":183.19999999925494},{"url":"https://gofile.io/dist/img/favicon32.png","type":"img","duration":19177.199999999255},{"url":"https://pub.clickadu.com/assets/scripts/supported-browsers.js","type":"fetch","duration":18.799999997019768},{"url":"https://challenges.cloudflare.com/cdn-cgi/challenge-platform/h/b/turnstile/if/ov2/av0/rcv/b3dhg/0x4AAAAAAAQDru7r64xT2ifD/auto/fbE/auto_expire/normal/auto/","type":"iframe","duration":1612.5999999977648},{"url":"https://challenges.cloudflare.com/cdn-cgi/challenge-platform/h/b/turnstile/if/ov2/av0/rcv/b3dhg/0x4AAAAAAAQDru7r64xT2ifD/auto/fbE/auto_expire/normal/auto/","type":"iframe","duration":1154.0999999977648},{"url":"https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.4/jquery.min.js","type":"script","duration":253.30000000074506},{"url":"https://challenges.cloudflare.com/turnstile/v0/api.js?onload=onloadTurnstileCallback","type":"script","duration":397.19999999925494},{"url":"https://adoto.net/cdn-cgi/scripts/5c5dd728/cloudflare-static/email-decode.min.js","type":"img","duration":225.90000000223517},{"url":"https://code.jquery.com/jquery-3.3.1.slim.min.js","type":"script","duration":65.30000000074506},{"url":"https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015","type":"script","duration":225.89999999850988},{"url":"https://challenges.cloudflare.com/cdn-cgi/challenge-platform/h/b/turnstile/if/ov2/av0/rcv/b3dhg/0x4AAAAAAAQDru7r64xT2ifD/auto/fbE/new/normal/auto/","type":"iframe","duration":2050.300000000745},{"url":"https://new19.gdtot.dad/favicon.ico","type":"img","duration":1003.6999999992549},{"url":"https://vikingfile.com/assets/favicon-64375c377b5df8304acbdad4f4430694.ico","type":"img","duration":183.19999999925494},{"url":"https://gofile.io/dist/img/favicon32.png","type":"img","duration":19177.199999999255},{"url":"https://pub.clickadu.com/assets/scripts/supported-browsers.js","type":"fetch","duration":18.799999997019768},{"url":"https://challenges.cloudflare.com/cdn-cgi/challenge-platform/h/b/turnstile/if/ov2/av0/rcv/b3dhg/0x4AAAAAAAQDru7r64xT2ifD/auto/fbE/auto_expire/normal/auto/","type":"iframe","duration":1612.5999999977648},{"url":"https://challenges.cloudflare.com/cdn-cgi/challenge-platform/h/b/turnstile/if/ov2/av0/rcv/b3dhg/0x4AAAAAAAQDru7r64xT2ifD/auto/fbE/auto_expire/normal/auto/","type":"iframe","duration":1154.0999999977648},{"url":"https://challenges.cloudflare.com/cdn-cgi/challenge-platform/h/b/turnstile/if/ov2/av0/rcv/b3dhg/0x4AAAAAAAQDru7r64xT2ifD/auto/fbE/auto_expire/normal/auto/","type":"iframe","duration":986}][{"elements":{"div":70,"span":68,"img":4,"iframe":0,"script":28,"link":20,"p":5,"a":213,"ul":28,"li":208,"button":9,"input":5},"hidden":{"div":13,"span":60,"img":1,"iframe":0,"script":28,"link":20,"p":0,"a":186,"ul":22,"li":184,"button":6,"input":2},"errors":{"network":0,"js":0},"eventListeners":0}]`;
var jRpeP = LALLJLutmoZpvvbikjaWM(NsmxUftCNibQ); var jRpeP = LALLJLutmoZpvvbikjaWM(NsmxUftCNibQ);
@@ -49,18 +60,15 @@ const getStream = async function ({ link, providerContext, }) {
} }
try { try {
const streamLinks = []; const streamLinks = [];
const res = await axios.get(link, { headers }); const res = yield axios.get(link, { headers });
const data = res.data; const data = res.data;
// const regex = /\[(?=.*?"<div class")(.*?)\]/g; // const regex = /\[(?=.*?"<div class")(.*?)\]/g;
// const htmlArray = data?.match(regex); // const htmlArray = data?.match(regex);
// new code // new code
const $$ = cheerio.load(data); const $$ = cheerio.load(data);
const htmlArray = $$('script:contains("decodeURIComponent")') const htmlArray = (_f = (_e = (_d = (_c = (_b = $$('script:contains("decodeURIComponent")')
.text() .text()
.split(" = ")?.[1] .split(" = ")) === null || _b === void 0 ? void 0 : _b[1]) === null || _c === void 0 ? void 0 : _c.split("protomovies")) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.trim()) === null || _f === void 0 ? void 0 : _f.slice(0, -1); // remove the last character
?.split("protomovies")?.[0]
?.trim()
?.slice(0, -1); // remove the last character
// console.log('protonGetInfo', htmlArray); // console.log('protonGetInfo', htmlArray);
// const html = decodeHtml(JSON.parse(htmlArray[htmlArray.length - 1])); // const html = decodeHtml(JSON.parse(htmlArray[htmlArray.length - 1]));
const html = decodeHtml(JSON.parse(htmlArray)); const html = decodeHtml(JSON.parse(htmlArray));
@@ -68,30 +76,27 @@ const getStream = async function ({ link, providerContext, }) {
// console.log('all', html); // console.log('all', html);
const $ = cheerio.load(html); const $ = cheerio.load(html);
const idList = []; const idList = [];
const id1080 = $('tr:contains("1080p")') const id1080 = (_g = $('tr:contains("1080p")')
.find('button:contains("Info")') .find('button:contains("Info")')
.attr("id") .attr("id")) === null || _g === void 0 ? void 0 : _g.split("-")[1];
?.split("-")[1];
if (id1080) { if (id1080) {
idList.push({ idList.push({
id: id1080, id: id1080,
quality: "1080p", quality: "1080p",
}); });
} }
const id720 = $('tr:contains("720p")') const id720 = (_h = $('tr:contains("720p")')
.find('button:contains("Info")') .find('button:contains("Info")')
.attr("id") .attr("id")) === null || _h === void 0 ? void 0 : _h.split("-")[1];
?.split("-")[1];
if (id720) { if (id720) {
idList.push({ idList.push({
id: id720, id: id720,
quality: "720p", quality: "720p",
}); });
} }
const id480 = $('tr:contains("480p")') const id480 = (_j = $('tr:contains("480p")')
.find('button:contains("Info")') .find('button:contains("Info")')
.attr("id") .attr("id")) === null || _j === void 0 ? void 0 : _j.split("-")[1];
?.split("-")[1];
if (id480) { if (id480) {
idList.push({ idList.push({
id: id480, id: id480,
@@ -101,13 +106,13 @@ const getStream = async function ({ link, providerContext, }) {
// console.log('idList', idList); // console.log('idList', idList);
const baseUrl = link.split("/").slice(0, 3).join("/"); const baseUrl = link.split("/").slice(0, 3).join("/");
const secondIdList = []; const secondIdList = [];
await Promise.all(idList.slice(0, 2).map(async (id) => { yield Promise.all(idList.slice(0, 2).map((id) => __awaiter(this, void 0, void 0, function* () {
const formData = new URLSearchParams(); const formData = new URLSearchParams();
formData.append("downloadid", id.id); formData.append("downloadid", id.id);
formData.append("token", "ok"); formData.append("token", "ok");
const messageToken = generateMessageToken(baseUrl); const messageToken = generateMessageToken(baseUrl);
const uid = getOrCreateUID(); const uid = getOrCreateUID();
const idRes = await fetch(`${baseUrl}/ppd.php`, { const idRes = yield fetch(`${baseUrl}/ppd.php`, {
headers: { headers: {
accept: "*/*", accept: "*/*",
"accept-language": "en-US,en;q=0.9,en-IN;q=0.8", "accept-language": "en-US,en;q=0.9,en-IN;q=0.8",
@@ -128,17 +133,17 @@ const getStream = async function ({ link, providerContext, }) {
body: `downloadid=${id.id}&msg=${messageToken}&uid=${uid}&token=ok`, body: `downloadid=${id.id}&msg=${messageToken}&uid=${uid}&token=ok`,
method: "POST", method: "POST",
}); });
const idData = await idRes.text(); const idData = yield idRes.text();
secondIdList.push({ secondIdList.push({
quality: id.quality, quality: id.quality,
id: idData, id: idData,
}); });
console.log("idData", idData); console.log("idData", idData);
})); })));
await Promise.all(secondIdList.map(async (id) => { yield Promise.all(secondIdList.map((id) => __awaiter(this, void 0, void 0, function* () {
const idRes = await axios.post(`${baseUrl}/tmp/${id.id}`); const idRes = yield axios.post(`${baseUrl}/tmp/${id.id}`);
if (idRes.data.ppd["gofile.io"]) { if (idRes.data.ppd["gofile.io"]) {
const goRes = await gofileExtracter(idRes.data.ppd["gofile.io"].link.split("/").pop()); const goRes = yield gofileExtracter(idRes.data.ppd["gofile.io"].link.split("/").pop());
console.log("link", goRes.link); console.log("link", goRes.link);
if (goRes.link) { if (goRes.link) {
streamLinks.push({ streamLinks.push({
@@ -154,12 +159,13 @@ const getStream = async function ({ link, providerContext, }) {
}); });
} }
} }
})); })));
return streamLinks; return streamLinks;
} }
catch (e) { catch (e) {
console.log("proton get stream err", e); console.log("proton get stream err", e);
return []; return [];
} }
});
}; };
exports.getStream = getStream; exports.getStream = getStream;

View File

@@ -1,31 +1,42 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getMeta = void 0; exports.getMeta = void 0;
const getMeta = async function ({ link, providerContext, }) { const getMeta = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ link, providerContext, }) {
var _b, _c, _d, _e, _f, _g, _h;
try { try {
const { getBaseUrl, axios } = providerContext; const { getBaseUrl, axios } = providerContext;
const res = await axios.get(link); const res = yield axios.get(link);
const data = res.data; const data = res.data;
const meta = { const meta = {
title: "", title: "",
synopsis: "", synopsis: "",
image: "", image: "",
imdbId: data?.meta?.imdb_id || "", imdbId: ((_b = data === null || data === void 0 ? void 0 : data.meta) === null || _b === void 0 ? void 0 : _b.imdb_id) || "",
type: data?.meta?.type || "movie", type: ((_c = data === null || data === void 0 ? void 0 : data.meta) === null || _c === void 0 ? void 0 : _c.type) || "movie",
}; };
const baseUrl = await getBaseUrl("ridomovies"); const baseUrl = yield getBaseUrl("ridomovies");
let slug = ""; let slug = "";
try { try {
const res2 = await axios.get(baseUrl + "/core/api/search?q=" + meta.imdbId); const res2 = yield axios.get(baseUrl + "/core/api/search?q=" + meta.imdbId);
const data2 = res2.data; const data2 = res2.data;
slug = data2?.data?.items[0]?.fullSlug; slug = (_e = (_d = data2 === null || data2 === void 0 ? void 0 : data2.data) === null || _d === void 0 ? void 0 : _d.items[0]) === null || _e === void 0 ? void 0 : _e.fullSlug;
if (!slug || meta?.type === "series") { if (!slug || (meta === null || meta === void 0 ? void 0 : meta.type) === "series") {
return { return {
title: "", title: "",
synopsis: "", synopsis: "",
image: "", image: "",
imdbId: data?.meta?.imdb_id || "", imdbId: ((_f = data === null || data === void 0 ? void 0 : data.meta) === null || _f === void 0 ? void 0 : _f.imdb_id) || "",
type: meta?.type || "movie", type: (meta === null || meta === void 0 ? void 0 : meta.type) || "movie",
linkList: [], linkList: [],
}; };
} }
@@ -35,8 +46,8 @@ const getMeta = async function ({ link, providerContext, }) {
title: "", title: "",
synopsis: "", synopsis: "",
image: "", image: "",
imdbId: meta?.imdbId || "", imdbId: (meta === null || meta === void 0 ? void 0 : meta.imdbId) || "",
type: meta?.type || "movie", type: (meta === null || meta === void 0 ? void 0 : meta.type) || "movie",
linkList: [], linkList: [],
}; };
} }
@@ -44,14 +55,14 @@ const getMeta = async function ({ link, providerContext, }) {
let directLinks = []; let directLinks = [];
let season = new Map(); let season = new Map();
if (meta.type === "series") { if (meta.type === "series") {
data?.meta?.videos?.map((video) => { (_h = (_g = data === null || data === void 0 ? void 0 : data.meta) === null || _g === void 0 ? void 0 : _g.videos) === null || _h === void 0 ? void 0 : _h.map((video) => {
if (video?.season <= 0) if ((video === null || video === void 0 ? void 0 : video.season) <= 0)
return; return;
if (!season.has(video?.season)) { if (!season.has(video === null || video === void 0 ? void 0 : video.season)) {
season.set(video?.season, []); season.set(video === null || video === void 0 ? void 0 : video.season, []);
} }
season.get(video?.season).push({ season.get(video === null || video === void 0 ? void 0 : video.season).push({
title: "Episode " + video?.episode, title: "Episode " + (video === null || video === void 0 ? void 0 : video.episode),
link: "", link: "",
}); });
}); });
@@ -66,10 +77,7 @@ const getMeta = async function ({ link, providerContext, }) {
directLinks.push({ title: "Movie", link: link }); directLinks.push({ title: "Movie", link: link });
links.push({ title: "Movie", directLinks: directLinks }); links.push({ title: "Movie", directLinks: directLinks });
} }
return { return Object.assign(Object.assign({}, meta), { linkList: links });
...meta,
linkList: links,
};
} }
catch (err) { catch (err) {
return { return {
@@ -81,5 +89,6 @@ const getMeta = async function ({ link, providerContext, }) {
linkList: [], linkList: [],
}; };
} }
});
}; };
exports.getMeta = getMeta; exports.getMeta = getMeta;

View File

@@ -1,21 +1,31 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getSearchPosts = exports.getPosts = void 0; exports.getSearchPosts = exports.getPosts = void 0;
const getPosts = async function ({ filter, signal, providerContext, }) { const getPosts = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ filter, signal, providerContext, }) {
try { try {
const catalog = []; const catalog = [];
const url = "https://cinemeta-catalogs.strem.io" + filter; const url = "https://cinemeta-catalogs.strem.io" + filter;
console.log("allGetPostUrl", url); console.log("allGetPostUrl", url);
const res = await providerContext.axios.get(url, { const res = yield providerContext.axios.get(url, {
headers: providerContext.commonHeaders, headers: providerContext.commonHeaders,
signal, signal,
}); });
const data = res.data; const data = res.data;
data?.metas.map((result) => { data === null || data === void 0 ? void 0 : data.metas.map((result) => {
const title = result?.name; const title = result === null || result === void 0 ? void 0 : result.name;
const id = result?.imdb_id || result?.id; const id = (result === null || result === void 0 ? void 0 : result.imdb_id) || (result === null || result === void 0 ? void 0 : result.id);
const type = result?.type; const type = result === null || result === void 0 ? void 0 : result.type;
const image = result?.poster; const image = result === null || result === void 0 ? void 0 : result.poster;
if (id) { if (id) {
catalog.push({ catalog.push({
title: title, title: title,
@@ -31,9 +41,11 @@ const getPosts = async function ({ filter, signal, providerContext, }) {
console.error("AutoEmbed error ", err); console.error("AutoEmbed error ", err);
return []; return [];
} }
});
}; };
exports.getPosts = getPosts; exports.getPosts = getPosts;
const getSearchPosts = async function ({ searchQuery, page, signal, providerContext, }) { const getSearchPosts = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ searchQuery, page, signal, providerContext, }) {
try { try {
const { axios, commonHeaders: headers } = providerContext; const { axios, commonHeaders: headers } = providerContext;
if (page > 1) { if (page > 1) {
@@ -41,13 +53,13 @@ const getSearchPosts = async function ({ searchQuery, page, signal, providerCont
} }
const catalog = []; const catalog = [];
const url2 = `https://v3-cinemeta.strem.io/catalog/movie/top/search=${encodeURI(searchQuery)}.json`; const url2 = `https://v3-cinemeta.strem.io/catalog/movie/top/search=${encodeURI(searchQuery)}.json`;
const res2 = await axios.get(url2, { headers, signal }); const res2 = yield axios.get(url2, { headers, signal });
const data2 = res2.data; const data2 = res2.data;
data2?.metas.map((result) => { data2 === null || data2 === void 0 ? void 0 : data2.metas.map((result) => {
const title = result?.name || ""; const title = (result === null || result === void 0 ? void 0 : result.name) || "";
const id = result?.imdb_id || result?.id; const id = (result === null || result === void 0 ? void 0 : result.imdb_id) || (result === null || result === void 0 ? void 0 : result.id);
const image = result?.poster; const image = result === null || result === void 0 ? void 0 : result.poster;
const type = result?.type; const type = result === null || result === void 0 ? void 0 : result.type;
if (id) { if (id) {
catalog.push({ catalog.push({
title: title, title: title,
@@ -62,5 +74,6 @@ const getSearchPosts = async function ({ searchQuery, page, signal, providerCont
console.error("AutoEmbed error ", err); console.error("AutoEmbed error ", err);
return []; return [];
} }
});
}; };
exports.getSearchPosts = getSearchPosts; exports.getSearchPosts = getSearchPosts;

View File

@@ -1,7 +1,17 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getStream = void 0; exports.getStream = void 0;
const getStream = async ({ link: data, providerContext, }) => { const getStream = (_a) => __awaiter(void 0, [_a], void 0, function* ({ link: data, providerContext, }) {
var _b, _c;
try { try {
const { cheerio, commonHeaders: headers, axios } = providerContext; const { cheerio, commonHeaders: headers, axios } = providerContext;
const streamData = JSON.parse(data); const streamData = JSON.parse(data);
@@ -15,18 +25,15 @@ const getStream = async ({ link: data, providerContext, }) => {
// const res = await axios.get(url, {headers}); // const res = await axios.get(url, {headers});
// const postId = res.data.split('\\"postid\\":\\"')[1].split('\\"')[0]; // const postId = res.data.split('\\"postid\\":\\"')[1].split('\\"')[0];
// console.log('rido post id', postId); // console.log('rido post id', postId);
const url = streamData?.baseUrl + "/api/" + streamData?.slug; const url = (streamData === null || streamData === void 0 ? void 0 : streamData.baseUrl) + "/api/" + (streamData === null || streamData === void 0 ? void 0 : streamData.slug);
console.log("rido url", url); console.log("rido url", url);
const res = await axios.get(url, { headers }); const res = yield axios.get(url, { headers });
const iframe = res.data.data?.[0]?.url; const iframe = (_c = (_b = res.data.data) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.url;
console.log("rido data", iframe); console.log("rido data", iframe);
const iframeUrl = iframe.split('src="')[1].split('"')[0]; const iframeUrl = iframe.split('src="')[1].split('"')[0];
console.log("rido iframeUrl", iframeUrl); console.log("rido iframeUrl", iframeUrl);
const iframeRes = await axios.get(iframeUrl, { const iframeRes = yield axios.get(iframeUrl, {
headers: { headers: Object.assign(Object.assign({}, headers), { Referer: streamData === null || streamData === void 0 ? void 0 : streamData.baseUrl }),
...headers,
Referer: streamData?.baseUrl,
},
}); });
const $ = cheerio.load(iframeRes.data); const $ = cheerio.load(iframeRes.data);
const script = $('script:contains("eval")').html(); const script = $('script:contains("eval")').html();
@@ -50,7 +57,7 @@ const getStream = async ({ link: data, providerContext, }) => {
console.log("rido get stream err", e); console.log("rido get stream err", e);
return []; return [];
} }
}; });
exports.getStream = getStream; exports.getStream = getStream;
function unpackJavaScript(packedCode) { function unpackJavaScript(packedCode) {
const encodedString = packedCode.split("|aHR")[1].split("|")[0]; const encodedString = packedCode.split("|aHR")[1].split("|")[0];

52
dist/ringz/meta.js vendored
View File

@@ -1,33 +1,42 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getMeta = void 0; exports.getMeta = void 0;
const getMeta = async function ({ link: data, }) { const getMeta = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ link: data, }) {
var _b, _c;
try { try {
const dataJson = JSON.parse(data); const dataJson = JSON.parse(data);
const title = dataJson?.kn || dataJson?.mn; const title = (dataJson === null || dataJson === void 0 ? void 0 : dataJson.kn) || (dataJson === null || dataJson === void 0 ? void 0 : dataJson.mn);
const image = dataJson?.IH || dataJson?.IV; const image = (dataJson === null || dataJson === void 0 ? void 0 : dataJson.IH) || (dataJson === null || dataJson === void 0 ? void 0 : dataJson.IV);
const tags = dataJson?.gn const tags = dataJson === null || dataJson === void 0 ? void 0 : dataJson.gn.split(",").slice(0, 3).map((tag) => tag.trim());
.split(",") const type = (dataJson === null || dataJson === void 0 ? void 0 : dataJson.cg) === "webSeries" ? "series" : "movie";
.slice(0, 3)
.map((tag) => tag.trim());
const type = dataJson?.cg === "webSeries" ? "series" : "movie";
const linkList = []; const linkList = [];
if (dataJson?.cg === "webSeries") { if ((dataJson === null || dataJson === void 0 ? void 0 : dataJson.cg) === "webSeries") {
["1", "2", "3", "4"]?.forEach((item) => { (_b = ["1", "2", "3", "4"]) === null || _b === void 0 ? void 0 : _b.forEach((item) => {
var _a;
const directLinks = []; const directLinks = [];
if (typeof dataJson?.["eServer" + item] === "object" && if (typeof (dataJson === null || dataJson === void 0 ? void 0 : dataJson["eServer" + item]) === "object" &&
Object?.keys(dataJson?.["eServer" + item])?.length > 0) { ((_a = Object === null || Object === void 0 ? void 0 : Object.keys(dataJson === null || dataJson === void 0 ? void 0 : dataJson["eServer" + item])) === null || _a === void 0 ? void 0 : _a.length) > 0) {
Object.keys(dataJson?.["eServer" + item]).forEach((key) => { Object.keys(dataJson === null || dataJson === void 0 ? void 0 : dataJson["eServer" + item]).forEach((key) => {
directLinks.push({ directLinks.push({
title: "Episode " + key, title: "Episode " + key,
link: JSON.stringify({ link: JSON.stringify({
url: dataJson?.["eServer" + item][key], url: dataJson === null || dataJson === void 0 ? void 0 : dataJson["eServer" + item][key],
server: "Server " + item, server: "Server " + item,
}), }),
}); });
}); });
linkList.push({ linkList.push({
title: dataJson?.pn + " (Server " + item + ")", title: (dataJson === null || dataJson === void 0 ? void 0 : dataJson.pn) + " (Server " + item + ")",
directLinks, directLinks,
}); });
} }
@@ -35,28 +44,28 @@ const getMeta = async function ({ link: data, }) {
} }
else { else {
const directLinks = []; const directLinks = [];
["1", "2", "3", "4"]?.forEach((item) => { (_c = ["1", "2", "3", "4"]) === null || _c === void 0 ? void 0 : _c.forEach((item) => {
if (dataJson?.["s" + item]) { if (dataJson === null || dataJson === void 0 ? void 0 : dataJson["s" + item]) {
directLinks.push({ directLinks.push({
title: "Server " + item + " (HD)", title: "Server " + item + " (HD)",
link: JSON.stringify({ link: JSON.stringify({
url: dataJson?.s1, url: dataJson === null || dataJson === void 0 ? void 0 : dataJson.s1,
server: "Server " + item, server: "Server " + item,
}), }),
}); });
} }
if (dataJson?.["4s" + item]) { if (dataJson === null || dataJson === void 0 ? void 0 : dataJson["4s" + item]) {
directLinks.push({ directLinks.push({
title: "Server " + item + " (480p)", title: "Server " + item + " (480p)",
link: JSON.stringify({ link: JSON.stringify({
url: dataJson?.["4s" + item], url: dataJson === null || dataJson === void 0 ? void 0 : dataJson["4s" + item],
server: "Server " + item, server: "Server " + item,
}), }),
}); });
} }
}); });
linkList.push({ linkList.push({
title: dataJson?.pn, title: dataJson === null || dataJson === void 0 ? void 0 : dataJson.pn,
directLinks, directLinks,
}); });
} }
@@ -81,5 +90,6 @@ const getMeta = async function ({ link: data, }) {
tags: [], tags: [],
}; };
} }
});
}; };
exports.getMeta = getMeta; exports.getMeta = getMeta;

93
dist/ringz/posts.js vendored
View File

@@ -1,15 +1,27 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.ringzData = exports.headers = exports.getSearchPosts = exports.getPosts = void 0; exports.ringzData = exports.headers = exports.getSearchPosts = exports.getPosts = void 0;
exports.getRingzMovies = getRingzMovies; exports.getRingzMovies = getRingzMovies;
exports.getRingzShows = getRingzShows; exports.getRingzShows = getRingzShows;
exports.getRingzAnime = getRingzAnime; exports.getRingzAnime = getRingzAnime;
exports.getRingzAdult = getRingzAdult; exports.getRingzAdult = getRingzAdult;
const getPosts = async function ({ filter, signal, providerContext, }) { const getPosts = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ filter, signal, providerContext, }) {
return posts({ filter, signal, providerContext }); return posts({ filter, signal, providerContext });
});
}; };
exports.getPosts = getPosts; exports.getPosts = getPosts;
const getSearchPosts = async function ({ searchQuery, page, // providerContext, const getSearchPosts = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ searchQuery, page, // providerContext,
}) { }) {
if (page > 1) if (page > 1)
return []; return [];
@@ -26,13 +38,13 @@ const getSearchPosts = async function ({ searchQuery, page, // providerContext,
try { try {
const catalog = []; const catalog = [];
const promises = [getRingzMovies(), getRingzShows(), getRingzAnime()]; const promises = [getRingzMovies(), getRingzShows(), getRingzAnime()];
const responses = await Promise.all(promises); const responses = yield Promise.all(promises);
responses.map((response) => { responses.map((response) => {
const searchResults = searchData(response, searchQuery); const searchResults = searchData(response, searchQuery);
searchResults.map((element) => { searchResults.map((element) => {
const title = element?.kn || element?.mn; const title = (element === null || element === void 0 ? void 0 : element.kn) || (element === null || element === void 0 ? void 0 : element.mn);
const link = JSON.stringify(element); const link = JSON.stringify(element);
const image = element?.IV; const image = element === null || element === void 0 ? void 0 : element.IV;
if (title && link) { if (title && link) {
catalog.push({ catalog.push({
title: title, title: title,
@@ -48,9 +60,11 @@ const getSearchPosts = async function ({ searchQuery, page, // providerContext,
console.error("ringz error ", err); console.error("ringz error ", err);
return []; return [];
} }
});
}; };
exports.getSearchPosts = getSearchPosts; exports.getSearchPosts = getSearchPosts;
async function posts({ filter, // signal, function posts(_a) {
return __awaiter(this, arguments, void 0, function* ({ filter, // signal,
}) { }) {
try { try {
let response; let response;
@@ -63,12 +77,12 @@ async function posts({ filter, // signal,
if (filter === "ANIME") { if (filter === "ANIME") {
response = getRingzAnime(); response = getRingzAnime();
} }
const data = await response; const data = yield response;
const catalog = []; const catalog = [];
data.map((element) => { data.map((element) => {
const title = element?.kn || element?.mn; const title = (element === null || element === void 0 ? void 0 : element.kn) || (element === null || element === void 0 ? void 0 : element.mn);
const link = JSON.stringify(element); const link = JSON.stringify(element);
const image = element?.IV; const image = element === null || element === void 0 ? void 0 : element.IV;
if (title && link) { if (title && link) {
catalog.push({ catalog.push({
title: title, title: title,
@@ -83,67 +97,68 @@ async function posts({ filter, // signal,
console.error("ringz error ", err); console.error("ringz error ", err);
return []; return [];
} }
});
} }
exports.headers = { exports.headers = {
"cf-access-client-id": "833049b087acf6e787cedfd85d1ccdb8.access", "cf-access-client-id": "833049b087acf6e787cedfd85d1ccdb8.access",
"cf-access-client-secret": "02db296a961d7513c3102d7785df4113eff036b2d57d060ffcc2ba3ba820c6aa", "cf-access-client-secret": "02db296a961d7513c3102d7785df4113eff036b2d57d060ffcc2ba3ba820c6aa",
}; };
const BASE_URL = "https://privatereporz.pages.dev"; const BASE_URL = "https://privatereporz.pages.dev";
async function getRingzMovies() { function getRingzMovies() {
return __awaiter(this, void 0, void 0, function* () {
try { try {
const response = await fetch(`${BASE_URL}/test.json`, { const response = yield fetch(`${BASE_URL}/test.json`, {
headers: { headers: Object.assign({}, exports.headers),
...exports.headers,
},
}); });
const data = await response.json(); const data = yield response.json();
return data.AllMovieDataList; return data.AllMovieDataList;
} }
catch (error) { catch (error) {
console.error(error); console.error(error);
} }
}
async function getRingzShows() {
try {
const response = await fetch(`${BASE_URL}/srs.json`, {
headers: {
...exports.headers,
},
}); });
const data = await response.json(); }
function getRingzShows() {
return __awaiter(this, void 0, void 0, function* () {
try {
const response = yield fetch(`${BASE_URL}/srs.json`, {
headers: Object.assign({}, exports.headers),
});
const data = yield response.json();
return data.webSeriesDataList; return data.webSeriesDataList;
} }
catch (error) { catch (error) {
console.error(error); console.error(error);
} }
}
async function getRingzAnime() {
try {
const response = await fetch(`${BASE_URL}/anime.json`, {
headers: {
...exports.headers,
},
}); });
const data = await response.json(); }
function getRingzAnime() {
return __awaiter(this, void 0, void 0, function* () {
try {
const response = yield fetch(`${BASE_URL}/anime.json`, {
headers: Object.assign({}, exports.headers),
});
const data = yield response.json();
return data.webSeriesDataList; return data.webSeriesDataList;
} }
catch (error) { catch (error) {
console.error(error); console.error(error);
} }
}
async function getRingzAdult() {
try {
const response = await fetch(`${BASE_URL}/desihub.json`, {
headers: {
...exports.headers,
},
}); });
const data = await response.json(); }
function getRingzAdult() {
return __awaiter(this, void 0, void 0, function* () {
try {
const response = yield fetch(`${BASE_URL}/desihub.json`, {
headers: Object.assign({}, exports.headers),
});
const data = yield response.json();
return data.webSeriesDataList; return data.webSeriesDataList;
} }
catch (error) { catch (error) {
console.error(error); console.error(error);
} }
});
} }
exports.ringzData = { exports.ringzData = {
getRingzMovies, getRingzMovies,

13
dist/ringz/stream.js vendored
View File

@@ -1,7 +1,17 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getStream = void 0; exports.getStream = void 0;
const getStream = async function ({ link: data, }) { const getStream = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ link: data, }) {
const streamLinks = []; const streamLinks = [];
const dataJson = JSON.parse(data); const dataJson = JSON.parse(data);
streamLinks.push({ streamLinks.push({
@@ -10,5 +20,6 @@ const getStream = async function ({ link: data, }) {
type: "mkv", type: "mkv",
}); });
return streamLinks; return streamLinks;
});
}; };
exports.getStream = getStream; exports.getStream = getStream;

View File

@@ -1,20 +1,30 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getEpisodes = void 0; exports.getEpisodes = void 0;
const getEpisodes = async function ({ url: id, providerContext, }) { const getEpisodes = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ url: id, providerContext, }) {
const { axios } = providerContext; const { axios } = providerContext;
try { try {
const [fileId, febboxId] = id.split("&"); const [fileId, febboxId] = id.split("&");
const febLink = febboxId const febLink = febboxId
? `https://www.febbox.com/file/file_share_list?share_key=${fileId}&pwd=&parent_id=${febboxId}&is_html=0` ? `https://www.febbox.com/file/file_share_list?share_key=${fileId}&pwd=&parent_id=${febboxId}&is_html=0`
: `https://www.febbox.com/file/file_share_list?share_key=${fileId}&pwd=&is_html=0`; : `https://www.febbox.com/file/file_share_list?share_key=${fileId}&pwd=&is_html=0`;
const res = await axios.get(febLink); const res = yield axios.get(febLink);
const data = res.data; const data = res.data;
const fileList = data.data.file_list; const fileList = data.data.file_list;
const episodeLinks = []; const episodeLinks = [];
fileList?.map((file) => { fileList === null || fileList === void 0 ? void 0 : fileList.map((file) => {
const fileName = formatEpisodeName(file.file_name); const fileName = formatEpisodeName(file.file_name);
const epId = file?.fid; const epId = file === null || file === void 0 ? void 0 : file.fid;
if (!file.is_dir && fileName && epId) { if (!file.is_dir && fileName && epId) {
episodeLinks.push({ episodeLinks.push({
title: fileName, title: fileName,
@@ -27,6 +37,7 @@ const getEpisodes = async function ({ url: id, providerContext, }) {
catch (err) { catch (err) {
return []; return [];
} }
});
}; };
exports.getEpisodes = getEpisodes; exports.getEpisodes = getEpisodes;
function formatEpisodeName(title) { function formatEpisodeName(title) {

37
dist/showbox/meata.js vendored
View File

@@ -1,34 +1,42 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getMeta = void 0; exports.getMeta = void 0;
const getMeta = async function ({ link, providerContext, }) { const getMeta = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ link, providerContext, }) {
var _b, _c, _d, _e, _f, _g, _h, _j, _k;
try { try {
const { axios, cheerio } = providerContext; const { axios, cheerio } = providerContext;
const url = link; const url = link;
const res = await axios.get(url); const res = yield axios.get(url);
const data = res.data; const data = res.data;
const $ = cheerio.load(data); const $ = cheerio.load(data);
const type = url.includes("tv") ? "series" : "movie"; const type = url.includes("tv") ? "series" : "movie";
const imdbId = ""; const imdbId = "";
const title = $(".heading-name").text(); const title = $(".heading-name").text();
const rating = $(".btn-imdb") const rating = ((_c = (_b = $(".btn-imdb")
.text() .text()) === null || _b === void 0 ? void 0 : _b.match(/\d+(\.\d+)?/g)) === null || _c === void 0 ? void 0 : _c[0]) || "";
?.match(/\d+(\.\d+)?/g)?.[0] || ""; const image = ((_e = (_d = $(".cover_follow").attr("style")) === null || _d === void 0 ? void 0 : _d.split("url(")[1]) === null || _e === void 0 ? void 0 : _e.split(")")[0]) || "";
const image = $(".cover_follow").attr("style")?.split("url(")[1]?.split(")")[0] || ""; const synopsis = (_g = (_f = $(".description")
const synopsis = $(".description") .text()) === null || _f === void 0 ? void 0 : _f.replace(/[\n\t]/g, "")) === null || _g === void 0 ? void 0 : _g.trim();
.text() const febID = (_j = (_h = $(".heading-name").find("a").attr("href")) === null || _h === void 0 ? void 0 : _h.split("/")) === null || _j === void 0 ? void 0 : _j.pop();
?.replace(/[\n\t]/g, "")
?.trim();
const febID = $(".heading-name").find("a").attr("href")?.split("/")?.pop();
const baseUrl = url.split("/").slice(0, 3).join("/"); const baseUrl = url.split("/").slice(0, 3).join("/");
const indexUrl = `${baseUrl}/index/share_link?id=${febID}&type=${type === "movie" ? "1" : "2"}`; const indexUrl = `${baseUrl}/index/share_link?id=${febID}&type=${type === "movie" ? "1" : "2"}`;
const indexRes = await axios.get(indexUrl); const indexRes = yield axios.get(indexUrl);
const indexData = indexRes.data; const indexData = indexRes.data;
const febKey = indexData.data.link.split("/").pop(); const febKey = indexData.data.link.split("/").pop();
const febLink = `https://www.febbox.com/file/file_share_list?share_key=${febKey}&is_html=0`; const febLink = `https://www.febbox.com/file/file_share_list?share_key=${febKey}&is_html=0`;
const febRes = await axios.get(febLink); const febRes = yield axios.get(febLink);
const febData = febRes.data; const febData = febRes.data;
const fileList = febData?.data?.file_list; const fileList = (_k = febData === null || febData === void 0 ? void 0 : febData.data) === null || _k === void 0 ? void 0 : _k.file_list;
const links = []; const links = [];
if (fileList) { if (fileList) {
fileList.map((file) => { fileList.map((file) => {
@@ -61,5 +69,6 @@ const getMeta = async function ({ link, providerContext, }) {
linkList: [], linkList: [],
}; };
} }
});
}; };
exports.getMeta = getMeta; exports.getMeta = getMeta;

39
dist/showbox/posts.js vendored
View File

@@ -1,29 +1,43 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getSearchPosts = exports.getPosts = void 0; exports.getSearchPosts = exports.getPosts = void 0;
const getPosts = async function ({ filter, page, const getPosts = function (_a) {
// providerValue, return __awaiter(this, arguments, void 0, function* ({ filter, page,
signal, providerContext, }) { // providerValue,
signal, providerContext, }) {
const { getBaseUrl, axios, cheerio } = providerContext; const { getBaseUrl, axios, cheerio } = providerContext;
const baseUrl = await getBaseUrl("showbox"); const baseUrl = yield getBaseUrl("showbox");
const url = `${baseUrl + filter}?page=${page}/`; const url = `${baseUrl + filter}?page=${page}/`;
return posts({ url, signal, baseUrl, axios, cheerio }); return posts({ url, signal, baseUrl, axios, cheerio });
});
}; };
exports.getPosts = getPosts; exports.getPosts = getPosts;
const getSearchPosts = async function ({ searchQuery, page, const getSearchPosts = function (_a) {
// providerValue, return __awaiter(this, arguments, void 0, function* ({ searchQuery, page,
signal, providerContext, }) { // providerValue,
signal, providerContext, }) {
const { getBaseUrl, axios, cheerio } = providerContext; const { getBaseUrl, axios, cheerio } = providerContext;
const baseUrl = await getBaseUrl("showbox"); const baseUrl = yield getBaseUrl("showbox");
const url = `${baseUrl}/search?keyword=${searchQuery}&page=${page}`; const url = `${baseUrl}/search?keyword=${searchQuery}&page=${page}`;
return posts({ url, signal, baseUrl, axios, cheerio }); return posts({ url, signal, baseUrl, axios, cheerio });
});
}; };
exports.getSearchPosts = getSearchPosts; exports.getSearchPosts = getSearchPosts;
async function posts({ url, signal, function posts(_a) {
// baseUrl, return __awaiter(this, arguments, void 0, function* ({ url, signal,
axios, cheerio, }) { // baseUrl,
axios, cheerio, }) {
try { try {
const res = await axios.get(url, { signal }); const res = yield axios.get(url, { signal });
const data = res.data; const data = res.data;
const $ = cheerio.load(data); const $ = cheerio.load(data);
const catalog = []; const catalog = [];
@@ -44,4 +58,5 @@ axios, cheerio, }) {
catch (err) { catch (err) {
return []; return [];
} }
});
} }

View File

@@ -32,18 +32,28 @@ var __importStar = (this && this.__importStar) || (function () {
return result; return result;
}; };
})(); })();
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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getStream = void 0; exports.getStream = void 0;
const cheerio = __importStar(require("cheerio")); const cheerio = __importStar(require("cheerio"));
const getStream = async function ({ link: id, const getStream = function (_a) {
// type, return __awaiter(this, arguments, void 0, function* ({ link: id,
signal, providerContext, }) { // type,
signal, providerContext, }) {
try { try {
const { axios } = providerContext; const { axios } = providerContext;
const stream = []; const stream = [];
const [, epId] = id.split("&"); const [, epId] = id.split("&");
const url = `https://febbox.vercel.app/api/video-quality?fid=${epId}`; const url = `https://febbox.vercel.app/api/video-quality?fid=${epId}`;
const res = await axios.get(url, { signal }); const res = yield axios.get(url, { signal });
const data = res.data; const data = res.data;
const $ = cheerio.load(data.html); const $ = cheerio.load(data.html);
$(".file_quality").each((i, el) => { $(".file_quality").each((i, el) => {
@@ -66,5 +76,6 @@ signal, providerContext, }) {
catch (err) { catch (err) {
return []; return [];
} }
});
}; };
exports.getStream = getStream; exports.getStream = getStream;

View File

@@ -1,7 +1,18 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.superVideoExtractor = superVideoExtractor; exports.superVideoExtractor = superVideoExtractor;
async function superVideoExtractor(data) { function superVideoExtractor(data) {
return __awaiter(this, void 0, void 0, function* () {
var _a, _b;
try { try {
// Step 1: Extract the function parameters and the encoded string // Step 1: Extract the function parameters and the encoded string
var functionRegex = /eval\(function\((.*?)\)\{.*?return p\}.*?\('(.*?)'\.split/; var functionRegex = /eval\(function\((.*?)\)\{.*?return p\}.*?\('(.*?)'\.split/;
@@ -12,7 +23,7 @@ async function superVideoExtractor(data) {
var encodedString = match[2]; var encodedString = match[2];
// console.log('Parameters:', params); // console.log('Parameters:', params);
// console.log('Encoded String:', encodedString.split("',36,")[0], '🔥🔥'); // console.log('Encoded String:', encodedString.split("',36,")[0], '🔥🔥');
p = encodedString.split("',36,")?.[0].trim(); p = (_a = encodedString.split("',36,")) === null || _a === void 0 ? void 0 : _a[0].trim();
let a = 36; let a = 36;
let c = encodedString.split("',36,")[1].slice(2).split('|').length; let c = encodedString.split("',36,")[1].slice(2).split('|').length;
let k = encodedString.split("',36,")[1].slice(2).split('|'); let k = encodedString.split("',36,")[1].slice(2).split('|');
@@ -27,7 +38,7 @@ async function superVideoExtractor(data) {
else { else {
console.log('No match found'); console.log('No match found');
} }
const streamUrl = p?.match(/file:\s*"([^"]+\.m3u8[^"]*)"/)?.[1]; const streamUrl = (_b = p === null || p === void 0 ? void 0 : p.match(/file:\s*"([^"]+\.m3u8[^"]*)"/)) === null || _b === void 0 ? void 0 : _b[1];
console.log('streamUrl:', streamUrl); console.log('streamUrl:', streamUrl);
return streamUrl || ''; return streamUrl || '';
} }
@@ -35,4 +46,5 @@ async function superVideoExtractor(data) {
console.error('SuperVideoExtractor Error:', err); console.error('SuperVideoExtractor Error:', err);
return ''; return '';
} }
});
} }

View File

@@ -1,12 +1,22 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getMeta = void 0; exports.getMeta = void 0;
const getMeta = async function ({ link, providerContext, }) { const getMeta = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ link, providerContext, }) {
try { try {
const { cheerio } = providerContext; const { cheerio } = providerContext;
const url = link; const url = link;
const res = await fetch(url); const res = yield fetch(url);
const data = await res.text(); const data = yield res.text();
const $ = cheerio.load(data); const $ = cheerio.load(data);
const meta = { const meta = {
title: $('.c_h2:contains("Title(s):")') title: $('.c_h2:contains("Title(s):")')
@@ -36,15 +46,12 @@ const getMeta = async function ({ link, providerContext, }) {
episodesList.push({ title, link }); episodesList.push({ title, link });
} }
}); });
return { return Object.assign(Object.assign({}, meta), { linkList: [
...meta,
linkList: [
{ {
title: meta.title, title: meta.title,
directLinks: episodesList, directLinks: episodesList,
}, },
], ] });
};
} }
catch (err) { catch (err) {
return { return {
@@ -56,5 +63,6 @@ const getMeta = async function ({ link, providerContext, }) {
linkList: [], linkList: [],
}; };
} }
});
}; };
exports.getMeta = getMeta; exports.getMeta = getMeta;

View File

@@ -1,37 +1,51 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getSearchPosts = exports.getPosts = void 0; exports.getSearchPosts = exports.getPosts = void 0;
const getPosts = async function ({ filter, page, const getPosts = function (_a) {
// providerValue, return __awaiter(this, arguments, void 0, function* ({ filter, page,
signal, providerContext, }) { // providerValue,
signal, providerContext, }) {
const { getBaseUrl, axios, cheerio } = providerContext; const { getBaseUrl, axios, cheerio } = providerContext;
const baseURL = await getBaseUrl("tokyoinsider"); const baseURL = yield getBaseUrl("tokyoinsider");
const start = page < 2 ? 0 : (page - 1) * 20; const start = page < 2 ? 0 : (page - 1) * 20;
const url = `${baseURL}/${filter}&start=${start}`; const url = `${baseURL}/${filter}&start=${start}`;
return posts({ baseURL, url, signal, axios, cheerio }); return posts({ baseURL, url, signal, axios, cheerio });
});
}; };
exports.getPosts = getPosts; exports.getPosts = getPosts;
const getSearchPosts = async function ({ searchQuery, page, const getSearchPosts = function (_a) {
// providerValue, return __awaiter(this, arguments, void 0, function* ({ searchQuery, page,
signal, providerContext, }) { // providerValue,
signal, providerContext, }) {
const { getBaseUrl, axios, cheerio } = providerContext; const { getBaseUrl, axios, cheerio } = providerContext;
const baseURL = await getBaseUrl("tokyoinsider"); const baseURL = yield getBaseUrl("tokyoinsider");
const start = page < 2 ? 0 : (page - 1) * 20; const start = page < 2 ? 0 : (page - 1) * 20;
const url = `${baseURL}/anime/search?k=${searchQuery}&start=${start}`; const url = `${baseURL}/anime/search?k=${searchQuery}&start=${start}`;
return posts({ baseURL, url, signal, axios, cheerio }); return posts({ baseURL, url, signal, axios, cheerio });
});
}; };
exports.getSearchPosts = getSearchPosts; exports.getSearchPosts = getSearchPosts;
async function posts({ baseURL, url, signal, axios, cheerio, }) { function posts(_a) {
return __awaiter(this, arguments, void 0, function* ({ baseURL, url, signal, axios, cheerio, }) {
try { try {
const res = await axios.get(url, { signal }); const res = yield axios.get(url, { signal });
const data = res.data; const data = res.data;
const $ = cheerio.load(data); const $ = cheerio.load(data);
const catalog = []; const catalog = [];
$('td.c_h2[width="40"]').map((i, element) => { $('td.c_h2[width="40"]').map((i, element) => {
const image = $(element) var _a;
const image = (_a = $(element)
.find(".a_img") .find(".a_img")
.attr("src") .attr("src")) === null || _a === void 0 ? void 0 : _a.replace("small", "default");
?.replace("small", "default");
const title = $(element).find("a").attr("title"); const title = $(element).find("a").attr("title");
const link = baseURL + $(element).find("a").attr("href"); const link = baseURL + $(element).find("a").attr("href");
if (title && link && image) { if (title && link && image) {
@@ -47,4 +61,5 @@ async function posts({ baseURL, url, signal, axios, cheerio, }) {
catch (err) { catch (err) {
return []; return [];
} }
});
} }

View File

@@ -1,12 +1,22 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getStream = void 0; exports.getStream = void 0;
const getStream = async function ({ link, providerContext, }) { const getStream = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ link, providerContext, }) {
try { try {
const { cheerio } = providerContext; const { cheerio } = providerContext;
const url = link; const url = link;
const res = await fetch(url); const res = yield fetch(url);
const data = await res.text(); const data = yield res.text();
const $ = cheerio.load(data); const $ = cheerio.load(data);
const streamLinks = []; const streamLinks = [];
$(".c_h1,.c_h2").map((i, element) => { $(".c_h1,.c_h2").map((i, element) => {
@@ -26,5 +36,6 @@ const getStream = async function ({ link, providerContext, }) {
catch (err) { catch (err) {
return []; return [];
} }
});
}; };
exports.getStream = getStream; exports.getStream = getStream;

View File

@@ -1,20 +1,30 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getEpisodes = void 0; exports.getEpisodes = void 0;
const getEpisodes = async function ({ url, providerContext, }) { const getEpisodes = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ url, providerContext, }) {
var _b;
const { axios, cheerio } = providerContext; const { axios, cheerio } = providerContext;
try { try {
if (url.includes("url=")) { if (url.includes("url=")) {
url = atob(url.split("url=")[1]); url = atob(url.split("url=")[1]);
} }
const res = await axios.get(url); const res = yield axios.get(url);
const html = res.data; const html = res.data;
let $ = cheerio.load(html); let $ = cheerio.load(html);
if (url.includes("url=")) { if (url.includes("url=")) {
const newUrl = $("meta[http-equiv='refresh']") const newUrl = (_b = $("meta[http-equiv='refresh']")
.attr("content") .attr("content")) === null || _b === void 0 ? void 0 : _b.split("url=")[1];
?.split("url=")[1]; const res2 = yield axios.get(newUrl || url);
const res2 = await axios.get(newUrl || url);
const html2 = res2.data; const html2 = res2.data;
$ = cheerio.load(html2); $ = cheerio.load(html2);
} }
@@ -45,5 +55,6 @@ const getEpisodes = async function ({ url, providerContext, }) {
console.error(err); console.error(err);
return []; return [];
} }
});
}; };
exports.getEpisodes = getEpisodes; exports.getEpisodes = getEpisodes;

View File

@@ -1,24 +1,36 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getMeta = void 0; exports.getMeta = void 0;
const getMeta = async function ({ link, providerContext, }) { const getMeta = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ link, providerContext, }) {
var _b;
try { try {
const { axios, cheerio } = providerContext; const { axios, cheerio } = providerContext;
const url = link; const url = link;
const res = await axios.get(url); const res = yield axios.get(url);
const data = res.data; const data = res.data;
const $ = cheerio.load(data); const $ = cheerio.load(data);
const meta = { const meta = {
title: $(".imdbwp__title").text(), title: $(".imdbwp__title").text(),
synopsis: $(".imdbwp__teaser").text(), synopsis: $(".imdbwp__teaser").text(),
image: $(".imdbwp__thumb").find("img").attr("src") || "", image: $(".imdbwp__thumb").find("img").attr("src") || "",
imdbId: $(".imdbwp__link").attr("href")?.split("/")[4] || "", imdbId: ((_b = $(".imdbwp__link").attr("href")) === null || _b === void 0 ? void 0 : _b.split("/")[4]) || "",
type: $(".thecontent").text().toLocaleLowerCase().includes("season") type: $(".thecontent").text().toLocaleLowerCase().includes("season")
? "series" ? "series"
: "movie", : "movie",
}; };
const links = []; const links = [];
$("h3,h4").map((i, element) => { $("h3,h4").map((i, element) => {
var _a;
const seriesTitle = $(element).text(); const seriesTitle = $(element).text();
// const batchZipLink = $(element) // const batchZipLink = $(element)
// .next("p") // .next("p")
@@ -40,12 +52,12 @@ const getMeta = async function ({ link, providerContext, }) {
directLinks: movieLink directLinks: movieLink
? [{ link: movieLink, title: "Movie", type: "movie" }] ? [{ link: movieLink, title: "Movie", type: "movie" }]
: [], : [],
quality: seriesTitle?.match(/\d+p\b/)?.[0] || "", quality: ((_a = seriesTitle === null || seriesTitle === void 0 ? void 0 : seriesTitle.match(/\d+p\b/)) === null || _a === void 0 ? void 0 : _a[0]) || "",
}); });
} }
}); });
// console.log('mod meta', links); // console.log('mod meta', links);
return { ...meta, linkList: links }; return Object.assign(Object.assign({}, meta), { linkList: links });
} }
catch (err) { catch (err) {
console.error(err); console.error(err);
@@ -58,5 +70,6 @@ const getMeta = async function ({ link, providerContext, }) {
linkList: [], linkList: [],
}; };
} }
});
}; };
exports.getMeta = getMeta; exports.getMeta = getMeta;

View File

@@ -1,4 +1,13 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getSearchPosts = exports.getPosts = void 0; exports.getSearchPosts = exports.getPosts = void 0;
const headers = { const headers = {
@@ -17,24 +26,29 @@ const headers = {
"Upgrade-Insecure-Requests": "1", "Upgrade-Insecure-Requests": "1",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0",
}; };
const getPosts = async function ({ filter, page, signal, providerContext, }) { const getPosts = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ filter, page, signal, providerContext, }) {
const { getBaseUrl } = providerContext; const { getBaseUrl } = providerContext;
const baseUrl = await getBaseUrl("Topmovies"); const baseUrl = yield getBaseUrl("Topmovies");
const url = `${baseUrl + filter}/page/${page}/`; const url = `${baseUrl + filter}/page/${page}/`;
return posts(url, signal, providerContext); return posts(url, signal, providerContext);
});
}; };
exports.getPosts = getPosts; exports.getPosts = getPosts;
const getSearchPosts = async function ({ searchQuery, page, signal, providerContext, }) { const getSearchPosts = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ searchQuery, page, signal, providerContext, }) {
const { getBaseUrl } = providerContext; const { getBaseUrl } = providerContext;
const baseUrl = await getBaseUrl("Topmovies"); const baseUrl = yield getBaseUrl("Topmovies");
const url = `${baseUrl}/search/${searchQuery}/page/${page}/`; const url = `${baseUrl}/search/${searchQuery}/page/${page}/`;
return posts(url, signal, providerContext); return posts(url, signal, providerContext);
});
}; };
exports.getSearchPosts = getSearchPosts; exports.getSearchPosts = getSearchPosts;
async function posts(url, signal, providerContext) { function posts(url, signal, providerContext) {
return __awaiter(this, void 0, void 0, function* () {
try { try {
const { axios, cheerio } = providerContext; const { axios, cheerio } = providerContext;
const res = await axios.get(url, { headers, signal }); const res = yield axios.get(url, { headers, signal });
const data = res.data; const data = res.data;
const $ = cheerio.load(data); const $ = cheerio.load(data);
const catalog = []; const catalog = [];
@@ -61,4 +75,5 @@ async function posts(url, signal, providerContext) {
console.error("mod error ", err); console.error("mod error ", err);
return []; return [];
} }
});
} }

View File

@@ -1,4 +1,13 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getStream = void 0; exports.getStream = void 0;
const headers = { const headers = {
@@ -17,23 +26,26 @@ const headers = {
"Upgrade-Insecure-Requests": "1", "Upgrade-Insecure-Requests": "1",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0",
}; };
const getStream = async function ({ link: url, type, providerContext, }) { const getStream = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ link: url, type, providerContext, }) {
var _b, _c;
const { axios, cheerio } = providerContext; const { axios, cheerio } = providerContext;
try { try {
const modGetEpisodeLinks = async function ({ url, providerContext, }) { const modGetEpisodeLinks = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ url, providerContext, }) {
var _b;
const { axios, cheerio } = providerContext; const { axios, cheerio } = providerContext;
try { try {
if (url.includes("url=")) { if (url.includes("url=")) {
url = atob(url.split("url=")[1]); url = atob(url.split("url=")[1]);
} }
const res = await axios.get(url); const res = yield axios.get(url);
const html = res.data; const html = res.data;
let $ = cheerio.load(html); let $ = cheerio.load(html);
if (url.includes("url=")) { if (url.includes("url=")) {
const newUrl = $("meta[http-equiv='refresh']") const newUrl = (_b = $("meta[http-equiv='refresh']")
.attr("content") .attr("content")) === null || _b === void 0 ? void 0 : _b.split("url=")[1];
?.split("url=")[1]; const res2 = yield axios.get(newUrl || url);
const res2 = await axios.get(newUrl || url);
const html2 = res2.data; const html2 = res2.data;
$ = cheerio.load(html2); $ = cheerio.load(html2);
} }
@@ -64,26 +76,27 @@ const getStream = async function ({ link: url, type, providerContext, }) {
console.error(err); console.error(err);
return []; return [];
} }
});
}; };
console.log("modGetStream", type, url); console.log("modGetStream", type, url);
if (type === "movie") { if (type === "movie") {
const servers = await modGetEpisodeLinks({ url, providerContext }); const servers = yield modGetEpisodeLinks({ url, providerContext });
url = servers[0].link || url; url = servers[0].link || url;
} }
let downloadLink = await modExtractor(url, providerContext); let downloadLink = yield modExtractor(url, providerContext);
// console.log(downloadLink.data); // console.log(downloadLink.data);
const ddl = downloadLink?.data?.match(/content="0;url=(.*?)"/)?.[1] || url; const ddl = ((_c = (_b = downloadLink === null || downloadLink === void 0 ? void 0 : downloadLink.data) === null || _b === void 0 ? void 0 : _b.match(/content="0;url=(.*?)"/)) === null || _c === void 0 ? void 0 : _c[1]) || url;
// console.log('ddl', url); // console.log('ddl', url);
// console.log(ddl); // console.log(ddl);
// console.log(ddl); // console.log(ddl);
const servers = []; const servers = [];
const driveLink = await isDriveLink(ddl); const driveLink = yield isDriveLink(ddl);
const driveRes = await axios.get(driveLink, { headers }); const driveRes = yield axios.get(driveLink, { headers });
const driveHtml = driveRes.data; const driveHtml = driveRes.data;
const $drive = cheerio.load(driveHtml); const $drive = cheerio.load(driveHtml);
try { try {
const resumeBot = $drive(".btn.btn-light").attr("href") || ""; const resumeBot = $drive(".btn.btn-light").attr("href") || "";
const resumeBotRes = await axios.get(resumeBot, { headers }); const resumeBotRes = yield axios.get(resumeBot, { headers });
const resumeBotToken = resumeBotRes.data.match(/formData\.append\('token', '([a-f0-9]+)'\)/)[1]; const resumeBotToken = resumeBotRes.data.match(/formData\.append\('token', '([a-f0-9]+)'\)/)[1];
const resumeBotBody = new FormData(); const resumeBotBody = new FormData();
resumeBotBody.append("token", resumeBotToken); resumeBotBody.append("token", resumeBotToken);
@@ -94,7 +107,7 @@ const getStream = async function ({ link: url, type, providerContext, }) {
// resumeBotBaseUrl + '/download?id=' + resumeBotPath, // resumeBotBaseUrl + '/download?id=' + resumeBotPath,
// ); // );
// console.log('resumeBotBody', resumeBotToken); // console.log('resumeBotBody', resumeBotToken);
const resumeBotDownload = await fetch(resumeBotBaseUrl + "/download?id=" + resumeBotPath, { const resumeBotDownload = yield fetch(resumeBotBaseUrl + "/download?id=" + resumeBotPath, {
method: "POST", method: "POST",
body: resumeBotBody, body: resumeBotBody,
headers: { headers: {
@@ -102,7 +115,7 @@ const getStream = async function ({ link: url, type, providerContext, }) {
Cookie: "PHPSESSID=7e9658ce7c805dab5bbcea9046f7f308", Cookie: "PHPSESSID=7e9658ce7c805dab5bbcea9046f7f308",
}, },
}); });
const resumeBotDownloadData = await resumeBotDownload.json(); const resumeBotDownloadData = yield resumeBotDownload.json();
console.log("resumeBotDownloadData", resumeBotDownloadData.url); console.log("resumeBotDownloadData", resumeBotDownloadData.url);
servers.push({ servers.push({
server: "ResumeBot", server: "ResumeBot",
@@ -116,12 +129,13 @@ const getStream = async function ({ link: url, type, providerContext, }) {
// CF workers type 1 // CF workers type 1
try { try {
const cfWorkersLink = driveLink.replace("/file", "/wfile") + "?type=1"; const cfWorkersLink = driveLink.replace("/file", "/wfile") + "?type=1";
const cfWorkersRes = await axios.get(cfWorkersLink, { headers }); const cfWorkersRes = yield axios.get(cfWorkersLink, { headers });
const cfWorkersHtml = cfWorkersRes.data; const cfWorkersHtml = cfWorkersRes.data;
const $cfWorkers = cheerio.load(cfWorkersHtml); const $cfWorkers = cheerio.load(cfWorkersHtml);
const cfWorkersStream = $cfWorkers(".btn-success"); const cfWorkersStream = $cfWorkers(".btn-success");
cfWorkersStream.each((i, el) => { cfWorkersStream.each((i, el) => {
const link = el.attribs?.href; var _a;
const link = (_a = el.attribs) === null || _a === void 0 ? void 0 : _a.href;
if (link) { if (link) {
servers.push({ servers.push({
server: "Cf Worker 1." + i, server: "Cf Worker 1." + i,
@@ -137,12 +151,13 @@ const getStream = async function ({ link: url, type, providerContext, }) {
// CF workers type 2 // CF workers type 2
try { try {
const cfWorkersLink = driveLink.replace("/file", "/wfile") + "?type=2"; const cfWorkersLink = driveLink.replace("/file", "/wfile") + "?type=2";
const cfWorkersRes = await axios.get(cfWorkersLink, { headers }); const cfWorkersRes = yield axios.get(cfWorkersLink, { headers });
const cfWorkersHtml = cfWorkersRes.data; const cfWorkersHtml = cfWorkersRes.data;
const $cfWorkers = cheerio.load(cfWorkersHtml); const $cfWorkers = cheerio.load(cfWorkersHtml);
const cfWorkersStream = $cfWorkers(".btn-success"); const cfWorkersStream = $cfWorkers(".btn-success");
cfWorkersStream.each((i, el) => { cfWorkersStream.each((i, el) => {
const link = el.attribs?.href; var _a;
const link = (_a = el.attribs) === null || _a === void 0 ? void 0 : _a.href;
if (link) { if (link) {
servers.push({ servers.push({
server: "Cf Worker 2." + i, server: "Cf Worker 2." + i,
@@ -165,14 +180,14 @@ const getStream = async function ({ link: url, type, providerContext, }) {
InstantFromData.append("keys", instantToken); InstantFromData.append("keys", instantToken);
const videoSeedUrl = seed.split("/").slice(0, 3).join("/") + "/api"; const videoSeedUrl = seed.split("/").slice(0, 3).join("/") + "/api";
// console.log('videoSeedUrl', videoSeedUrl); // console.log('videoSeedUrl', videoSeedUrl);
const instantLinkRes = await fetch(videoSeedUrl, { const instantLinkRes = yield fetch(videoSeedUrl, {
method: "POST", method: "POST",
body: InstantFromData, body: InstantFromData,
headers: { headers: {
"x-token": videoSeedUrl, "x-token": videoSeedUrl,
}, },
}); });
const instantLinkData = await instantLinkRes.json(); const instantLinkData = yield instantLinkRes.json();
// console.log('instantLinkData', instantLinkData); // console.log('instantLinkData', instantLinkData);
if (instantLinkData.error === false) { if (instantLinkData.error === false) {
const instantLink = instantLinkData.url; const instantLink = instantLinkData.url;
@@ -195,14 +210,15 @@ const getStream = async function ({ link: url, type, providerContext, }) {
console.log("getStream error", err); console.log("getStream error", err);
return []; return [];
} }
});
}; };
exports.getStream = getStream; exports.getStream = getStream;
const isDriveLink = async (ddl) => { const isDriveLink = (ddl) => __awaiter(void 0, void 0, void 0, function* () {
if (ddl.includes("drive")) { if (ddl.includes("drive")) {
const driveLeach = await fetch(ddl); const driveLeach = yield fetch(ddl);
const driveLeachData = await driveLeach.text(); const driveLeachData = yield driveLeach.text();
const pathMatch = driveLeachData.match(/window\.location\.replace\("([^"]+)"\)/); const pathMatch = driveLeachData.match(/window\.location\.replace\("([^"]+)"\)/);
const path = pathMatch?.[1]; const path = pathMatch === null || pathMatch === void 0 ? void 0 : pathMatch[1];
const mainUrl = ddl.split("/")[2]; const mainUrl = ddl.split("/")[2];
console.log(`driveUrl = https://${mainUrl}${path}`); console.log(`driveUrl = https://${mainUrl}${path}`);
return `https://${mainUrl}${path}`; return `https://${mainUrl}${path}`;
@@ -210,18 +226,19 @@ const isDriveLink = async (ddl) => {
else { else {
return ddl; return ddl;
} }
}; });
async function modExtractor(url, providerContext) { function modExtractor(url, providerContext) {
return __awaiter(this, void 0, void 0, function* () {
const { axios, cheerio } = providerContext; const { axios, cheerio } = providerContext;
try { try {
const wpHttp = url.split("sid=")[1]; const wpHttp = url.split("sid=")[1];
var bodyFormData0 = new FormData(); var bodyFormData0 = new FormData();
bodyFormData0.append("_wp_http", wpHttp); bodyFormData0.append("_wp_http", wpHttp);
const res = await fetch(url.split("?")[0], { const res = yield fetch(url.split("?")[0], {
method: "POST", method: "POST",
body: bodyFormData0, body: bodyFormData0,
}); });
const data = await res.text(); const data = yield res.text();
// console.log('', data); // console.log('', data);
const html = data; const html = data;
const $ = cheerio.load(html); const $ = cheerio.load(html);
@@ -233,16 +250,16 @@ async function modExtractor(url, providerContext) {
bodyFormData.append("_wp_http2", wpHttp2); bodyFormData.append("_wp_http2", wpHttp2);
const formUrl1 = $("form").attr("action"); const formUrl1 = $("form").attr("action");
const formUrl = formUrl1 || url.split("?")[0]; const formUrl = formUrl1 || url.split("?")[0];
const res2 = await fetch(formUrl, { const res2 = yield fetch(formUrl, {
method: "POST", method: "POST",
body: bodyFormData, body: bodyFormData,
}); });
const html2 = await res2.text(); const html2 = yield res2.text();
const link = html2.match(/setAttribute\("href",\s*"(.*?)"/)[1]; const link = html2.match(/setAttribute\("href",\s*"(.*?)"/)[1];
console.log(link); console.log(link);
const cookie = link.split("=")[1]; const cookie = link.split("=")[1];
console.log("cookie", cookie); console.log("cookie", cookie);
const downloadLink = await axios.get(link, { const downloadLink = yield axios.get(link, {
headers: { headers: {
Referer: formUrl, Referer: formUrl,
Cookie: `${cookie}=${wpHttp2}`, Cookie: `${cookie}=${wpHttp2}`,
@@ -253,4 +270,5 @@ async function modExtractor(url, providerContext) {
catch (err) { catch (err) {
console.log("modGetStream error", err); console.log("modGetStream error", err);
} }
});
} }

20
dist/uhd/meta.js vendored
View File

@@ -1,4 +1,13 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getMeta = void 0; exports.getMeta = void 0;
const headers = { const headers = {
@@ -16,12 +25,14 @@ const headers = {
"Upgrade-Insecure-Requests": "1", "Upgrade-Insecure-Requests": "1",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0",
}; };
const getMeta = async function ({ link, providerContext, }) { const getMeta = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ link, providerContext, }) {
var _b;
try { try {
const { axios, cheerio } = providerContext; const { axios, cheerio } = providerContext;
const url = link; const url = link;
const res = await axios.get(url, { headers }); const res = yield axios.get(url, { headers });
const html = await res.data; const html = yield res.data;
const $ = cheerio.load(html); const $ = cheerio.load(html);
const title = $("h2:first").text() || ""; const title = $("h2:first").text() || "";
const image = $("h2").siblings().find("img").attr("src") || ""; const image = $("h2").siblings().find("img").attr("src") || "";
@@ -84,7 +95,7 @@ const getMeta = async function ({ link, providerContext, }) {
// console.log(episodes); // console.log(episodes);
return { return {
title: title.match(/^Download\s+([^(\[]+)/i) title: title.match(/^Download\s+([^(\[]+)/i)
? title?.match(/^Download\s+([^(\[]+)/i)?.[1] || "" ? ((_b = title === null || title === void 0 ? void 0 : title.match(/^Download\s+([^(\[]+)/i)) === null || _b === void 0 ? void 0 : _b[1]) || ""
: title.replace("Download", "") || "", : title.replace("Download", "") || "",
image, image,
imdbId: "", imdbId: "",
@@ -104,5 +115,6 @@ const getMeta = async function ({ link, providerContext, }) {
type: "uhd", type: "uhd",
}; };
} }
});
}; };
exports.getMeta = getMeta; exports.getMeta = getMeta;

31
dist/uhd/posts.js vendored
View File

@@ -1,4 +1,13 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getSearchPosts = exports.getPosts = void 0; exports.getSearchPosts = exports.getPosts = void 0;
const headers = { const headers = {
@@ -16,29 +25,30 @@ const headers = {
"Upgrade-Insecure-Requests": "1", "Upgrade-Insecure-Requests": "1",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0",
}; };
const getPosts = async ({ filter, page, const getPosts = (_a) => __awaiter(void 0, [_a], void 0, function* ({ filter, page,
// providerValue, // providerValue,
signal, providerContext, }) => { signal, providerContext, }) {
const { getBaseUrl } = providerContext; const { getBaseUrl } = providerContext;
const baseUrl = await getBaseUrl("UhdMovies"); const baseUrl = yield getBaseUrl("UhdMovies");
const url = page === 1 ? `${baseUrl}/${filter}/` : `${baseUrl + filter}/page/${page}/`; const url = page === 1 ? `${baseUrl}/${filter}/` : `${baseUrl + filter}/page/${page}/`;
console.log("url", url); console.log("url", url);
return posts(baseUrl, url, signal, providerContext); return posts(baseUrl, url, signal, providerContext);
}; });
exports.getPosts = getPosts; exports.getPosts = getPosts;
const getSearchPosts = async ({ searchQuery, page, const getSearchPosts = (_a) => __awaiter(void 0, [_a], void 0, function* ({ searchQuery, page,
// providerValue, // providerValue,
signal, providerContext, }) => { signal, providerContext, }) {
const { getBaseUrl } = providerContext; const { getBaseUrl } = providerContext;
const baseUrl = await getBaseUrl("UhdMovies"); const baseUrl = yield getBaseUrl("UhdMovies");
const url = `${baseUrl}/search/${searchQuery}/page/${page}/`; const url = `${baseUrl}/search/${searchQuery}/page/${page}/`;
return posts(baseUrl, url, signal, providerContext); return posts(baseUrl, url, signal, providerContext);
}; });
exports.getSearchPosts = getSearchPosts; exports.getSearchPosts = getSearchPosts;
async function posts(baseURL, url, signal, providerContext) { function posts(baseURL, url, signal, providerContext) {
return __awaiter(this, void 0, void 0, function* () {
try { try {
const { axios, cheerio } = providerContext; const { axios, cheerio } = providerContext;
const res = await axios.get(url, { headers, signal }); const res = yield axios.get(url, { headers, signal });
const html = res.data; const html = res.data;
const $ = cheerio.load(html); const $ = cheerio.load(html);
const uhdCatalog = []; const uhdCatalog = [];
@@ -62,4 +72,5 @@ async function posts(baseURL, url, signal, providerContext) {
console.error("uhd error ", err); console.error("uhd error ", err);
return []; return [];
} }
});
} }

62
dist/uhd/stream.js vendored
View File

@@ -1,4 +1,13 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getStream = void 0; exports.getStream = void 0;
const headers = { const headers = {
@@ -16,17 +25,18 @@ const headers = {
"Upgrade-Insecure-Requests": "1", "Upgrade-Insecure-Requests": "1",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0",
}; };
const getStream = async ({ link: url, providerContext, }) => { const getStream = (_a) => __awaiter(void 0, [_a], void 0, function* ({ link: url, providerContext, }) {
var _b, _c;
try { try {
const { axios, cheerio } = providerContext; const { axios, cheerio } = providerContext;
let downloadLink = await modExtractor(url, providerContext); let downloadLink = yield modExtractor(url, providerContext);
// console.log(downloadLink.data); // console.log(downloadLink.data);
const ddl = downloadLink?.data?.match(/content="0;url=(.*?)"/)?.[1] || url; const ddl = ((_c = (_b = downloadLink === null || downloadLink === void 0 ? void 0 : downloadLink.data) === null || _b === void 0 ? void 0 : _b.match(/content="0;url=(.*?)"/)) === null || _c === void 0 ? void 0 : _c[1]) || url;
console.log("ddl", ddl); console.log("ddl", ddl);
// console.log(ddl); // console.log(ddl);
const driveLink = await isDriveLink(ddl); const driveLink = yield isDriveLink(ddl);
const ServerLinks = []; const ServerLinks = [];
const driveRes = await axios.get(driveLink, { headers }); const driveRes = yield axios.get(driveLink, { headers });
const driveHtml = driveRes.data; const driveHtml = driveRes.data;
const $drive = cheerio.load(driveHtml); const $drive = cheerio.load(driveHtml);
//instant link //instant link
@@ -38,14 +48,14 @@ const getStream = async ({ link: url, providerContext, }) => {
InstantFromData.append("keys", instantToken); InstantFromData.append("keys", instantToken);
const videoSeedUrl = seed.split("/").slice(0, 3).join("/") + "/api"; const videoSeedUrl = seed.split("/").slice(0, 3).join("/") + "/api";
// console.log('videoSeedUrl', videoSeedUrl); // console.log('videoSeedUrl', videoSeedUrl);
const instantLinkRes = await fetch(videoSeedUrl, { const instantLinkRes = yield fetch(videoSeedUrl, {
method: "POST", method: "POST",
body: InstantFromData, body: InstantFromData,
headers: { headers: {
"x-token": videoSeedUrl, "x-token": videoSeedUrl,
}, },
}); });
const instantLinkData = await instantLinkRes.json(); const instantLinkData = yield instantLinkRes.json();
// console.log('instantLinkData', instantLinkData); // console.log('instantLinkData', instantLinkData);
if (instantLinkData.error === false) { if (instantLinkData.error === false) {
const instantLink = instantLinkData.url; const instantLink = instantLinkData.url;
@@ -66,7 +76,7 @@ const getStream = async ({ link: url, providerContext, }) => {
try { try {
const resumeDrive = driveLink.replace("/file", "/zfile"); const resumeDrive = driveLink.replace("/file", "/zfile");
// console.log('resumeDrive', resumeDrive); // console.log('resumeDrive', resumeDrive);
const resumeDriveRes = await axios.get(resumeDrive, { headers }); const resumeDriveRes = yield axios.get(resumeDrive, { headers });
const resumeDriveHtml = resumeDriveRes.data; const resumeDriveHtml = resumeDriveRes.data;
const $resumeDrive = cheerio.load(resumeDriveHtml); const $resumeDrive = cheerio.load(resumeDriveHtml);
const resumeLink = $resumeDrive(".btn-success").attr("href"); const resumeLink = $resumeDrive(".btn-success").attr("href");
@@ -85,12 +95,13 @@ const getStream = async ({ link: url, providerContext, }) => {
// CF workers type 1 // CF workers type 1
try { try {
const cfWorkersLink = driveLink.replace("/file", "/wfile") + "?type=1"; const cfWorkersLink = driveLink.replace("/file", "/wfile") + "?type=1";
const cfWorkersRes = await axios.get(cfWorkersLink, { headers }); const cfWorkersRes = yield axios.get(cfWorkersLink, { headers });
const cfWorkersHtml = cfWorkersRes.data; const cfWorkersHtml = cfWorkersRes.data;
const $cfWorkers = cheerio.load(cfWorkersHtml); const $cfWorkers = cheerio.load(cfWorkersHtml);
const cfWorkersStream = $cfWorkers(".btn-success"); const cfWorkersStream = $cfWorkers(".btn-success");
cfWorkersStream.each((i, el) => { cfWorkersStream.each((i, el) => {
const link = el.attribs?.href; var _a;
const link = (_a = el.attribs) === null || _a === void 0 ? void 0 : _a.href;
if (link) { if (link) {
ServerLinks.push({ ServerLinks.push({
server: "Cf Worker 1." + i, server: "Cf Worker 1." + i,
@@ -106,12 +117,13 @@ const getStream = async ({ link: url, providerContext, }) => {
// CF workers type 2 // CF workers type 2
try { try {
const cfWorkersLink = driveLink.replace("/file", "/wfile") + "?type=2"; const cfWorkersLink = driveLink.replace("/file", "/wfile") + "?type=2";
const cfWorkersRes = await axios.get(cfWorkersLink, { headers }); const cfWorkersRes = yield axios.get(cfWorkersLink, { headers });
const cfWorkersHtml = cfWorkersRes.data; const cfWorkersHtml = cfWorkersRes.data;
const $cfWorkers = cheerio.load(cfWorkersHtml); const $cfWorkers = cheerio.load(cfWorkersHtml);
const cfWorkersStream = $cfWorkers(".btn-success"); const cfWorkersStream = $cfWorkers(".btn-success");
cfWorkersStream.each((i, el) => { cfWorkersStream.each((i, el) => {
const link = el.attribs?.href; var _a;
const link = (_a = el.attribs) === null || _a === void 0 ? void 0 : _a.href;
if (link) { if (link) {
ServerLinks.push({ ServerLinks.push({
server: "Cf Worker 2." + i, server: "Cf Worker 2." + i,
@@ -131,14 +143,14 @@ const getStream = async ({ link: url, providerContext, }) => {
console.log("getStream error", err); console.log("getStream error", err);
return []; return [];
} }
}; });
exports.getStream = getStream; exports.getStream = getStream;
const isDriveLink = async (ddl) => { const isDriveLink = (ddl) => __awaiter(void 0, void 0, void 0, function* () {
if (ddl.includes("drive")) { if (ddl.includes("drive")) {
const driveLeach = await fetch(ddl); const driveLeach = yield fetch(ddl);
const driveLeachData = await driveLeach.text(); const driveLeachData = yield driveLeach.text();
const pathMatch = driveLeachData.match(/window\.location\.replace\("([^"]+)"\)/); const pathMatch = driveLeachData.match(/window\.location\.replace\("([^"]+)"\)/);
const path = pathMatch?.[1]; const path = pathMatch === null || pathMatch === void 0 ? void 0 : pathMatch[1];
const mainUrl = ddl.split("/")[2]; const mainUrl = ddl.split("/")[2];
console.log(`driveUrl = https://${mainUrl}${path}`); console.log(`driveUrl = https://${mainUrl}${path}`);
return `https://${mainUrl}${path}`; return `https://${mainUrl}${path}`;
@@ -146,18 +158,19 @@ const isDriveLink = async (ddl) => {
else { else {
return ddl; return ddl;
} }
}; });
async function modExtractor(url, providerContext) { function modExtractor(url, providerContext) {
return __awaiter(this, void 0, void 0, function* () {
const { axios, cheerio } = providerContext; const { axios, cheerio } = providerContext;
try { try {
const wpHttp = url.split("sid=")[1]; const wpHttp = url.split("sid=")[1];
var bodyFormData0 = new FormData(); var bodyFormData0 = new FormData();
bodyFormData0.append("_wp_http", wpHttp); bodyFormData0.append("_wp_http", wpHttp);
const res = await fetch(url.split("?")[0], { const res = yield fetch(url.split("?")[0], {
method: "POST", method: "POST",
body: bodyFormData0, body: bodyFormData0,
}); });
const data = await res.text(); const data = yield res.text();
// console.log('', data); // console.log('', data);
const html = data; const html = data;
const $ = cheerio.load(html); const $ = cheerio.load(html);
@@ -169,16 +182,16 @@ async function modExtractor(url, providerContext) {
bodyFormData.append("_wp_http2", wpHttp2); bodyFormData.append("_wp_http2", wpHttp2);
const formUrl1 = $("form").attr("action"); const formUrl1 = $("form").attr("action");
const formUrl = formUrl1 || url.split("?")[0]; const formUrl = formUrl1 || url.split("?")[0];
const res2 = await fetch(formUrl, { const res2 = yield fetch(formUrl, {
method: "POST", method: "POST",
body: bodyFormData, body: bodyFormData,
}); });
const html2 = await res2.text(); const html2 = yield res2.text();
const link = html2.match(/setAttribute\("href",\s*"(.*?)"/)[1]; const link = html2.match(/setAttribute\("href",\s*"(.*?)"/)[1];
console.log(link); console.log(link);
const cookie = link.split("=")[1]; const cookie = link.split("=")[1];
console.log("cookie", cookie); console.log("cookie", cookie);
const downloadLink = await axios.get(link, { const downloadLink = yield axios.get(link, {
headers: { headers: {
Referer: formUrl, Referer: formUrl,
Cookie: `${cookie}=${wpHttp2}`, Cookie: `${cookie}=${wpHttp2}`,
@@ -189,4 +202,5 @@ async function modExtractor(url, providerContext) {
catch (err) { catch (err) {
console.log("modGetStream error", err); console.log("modGetStream error", err);
} }
});
} }

View File

@@ -1,22 +1,33 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getEpisodes = void 0; exports.getEpisodes = void 0;
const getEpisodes = async function ({ url, providerContext, }) { const getEpisodes = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ url, providerContext, }) {
const { axios, cheerio } = providerContext; const { axios, cheerio } = providerContext;
try { try {
const baseUrl = url?.split("/").slice(0, 3).join("/"); const baseUrl = url === null || url === void 0 ? void 0 : url.split("/").slice(0, 3).join("/");
const res = await axios.get(url); const res = yield axios.get(url);
const html = res.data; const html = res.data;
let $ = cheerio.load(html); let $ = cheerio.load(html);
const episodeLinks = []; const episodeLinks = [];
$('.file-entry:not(:contains("Parent Directory"))').map((i, element) => { $('.file-entry:not(:contains("Parent Directory"))').map((i, element) => {
var _a, _b, _c, _d, _e, _f;
const link = $(element).attr("href"); const link = $(element).attr("href");
if (link && if (link &&
($(element).text()?.includes(".mp4") || (((_a = $(element).text()) === null || _a === void 0 ? void 0 : _a.includes(".mp4")) ||
$(element).text()?.includes(".mkv"))) { ((_b = $(element).text()) === null || _b === void 0 ? void 0 : _b.includes(".mkv")))) {
episodeLinks.push({ episodeLinks.push({
title: $(element).text()?.match(/E\d+/)?.[0]?.replace("E", "Episode ") || title: ((_e = (_d = (_c = $(element).text()) === null || _c === void 0 ? void 0 : _c.match(/E\d+/)) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.replace("E", "Episode ")) ||
i + 1 + ". " + $(element).text()?.replace(".mkv", ""), i + 1 + ". " + ((_f = $(element).text()) === null || _f === void 0 ? void 0 : _f.replace(".mkv", "")),
link: baseUrl + link, link: baseUrl + link,
}); });
} }
@@ -26,5 +37,6 @@ const getEpisodes = async function ({ url, providerContext, }) {
catch (err) { catch (err) {
return []; return [];
} }
});
}; };
exports.getEpisodes = getEpisodes; exports.getEpisodes = getEpisodes;

30
dist/vadapav/meta.js vendored
View File

@@ -1,22 +1,30 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getMeta = void 0; exports.getMeta = void 0;
const getMeta = async function ({ link, providerContext, }) { const getMeta = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ link, providerContext, }) {
var _b, _c;
try { try {
const { axios, cheerio } = providerContext; const { axios, cheerio } = providerContext;
const baseUrl = link?.split("/").slice(0, 3).join("/"); const baseUrl = link === null || link === void 0 ? void 0 : link.split("/").slice(0, 3).join("/");
const url = link; const url = link;
const res = await axios.get(url); const res = yield axios.get(url);
const data = res.data; const data = res.data;
const $ = cheerio.load(data); const $ = cheerio.load(data);
const title = $(".directory") const title = ((_c = (_b = $(".directory")
.children() .children()
.first() .first()
.text() .text()
.trim() .trim()) === null || _b === void 0 ? void 0 : _b.split("/").pop()) === null || _c === void 0 ? void 0 : _c.trim()) || "";
?.split("/")
.pop()
?.trim() || "";
const links = []; const links = [];
$('.directory-entry:not(:contains("Parent Directory"))').map((i, element) => { $('.directory-entry:not(:contains("Parent Directory"))').map((i, element) => {
const link = $(element).attr("href"); const link = $(element).attr("href");
@@ -29,10 +37,11 @@ const getMeta = async function ({ link, providerContext, }) {
}); });
const directLinks = []; const directLinks = [];
$('.file-entry:not(:contains("Parent Directory"))').map((i, element) => { $('.file-entry:not(:contains("Parent Directory"))').map((i, element) => {
var _a, _b;
const link = $(element).attr("href"); const link = $(element).attr("href");
if (link && if (link &&
($(element).text()?.includes(".mp4") || (((_a = $(element).text()) === null || _a === void 0 ? void 0 : _a.includes(".mp4")) ||
$(element).text()?.includes(".mkv"))) { ((_b = $(element).text()) === null || _b === void 0 ? void 0 : _b.includes(".mkv")))) {
directLinks.push({ directLinks.push({
title: i + 1 + ". " + $(element).text(), title: i + 1 + ". " + $(element).text(),
link: baseUrl + link, link: baseUrl + link,
@@ -64,5 +73,6 @@ const getMeta = async function ({ link, providerContext, }) {
linkList: [], linkList: [],
}; };
} }
});
}; };
exports.getMeta = getMeta; exports.getMeta = getMeta;

46
dist/vadapav/posts.js vendored
View File

@@ -1,44 +1,59 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getSearchPosts = exports.getPosts = void 0; exports.getSearchPosts = exports.getPosts = void 0;
const getPosts = async function ({ filter, page, const getPosts = function (_a) {
// providerValue, return __awaiter(this, arguments, void 0, function* ({ filter, page,
signal, providerContext, }) { // providerValue,
signal, providerContext, }) {
const { getBaseUrl, axios, cheerio } = providerContext; const { getBaseUrl, axios, cheerio } = providerContext;
const baseUrl = await getBaseUrl("vadapav"); const baseUrl = yield getBaseUrl("vadapav");
if (page > 1) { if (page > 1) {
return []; return [];
} }
const url = `${baseUrl + filter}`; const url = `${baseUrl + filter}`;
return posts({ baseUrl, url, signal, axios, cheerio }); return posts({ baseUrl, url, signal, axios, cheerio });
});
}; };
exports.getPosts = getPosts; exports.getPosts = getPosts;
const getSearchPosts = async function ({ searchQuery, page, const getSearchPosts = function (_a) {
// providerValue, return __awaiter(this, arguments, void 0, function* ({ searchQuery, page,
signal, providerContext, }) { // providerValue,
signal, providerContext, }) {
const { getBaseUrl, axios, cheerio } = providerContext; const { getBaseUrl, axios, cheerio } = providerContext;
const baseUrl = await getBaseUrl("vadapav"); const baseUrl = yield getBaseUrl("vadapav");
if (page > 1) { if (page > 1) {
return []; return [];
} }
const url = `${baseUrl}/s/${searchQuery}`; const url = `${baseUrl}/s/${searchQuery}`;
return posts({ baseUrl, url, signal, axios, cheerio }); return posts({ baseUrl, url, signal, axios, cheerio });
});
}; };
exports.getSearchPosts = getSearchPosts; exports.getSearchPosts = getSearchPosts;
async function posts({ function posts(_a) {
// baseUrl, return __awaiter(this, arguments, void 0, function* ({
url, signal, axios, cheerio, }) { // baseUrl,
url, signal, axios, cheerio, }) {
try { try {
const res = await axios.get(url, { signal }); const res = yield axios.get(url, { signal });
const data = res.data; const data = res.data;
const $ = cheerio.load(data); const $ = cheerio.load(data);
const catalog = []; const catalog = [];
$('.directory-entry:not(:contains("Parent Directory"))').map((i, element) => { $('.directory-entry:not(:contains("Parent Directory"))').map((i, element) => {
var _a;
const title = $(element).text(); const title = $(element).text();
const link = $(element).attr("href"); const link = $(element).attr("href");
const imageTitle = title?.length > 30 const imageTitle = (title === null || title === void 0 ? void 0 : title.length) > 30
? title?.slice(0, 30)?.replace(/\./g, " ") ? (_a = title === null || title === void 0 ? void 0 : title.slice(0, 30)) === null || _a === void 0 ? void 0 : _a.replace(/\./g, " ")
: title?.replace(/\./g, " "); : title === null || title === void 0 ? void 0 : title.replace(/\./g, " ");
const image = `https://placehold.jp/23/000000/ffffff/200x400.png?text=${encodeURIComponent(imageTitle)}&css=%7B%22background%22%3A%22%20-webkit-gradient(linear%2C%20left%20bottom%2C%20left%20top%2C%20from(%233f3b3b)%2C%20to(%23000000))%22%2C%22text-transform%22%3A%22%20capitalize%22%7D`; const image = `https://placehold.jp/23/000000/ffffff/200x400.png?text=${encodeURIComponent(imageTitle)}&css=%7B%22background%22%3A%22%20-webkit-gradient(linear%2C%20left%20bottom%2C%20left%20top%2C%20from(%233f3b3b)%2C%20to(%23000000))%22%2C%22text-transform%22%3A%22%20capitalize%22%7D`;
if (title && link) { if (title && link) {
catalog.push({ catalog.push({
@@ -53,4 +68,5 @@ url, signal, axios, cheerio, }) {
catch (err) { catch (err) {
return []; return [];
} }
});
} }

View File

@@ -1,19 +1,30 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getStream = void 0; exports.getStream = void 0;
const getStream = async function ({ link: url, // type, // providerContext, const getStream = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ link: url, // type, // providerContext,
}) { }) {
try { try {
const stream = []; const stream = [];
stream.push({ stream.push({
server: "vadapav", server: "vadapav",
link: url, link: url,
type: url?.split(".").pop() || "mkv", type: (url === null || url === void 0 ? void 0 : url.split(".").pop()) || "mkv",
}); });
return stream; return stream;
} }
catch (err) { catch (err) {
return []; return [];
} }
});
}; };
exports.getStream = getStream; exports.getStream = getStream;

15
dist/vega/episodes.js vendored
View File

@@ -1,11 +1,21 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getEpisodes = void 0; exports.getEpisodes = void 0;
const getEpisodes = async function ({ url, providerContext, }) { const getEpisodes = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ url, providerContext, }) {
const { axios, cheerio, commonHeaders: headers } = providerContext; const { axios, cheerio, commonHeaders: headers } = providerContext;
console.log("getEpisodeLinks", url); console.log("getEpisodeLinks", url);
try { try {
const res = await axios.get(url, { headers }); const res = yield axios.get(url, { headers });
const $ = cheerio.load(res.data); const $ = cheerio.load(res.data);
const container = $(".entry-content,.entry-inner"); const container = $(".entry-content,.entry-inner");
$(".unili-content,.code-block-1").remove(); $(".unili-content,.code-block-1").remove();
@@ -30,5 +40,6 @@ const getEpisodes = async function ({ url, providerContext, }) {
// console.error(err); // console.error(err);
return []; return [];
} }
});
}; };
exports.getEpisodes = getEpisodes; exports.getEpisodes = getEpisodes;

74
dist/vega/meta.js vendored
View File

@@ -1,4 +1,13 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getMeta = void 0; exports.getMeta = void 0;
const headers = { const headers = {
@@ -17,88 +26,69 @@ const headers = {
"Upgrade-Insecure-Requests": "1", "Upgrade-Insecure-Requests": "1",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0",
}; };
const getMeta = async ({ link, providerContext, }) => { const getMeta = (_a) => __awaiter(void 0, [_a], void 0, function* ({ link, providerContext, }) {
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
try { try {
const { axios, cheerio } = providerContext; const { axios, cheerio } = providerContext;
const url = link; const url = link;
console.log("url", url); console.log("url", url);
const baseUrl = url.split("/").slice(0, 3).join("/"); const baseUrl = url.split("/").slice(0, 3).join("/");
const response = await axios.get(url, { const response = yield axios.get(url, {
headers: { headers: Object.assign(Object.assign({}, headers), { Referer: baseUrl }),
...headers,
Referer: baseUrl,
},
}); });
const $ = cheerio.load(response.data); const $ = cheerio.load(response.data);
const infoContainer = $(".entry-content,.post-inner"); const infoContainer = $(".entry-content,.post-inner");
const heading = infoContainer?.find("h3"); const heading = infoContainer === null || infoContainer === void 0 ? void 0 : infoContainer.find("h3");
const imdbId = const imdbId =
//@ts-ignore //@ts-ignore
heading?.next("p")?.find("a")?.[0]?.attribs?.href?.match(/tt\d+/g)?.[0] || ((_g = (_f = (_e = (_d = (_c = (_b = heading === null || heading === void 0 ? void 0 : heading.next("p")) === null || _b === void 0 ? void 0 : _b.find("a")) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.attribs) === null || _e === void 0 ? void 0 : _e.href) === null || _f === void 0 ? void 0 : _f.match(/tt\d+/g)) === null || _g === void 0 ? void 0 : _g[0]) ||
infoContainer.text().match(/tt\d+/g)?.[0] || ((_h = infoContainer.text().match(/tt\d+/g)) === null || _h === void 0 ? void 0 : _h[0]) ||
""; "";
// console.log(imdbId) // console.log(imdbId)
const type = heading?.next("p")?.text()?.includes("Series Name") const type = ((_k = (_j = heading === null || heading === void 0 ? void 0 : heading.next("p")) === null || _j === void 0 ? void 0 : _j.text()) === null || _k === void 0 ? void 0 : _k.includes("Series Name"))
? "series" ? "series"
: "movie"; : "movie";
// console.log(type); // console.log(type);
// title // title
const titleRegex = /Name: (.+)/; const titleRegex = /Name: (.+)/;
const title = heading?.next("p")?.text()?.match(titleRegex)?.[1] || ""; const title = ((_o = (_m = (_l = heading === null || heading === void 0 ? void 0 : heading.next("p")) === null || _l === void 0 ? void 0 : _l.text()) === null || _m === void 0 ? void 0 : _m.match(titleRegex)) === null || _o === void 0 ? void 0 : _o[1]) || "";
// console.log(title); // console.log(title);
// synopsis // synopsis
const synopsisNode = //@ts-ignore const synopsisNode = //@ts-ignore
infoContainer?.find("p")?.next("h3,h4")?.next("p")?.[0]?.children?.[0]; (_t = (_s = (_r = (_q = (_p = infoContainer === null || infoContainer === void 0 ? void 0 : infoContainer.find("p")) === null || _p === void 0 ? void 0 : _p.next("h3,h4")) === null || _q === void 0 ? void 0 : _q.next("p")) === null || _r === void 0 ? void 0 : _r[0]) === null || _s === void 0 ? void 0 : _s.children) === null || _t === void 0 ? void 0 : _t[0];
const synopsis = synopsisNode && "data" in synopsisNode ? synopsisNode.data : ""; const synopsis = synopsisNode && "data" in synopsisNode ? synopsisNode.data : "";
// console.log(synopsis); // console.log(synopsis);
// image // image
let image = infoContainer?.find("img[data-lazy-src]")?.attr("data-lazy-src") || ""; let image = ((_u = infoContainer === null || infoContainer === void 0 ? void 0 : infoContainer.find("img[data-lazy-src]")) === null || _u === void 0 ? void 0 : _u.attr("data-lazy-src")) || "";
if (image.startsWith("//")) { if (image.startsWith("//")) {
image = "https:" + image; image = "https:" + image;
} }
// console.log(image); // console.log(image);
// console.log({title, synopsis, image, imdbId, type}); // console.log({title, synopsis, image, imdbId, type});
/// Links /// Links
const hr = infoContainer?.first()?.find("hr"); const hr = (_v = infoContainer === null || infoContainer === void 0 ? void 0 : infoContainer.first()) === null || _v === void 0 ? void 0 : _v.find("hr");
const list = hr?.nextUntil("hr"); const list = hr === null || hr === void 0 ? void 0 : hr.nextUntil("hr");
const links = []; const links = [];
list.each((index, element) => { list.each((index, element) => {
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
element = $(element); element = $(element);
// title // title
const title = element?.text() || ""; const title = (element === null || element === void 0 ? void 0 : element.text()) || "";
const quality = element?.text().match(/\d+p\b/)?.[0] || ""; const quality = ((_a = element === null || element === void 0 ? void 0 : element.text().match(/\d+p\b/)) === null || _a === void 0 ? void 0 : _a[0]) || "";
// console.log(title); // console.log(title);
// movieLinks // movieLinks
const movieLinks = element const movieLinks = (element === null || element === void 0 ? void 0 : element.next().find(".dwd-button").text().toLowerCase().includes("download"))
?.next() ? (_c = (_b = element === null || element === void 0 ? void 0 : element.next().find(".dwd-button")) === null || _b === void 0 ? void 0 : _b.parent()) === null || _c === void 0 ? void 0 : _c.attr("href")
.find(".dwd-button")
.text()
.toLowerCase()
.includes("download")
? element?.next().find(".dwd-button")?.parent()?.attr("href")
: ""; : "";
// episode links // episode links
const vcloudLinks = element const vcloudLinks = (_e = (_d = element === null || element === void 0 ? void 0 : element.next().find(".btn-outline[style='background:linear-gradient(135deg,#ed0b0b,#f2d152); color: white;'],.btn-outline[style='background:linear-gradient(135deg,#ed0b0b,#f2d152); color: #fdf8f2;']")) === null || _d === void 0 ? void 0 : _d.parent()) === null || _e === void 0 ? void 0 : _e.attr("href");
?.next()
.find(".btn-outline[style='background:linear-gradient(135deg,#ed0b0b,#f2d152); color: white;'],.btn-outline[style='background:linear-gradient(135deg,#ed0b0b,#f2d152); color: #fdf8f2;']")
?.parent()
?.attr("href");
console.log(title); console.log(title);
const episodesLink = (vcloudLinks const episodesLink = (vcloudLinks
? vcloudLinks ? vcloudLinks
: element : (element === null || element === void 0 ? void 0 : element.next().find(".dwd-button").text().toLowerCase().includes("episode"))
?.next() ? (_g = (_f = element === null || element === void 0 ? void 0 : element.next().find(".dwd-button")) === null || _f === void 0 ? void 0 : _f.parent()) === null || _g === void 0 ? void 0 : _g.attr("href")
.find(".dwd-button")
.text()
.toLowerCase()
.includes("episode")
? element?.next().find(".dwd-button")?.parent()?.attr("href")
: "") || : "") ||
element ((_j = (_h = element === null || element === void 0 ? void 0 : element.next().find(".btn-outline[style='background:linear-gradient(135deg,#0ebac3,#09d261); color: white;']")) === null || _h === void 0 ? void 0 : _h.parent()) === null || _j === void 0 ? void 0 : _j.attr("href"));
?.next()
.find(".btn-outline[style='background:linear-gradient(135deg,#0ebac3,#09d261); color: white;']")
?.parent()
?.attr("href");
if (movieLinks || episodesLink) { if (movieLinks || episodesLink) {
links.push({ links.push({
title, title,
@@ -133,5 +123,5 @@ const getMeta = async ({ link, providerContext, }) => {
linkList: [], linkList: [],
}; };
} }
}; });
exports.getMeta = getMeta; exports.getMeta = getMeta;

50
dist/vega/posts.js vendored
View File

@@ -1,4 +1,13 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getSearchPosts = exports.getPosts = void 0; exports.getSearchPosts = exports.getPosts = void 0;
const headers = { const headers = {
@@ -17,48 +26,42 @@ const headers = {
"Upgrade-Insecure-Requests": "1", "Upgrade-Insecure-Requests": "1",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0",
}; };
const getPosts = async ({ filter, page, providerValue, signal, providerContext, }) => { const getPosts = (_a) => __awaiter(void 0, [_a], void 0, function* ({ filter, page, providerValue, signal, providerContext, }) {
const { getBaseUrl, axios, cheerio } = providerContext; const { getBaseUrl, axios, cheerio } = providerContext;
const baseUrl = await getBaseUrl("Vega"); const baseUrl = yield getBaseUrl("Vega");
console.log("vegaGetPosts baseUrl:", providerValue, baseUrl); console.log("vegaGetPosts baseUrl:", providerValue, baseUrl);
const url = `${baseUrl}/${filter}/page/${page}/`; const url = `${baseUrl}/${filter}/page/${page}/`;
console.log("vegaGetPosts url:", url); console.log("vegaGetPosts url:", url);
return posts(baseUrl, url, signal, headers, axios, cheerio); return posts(baseUrl, url, signal, headers, axios, cheerio);
}; });
exports.getPosts = getPosts; exports.getPosts = getPosts;
const getSearchPosts = async ({ searchQuery, page, providerValue, signal, providerContext, }) => { const getSearchPosts = (_a) => __awaiter(void 0, [_a], void 0, function* ({ searchQuery, page, providerValue, signal, providerContext, }) {
const { getBaseUrl, axios, commonHeaders, cheerio } = providerContext; const { getBaseUrl, axios, commonHeaders, cheerio } = providerContext;
const baseUrl = await getBaseUrl("Vega"); const baseUrl = yield getBaseUrl("Vega");
console.log("vegaGetPosts baseUrl:", providerValue, baseUrl); console.log("vegaGetPosts baseUrl:", providerValue, baseUrl);
const url = `${baseUrl}/page/${page}/?s=${searchQuery}`; const url = `${baseUrl}/page/${page}/?s=${searchQuery}`;
console.log("vegaGetPosts url:", url); console.log("vegaGetPosts url:", url);
return posts(baseUrl, url, signal, commonHeaders, axios, cheerio); return posts(baseUrl, url, signal, commonHeaders, axios, cheerio);
}; });
exports.getSearchPosts = getSearchPosts; exports.getSearchPosts = getSearchPosts;
async function posts(baseUrl, url, signal, headers = {}, axios, cheerio) { function posts(baseUrl_1, url_1, signal_1) {
return __awaiter(this, arguments, void 0, function* (baseUrl, url, signal, headers = {}, axios, cheerio) {
var _a, _b;
try { try {
const urlRes = await axios.get(url, { const urlRes = yield axios.get(url, {
headers: { headers: Object.assign(Object.assign({}, headers), { Referer: baseUrl }),
...headers,
Referer: baseUrl,
},
signal, signal,
}); });
const $ = cheerio.load(urlRes.data); const $ = cheerio.load(urlRes.data);
const posts = []; const posts = [];
$(".blog-items,.post-list") (_b = (_a = $(".blog-items,.post-list")) === null || _a === void 0 ? void 0 : _a.children("article")) === null || _b === void 0 ? void 0 : _b.each((index, element) => {
?.children("article") var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
?.each((index, element) => {
const post = { const post = {
title: ($(element) title: (((_e = (_d = (_c = (_b = (_a = $(element)) === null || _a === void 0 ? void 0 : _a.find("a")) === null || _b === void 0 ? void 0 : _b.attr("title")) === null || _c === void 0 ? void 0 : _c.replace("Download", "")) === null || _d === void 0 ? void 0 : _d.match(/^(.*?)\s*\((\d{4})\)|^(.*?)\s*\((Season \d+)\)/)) === null || _e === void 0 ? void 0 : _e[0]) ||
?.find("a") ((_h = (_g = (_f = $(element)) === null || _f === void 0 ? void 0 : _f.find("a")) === null || _g === void 0 ? void 0 : _g.attr("title")) === null || _h === void 0 ? void 0 : _h.replace("Download", "")) ||
?.attr("title") ((_k = (_j = $(element)) === null || _j === void 0 ? void 0 : _j.find(".post-title").text()) === null || _k === void 0 ? void 0 : _k.replace("Download", "")) ||
?.replace("Download", "")
?.match(/^(.*?)\s*\((\d{4})\)|^(.*?)\s*\((Season \d+)\)/)?.[0] ||
$(element)?.find("a")?.attr("title")?.replace("Download", "") ||
$(element)?.find(".post-title").text()?.replace("Download", "") ||
"").trim(), "").trim(),
link: $(element)?.find("a")?.attr("href") || "", link: ((_m = (_l = $(element)) === null || _l === void 0 ? void 0 : _l.find("a")) === null || _m === void 0 ? void 0 : _m.attr("href")) || "",
image: $(element).find("a").find("img").attr("data-lazy-src") || image: $(element).find("a").find("img").attr("data-lazy-src") ||
$(element).find("a").find("img").attr("data-src") || $(element).find("a").find("img").attr("data-src") ||
$(element).find("a").find("img").attr("src") || $(element).find("a").find("img").attr("src") ||
@@ -76,4 +79,5 @@ async function posts(baseUrl, url, signal, headers = {}, axios, cheerio) {
console.error("vegaGetPosts error:", error); console.error("vegaGetPosts error:", error);
return []; return [];
} }
});
} }

35
dist/vega/stream.js vendored
View File

@@ -1,4 +1,13 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getStream = getStream; exports.getStream = getStream;
const headers = { const headers = {
@@ -17,7 +26,9 @@ const headers = {
"Upgrade-Insecure-Requests": "1", "Upgrade-Insecure-Requests": "1",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0",
}; };
async function getStream({ link, type, signal, providerContext, }) { function getStream(_a) {
return __awaiter(this, arguments, void 0, function* ({ link, type, signal, providerContext, }) {
var _b, _c, _d, _e;
const { axios, cheerio, extractors } = providerContext; const { axios, cheerio, extractors } = providerContext;
const { hubcloudExtracter } = extractors; const { hubcloudExtracter } = extractors;
try { try {
@@ -25,7 +36,7 @@ async function getStream({ link, type, signal, providerContext, }) {
console.log("dotlink", link); console.log("dotlink", link);
if (type === "movie") { if (type === "movie") {
// vlink // vlink
const dotlinkRes = await axios(`${link}`, { headers }); const dotlinkRes = yield axios(`${link}`, { headers });
const dotlinkText = dotlinkRes.data; const dotlinkText = dotlinkRes.data;
// console.log('dotlinkText', dotlinkText); // console.log('dotlinkText', dotlinkText);
const vlink = dotlinkText.match(/<a\s+href="([^"]*cloud\.[^"]*)"/i) || []; const vlink = dotlinkText.match(/<a\s+href="([^"]*cloud\.[^"]*)"/i) || [];
@@ -38,14 +49,11 @@ async function getStream({ link, type, signal, providerContext, }) {
.parent() .parent()
.attr("href"); .attr("href");
// console.log('filepressLink', filepressLink); // console.log('filepressLink', filepressLink);
const filepressID = filepressLink?.split("/").pop(); const filepressID = filepressLink === null || filepressLink === void 0 ? void 0 : filepressLink.split("/").pop();
const filepressBaseUrl = filepressLink const filepressBaseUrl = filepressLink === null || filepressLink === void 0 ? void 0 : filepressLink.split("/").slice(0, -2).join("/");
?.split("/")
.slice(0, -2)
.join("/");
// console.log('filepressID', filepressID); // console.log('filepressID', filepressID);
// console.log('filepressBaseUrl', filepressBaseUrl); // console.log('filepressBaseUrl', filepressBaseUrl);
const filepressTokenRes = await axios.post(filepressBaseUrl + "/api/file/downlaod/", { const filepressTokenRes = yield axios.post(filepressBaseUrl + "/api/file/downlaod/", {
id: filepressID, id: filepressID,
method: "indexDownlaod", method: "indexDownlaod",
captchaValue: null, captchaValue: null,
@@ -56,9 +64,9 @@ async function getStream({ link, type, signal, providerContext, }) {
}, },
}); });
// console.log('filepressTokenRes', filepressTokenRes.data); // console.log('filepressTokenRes', filepressTokenRes.data);
if (filepressTokenRes.data?.status) { if ((_b = filepressTokenRes.data) === null || _b === void 0 ? void 0 : _b.status) {
const filepressToken = filepressTokenRes.data?.data; const filepressToken = (_c = filepressTokenRes.data) === null || _c === void 0 ? void 0 : _c.data;
const filepressStreamLink = await axios.post(filepressBaseUrl + "/api/file/downlaod2/", { const filepressStreamLink = yield axios.post(filepressBaseUrl + "/api/file/downlaod2/", {
id: filepressToken, id: filepressToken,
method: "indexDownlaod", method: "indexDownlaod",
captchaValue: null, captchaValue: null,
@@ -71,7 +79,7 @@ async function getStream({ link, type, signal, providerContext, }) {
// console.log('filepressStreamLink', filepressStreamLink.data); // console.log('filepressStreamLink', filepressStreamLink.data);
streamLinks.push({ streamLinks.push({
server: "filepress", server: "filepress",
link: filepressStreamLink.data?.data?.[0], link: (_e = (_d = filepressStreamLink.data) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e[0],
type: "mkv", type: "mkv",
}); });
} }
@@ -81,7 +89,7 @@ async function getStream({ link, type, signal, providerContext, }) {
// console.error(error); // console.error(error);
} }
} }
return await hubcloudExtracter(link, signal); return yield hubcloudExtracter(link, signal);
} }
catch (error) { catch (error) {
console.log("getStream error: ", error); console.log("getStream error: ", error);
@@ -91,4 +99,5 @@ async function getStream({ link, type, signal, providerContext, }) {
} }
return []; return [];
} }
});
} }

View File

@@ -1,10 +1,20 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getEpisodes = void 0; exports.getEpisodes = void 0;
const getEpisodes = async function ({ url, providerContext, }) { const getEpisodes = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ url, providerContext, }) {
const { axios, cheerio } = providerContext; const { axios, cheerio } = providerContext;
try { try {
const res = await axios.get(url); const res = yield axios.get(url);
const html = res.data; const html = res.data;
let $ = cheerio.load(html); let $ = cheerio.load(html);
const episodeLinks = []; const episodeLinks = [];
@@ -33,5 +43,6 @@ const getEpisodes = async function ({ url, providerContext, }) {
}, },
]; ];
} }
});
}; };
exports.getEpisodes = getEpisodes; exports.getEpisodes = getEpisodes;

21
dist/world4u/meta.js vendored
View File

@@ -1,11 +1,22 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getMeta = void 0; exports.getMeta = void 0;
const getMeta = async function ({ link, providerContext, }) { const getMeta = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ link, providerContext, }) {
var _b;
try { try {
const { axios, cheerio } = providerContext; const { axios, cheerio } = providerContext;
const url = link; const url = link;
const res = await axios.get(url); const res = yield axios.get(url);
const data = res.data; const data = res.data;
const $ = cheerio.load(data); const $ = cheerio.load(data);
const type = $(".entry-content") const type = $(".entry-content")
@@ -14,7 +25,7 @@ const getMeta = async function ({ link, providerContext, }) {
.includes("movie name") .includes("movie name")
? "movie" ? "movie"
: "series"; : "series";
const imdbId = $(".imdb_left").find("a").attr("href")?.split("/")[4] || ""; const imdbId = ((_b = $(".imdb_left").find("a").attr("href")) === null || _b === void 0 ? void 0 : _b.split("/")[4]) || "";
const title = $(".entry-content") const title = $(".entry-content")
.find('strong:contains("Name")') .find('strong:contains("Name")')
.children() .children()
@@ -33,9 +44,10 @@ const getMeta = async function ({ link, providerContext, }) {
""; "";
const links = []; const links = [];
$(".my-button").map((i, element) => { $(".my-button").map((i, element) => {
var _a;
const title = $(element).parent().parent().prev().text(); const title = $(element).parent().parent().prev().text();
const episodesLink = $(element).attr("href"); const episodesLink = $(element).attr("href");
const quality = title.match(/\b(480p|720p|1080p|2160p)\b/i)?.[0] || ""; const quality = ((_a = title.match(/\b(480p|720p|1080p|2160p)\b/i)) === null || _a === void 0 ? void 0 : _a[0]) || "";
if (episodesLink && title) { if (episodesLink && title) {
links.push({ links.push({
title, title,
@@ -72,5 +84,6 @@ const getMeta = async function ({ link, providerContext, }) {
linkList: [], linkList: [],
}; };
} }
});
}; };
exports.getMeta = getMeta; exports.getMeta = getMeta;

35
dist/world4u/posts.js vendored
View File

@@ -1,27 +1,41 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getSearchPosts = exports.getPosts = void 0; exports.getSearchPosts = exports.getPosts = void 0;
const getPosts = async function ({ filter, page, const getPosts = function (_a) {
// providerValue, return __awaiter(this, arguments, void 0, function* ({ filter, page,
signal, providerContext, }) { // providerValue,
signal, providerContext, }) {
const { getBaseUrl, axios, cheerio } = providerContext; const { getBaseUrl, axios, cheerio } = providerContext;
const baseUrl = await getBaseUrl("w4u"); const baseUrl = yield getBaseUrl("w4u");
const url = `${baseUrl + filter}/page/${page}/`; const url = `${baseUrl + filter}/page/${page}/`;
return posts({ url, signal, axios, cheerio }); return posts({ url, signal, axios, cheerio });
});
}; };
exports.getPosts = getPosts; exports.getPosts = getPosts;
const getSearchPosts = async function ({ searchQuery, page, const getSearchPosts = function (_a) {
// providerValue, return __awaiter(this, arguments, void 0, function* ({ searchQuery, page,
signal, providerContext, }) { // providerValue,
signal, providerContext, }) {
const { getBaseUrl, axios, cheerio } = providerContext; const { getBaseUrl, axios, cheerio } = providerContext;
const baseUrl = await getBaseUrl("w4u"); const baseUrl = yield getBaseUrl("w4u");
const url = `${baseUrl}/page/${page}/?s=${searchQuery}`; const url = `${baseUrl}/page/${page}/?s=${searchQuery}`;
return posts({ url, signal, axios, cheerio }); return posts({ url, signal, axios, cheerio });
});
}; };
exports.getSearchPosts = getSearchPosts; exports.getSearchPosts = getSearchPosts;
async function posts({ url, signal, axios, cheerio, }) { function posts(_a) {
return __awaiter(this, arguments, void 0, function* ({ url, signal, axios, cheerio, }) {
try { try {
const res = await axios.get(url, { signal }); const res = yield axios.get(url, { signal });
const data = res.data; const data = res.data;
const $ = cheerio.load(data); const $ = cheerio.load(data);
const catalog = []; const catalog = [];
@@ -45,4 +59,5 @@ async function posts({ url, signal, axios, cheerio, }) {
catch (err) { catch (err) {
return []; return [];
} }
});
} }

View File

@@ -1,7 +1,18 @@
"use strict"; "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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.getStream = void 0; exports.getStream = void 0;
const getStream = async function ({ link: url, type, providerContext, }) { const getStream = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ link: url, type, providerContext, }) {
var _b;
const { axios, cheerio } = providerContext; const { axios, cheerio } = providerContext;
const headers = { const headers = {
"sec-ch-ua": '"Not_A Brand";v="8", "Chromium";v="120", "Microsoft Edge";v="120"', "sec-ch-ua": '"Not_A Brand";v="8", "Chromium";v="120", "Microsoft Edge";v="120"',
@@ -14,26 +25,26 @@ const getStream = async function ({ link: url, type, providerContext, }) {
}; };
try { try {
if (type === "movie") { if (type === "movie") {
const linkRes = await axios.get(url, { headers }); const linkRes = yield axios.get(url, { headers });
const linkData = linkRes.data; const linkData = linkRes.data;
const $ = cheerio.load(linkData); const $ = cheerio.load(linkData);
url = $('strong:contains("INSTANT")').parent().attr("href") || url; url = $('strong:contains("INSTANT")').parent().attr("href") || url;
} }
// fastilinks // fastilinks
if (url.includes("fastilinks")) { if (url.includes("fastilinks")) {
const fastilinksRes = await axios.get(url, { headers }); const fastilinksRes = yield axios.get(url, { headers });
const fastilinksData = fastilinksRes.data; const fastilinksData = fastilinksRes.data;
const $$ = cheerio.load(fastilinksData); const $$ = cheerio.load(fastilinksData);
const fastilinksKey = $$('input[name="_csrf_token_645a83a41868941e4692aa31e7235f2"]').attr("value"); const fastilinksKey = $$('input[name="_csrf_token_645a83a41868941e4692aa31e7235f2"]').attr("value");
console.log("fastilinksKey", fastilinksKey); console.log("fastilinksKey", fastilinksKey);
const fastilinksFormData = new FormData(); const fastilinksFormData = new FormData();
fastilinksFormData.append("_csrf_token_645a83a41868941e4692aa31e7235f2", fastilinksKey || ""); fastilinksFormData.append("_csrf_token_645a83a41868941e4692aa31e7235f2", fastilinksKey || "");
const fastilinksRes2 = await fetch(url, { const fastilinksRes2 = yield fetch(url, {
method: "POST", method: "POST",
headers: headers, headers: headers,
body: fastilinksFormData, body: fastilinksFormData,
}); });
const fastilinksHtml = await fastilinksRes2.text(); const fastilinksHtml = yield fastilinksRes2.text();
// console.log('fastilinksHtml', fastilinksHtml); // console.log('fastilinksHtml', fastilinksHtml);
const $$$ = cheerio.load(fastilinksHtml); const $$$ = cheerio.load(fastilinksHtml);
const fastilinksLink = $$$('a:contains("mediafire")').attr("href") || const fastilinksLink = $$$('a:contains("mediafire")').attr("href") ||
@@ -45,7 +56,7 @@ const getStream = async function ({ link: url, type, providerContext, }) {
if (url.includes("photolinx")) { if (url.includes("photolinx")) {
console.log("photolinx", url); console.log("photolinx", url);
// const photolinxBaseUrl = url.split('/').slice(0, 3).join('/'); // const photolinxBaseUrl = url.split('/').slice(0, 3).join('/');
const photolinxRes = await axios.get(url, { headers }); const photolinxRes = yield axios.get(url, { headers });
const photolinxData = photolinxRes.data; const photolinxData = photolinxRes.data;
const $$$ = cheerio.load(photolinxData); const $$$ = cheerio.load(photolinxData);
const access_token = $$$("#generate_url").attr("data-token"); const access_token = $$$("#generate_url").attr("data-token");
@@ -58,7 +69,7 @@ const getStream = async function ({ link: url, type, providerContext, }) {
}, },
}; };
console.log("photolinxData", JSON.stringify(body)); console.log("photolinxData", JSON.stringify(body));
const photolinxRes2 = await fetch("https://photolinx.shop/action", { const photolinxRes2 = yield fetch("https://photolinx.shop/action", {
headers: { headers: {
"sec-fetch-site": "same-origin", "sec-fetch-site": "same-origin",
"x-requested-with": "xmlhttprequest", "x-requested-with": "xmlhttprequest",
@@ -69,9 +80,9 @@ const getStream = async function ({ link: url, type, providerContext, }) {
body: JSON.stringify(body), body: JSON.stringify(body),
method: "POST", method: "POST",
}); });
const photolinxData2 = await photolinxRes2.json(); const photolinxData2 = yield photolinxRes2.json();
console.log("photolinxData2", photolinxData2); console.log("photolinxData2", photolinxData2);
const dwUrl = photolinxData2?.download_url; const dwUrl = photolinxData2 === null || photolinxData2 === void 0 ? void 0 : photolinxData2.download_url;
if (dwUrl) { if (dwUrl) {
const streamLinks = [ const streamLinks = [
{ {
@@ -83,21 +94,21 @@ const getStream = async function ({ link: url, type, providerContext, }) {
return streamLinks; return streamLinks;
} }
} }
const res = await axios.get(url, { headers }); const res = yield axios.get(url, { headers });
const html = res.data; const html = res.data;
const streamLinks = []; const streamLinks = [];
let data = { download: "" }; let data = { download: "" };
try { try {
const key = html.match(/formData\.append\('key',\s*'(\d+)'\);/)?.[1] || ""; const key = ((_b = html.match(/formData\.append\('key',\s*'(\d+)'\);/)) === null || _b === void 0 ? void 0 : _b[1]) || "";
console.log("key", key); console.log("key", key);
const formData = new FormData(); const formData = new FormData();
formData.append("key", key); formData.append("key", key);
const streamRes = await fetch(url, { const streamRes = yield fetch(url, {
method: "POST", method: "POST",
headers: headers, headers: headers,
body: formData, body: formData,
}); });
data = await streamRes.json(); data = yield streamRes.json();
} }
catch (err) { catch (err) {
console.log("error in world4uGetStream", err); console.log("error in world4uGetStream", err);
@@ -109,7 +120,7 @@ const getStream = async function ({ link: url, type, providerContext, }) {
$(".input.popsok").attr("href"); $(".input.popsok").attr("href");
console.log("mediafireUrl", mediafireUrl); console.log("mediafireUrl", mediafireUrl);
if (mediafireUrl) { if (mediafireUrl) {
const directUrl = await axios.head(mediafireUrl); const directUrl = yield axios.head(mediafireUrl);
const urlContentType = directUrl.headers["content-type"]; const urlContentType = directUrl.headers["content-type"];
console.log("mfcontentType", urlContentType); console.log("mfcontentType", urlContentType);
if (urlContentType && urlContentType.includes("video")) { if (urlContentType && urlContentType.includes("video")) {
@@ -121,7 +132,7 @@ const getStream = async function ({ link: url, type, providerContext, }) {
return streamLinks; return streamLinks;
} }
else { else {
const repairRes = await axios.get(mediafireUrl, { const repairRes = yield axios.get(mediafireUrl, {
headers: { headers: {
Referer: url, Referer: url,
}, },
@@ -143,7 +154,7 @@ const getStream = async function ({ link: url, type, providerContext, }) {
return streamLinks; return streamLinks;
} }
} }
const requireRepairRes = await axios.head(data.download); const requireRepairRes = yield axios.head(data.download);
const contentType = requireRepairRes.headers["content-type"]; const contentType = requireRepairRes.headers["content-type"];
console.log("contentType", contentType); console.log("contentType", contentType);
if (contentType && contentType.includes("video")) { if (contentType && contentType.includes("video")) {
@@ -155,7 +166,7 @@ const getStream = async function ({ link: url, type, providerContext, }) {
return streamLinks; return streamLinks;
} }
else { else {
const repairRes = await axios.get(data.download, { const repairRes = yield axios.get(data.download, {
headers: { headers: {
Referer: url, Referer: url,
}, },
@@ -164,7 +175,7 @@ const getStream = async function ({ link: url, type, providerContext, }) {
const $ = cheerio.load(repairHtml); const $ = cheerio.load(repairHtml);
const repairLink = $("#continue-btn").attr("href"); const repairLink = $("#continue-btn").attr("href");
console.log("repairLink", "https://www.mediafire.com" + repairLink); console.log("repairLink", "https://www.mediafire.com" + repairLink);
const repairRequireRepairRes = await axios.get("https://www.mediafire.com" + repairLink); const repairRequireRepairRes = yield axios.get("https://www.mediafire.com" + repairLink);
const $$ = cheerio.load(repairRequireRepairRes.data); const $$ = cheerio.load(repairRequireRepairRes.data);
const repairDownloadLink = $$(".input.popsok").attr("href"); const repairDownloadLink = $$(".input.popsok").attr("href");
console.log("repairDownloadLink", repairDownloadLink); console.log("repairDownloadLink", repairDownloadLink);
@@ -182,5 +193,6 @@ const getStream = async function ({ link: url, type, providerContext, }) {
console.log(err); console.log(err);
return []; return [];
} }
});
}; };
exports.getStream = getStream; exports.getStream = getStream;