{
+ const title = $(element).find("h5").text();
+ const link = $(element).find("h5").find("a").attr("href");
+ const image = $(element).find("img").attr("data-src") ||
+ $(element).find("img").attr("src") ||
+ "";
+ if (title && link && image) {
+ catalog.push({
+ title: title,
+ link: link,
+ image: image,
+ });
+ }
+ });
+ return catalog;
+ }
+ catch (err) {
+ console.error("protonGetPosts error ", err);
+ return [];
+ }
+}
diff --git a/dist/protonMovies/stream.js b/dist/protonMovies/stream.js
new file mode 100644
index 0000000..3b94351
--- /dev/null
+++ b/dist/protonMovies/stream.js
@@ -0,0 +1,165 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.getStream = void 0;
+function LALLJLutmoZpvvbikjaWM(str) {
+ var buf = new ArrayBuffer(str.length * 2);
+ var bufView = new Uint8Array(buf);
+ for (var i = 0, strLen = str.length; i < strLen; i++) {
+ bufView[i] = str.charCodeAt(i);
+ }
+ return buf;
+}
+function getOrCreateUID() {
+ const uid = "uid_" + Date.now() + "_" + Math.random().toString(36).substr(2, 9);
+ return uid;
+}
+const getStream = async function ({ link, providerContext, }) {
+ const { axios, cheerio, commonHeaders: headers, extractors, } = providerContext;
+ const { gofileExtracter } = extractors;
+ function generateMessageToken(baseUrlL) {
+ const hostname = baseUrlL?.replace(/https?:\/\//, "").split("/")[0];
+ 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}]`;
+ var jRpeP = LALLJLutmoZpvvbikjaWM(NsmxUftCNibQ);
+ var jzKEwqEAcWFMNwHZnCCqJQ = new Uint8Array(jRpeP);
+ var kyMXQUxoFYuZIBlKvlHa = jzKEwqEAcWFMNwHZnCCqJQ.toString();
+ var kyMXQUxoFYuZIBlKvlHa = kyMXQUxoFYuZIBlKvlHa.replace(/2/g, "004");
+ var kyMXQUxoFYuZIBlKvlHa = kyMXQUxoFYuZIBlKvlHa.replace(/3/g, "005");
+ var kyMXQUxoFYuZIBlKvlHa = kyMXQUxoFYuZIBlKvlHa.replace(/7/g, "007");
+ var kyMXQUxoFYuZIBlKvlHa = kyMXQUxoFYuZIBlKvlHa.replace(/,0,0,0/g, "");
+ return kyMXQUxoFYuZIBlKvlHa;
+ }
+ function decodeHtml(encodedArray) {
+ // Join array elements into a single string
+ const joined = encodedArray.join("");
+ // Replace escaped quotes
+ const unescaped = joined.replace(/\\"/g, '"').replace(/\\'/g, "'");
+ // Remove remaining escape characters
+ const cleaned = unescaped
+ .replace(/\\n/g, "\n")
+ .replace(/\\t/g, "\t")
+ .replace(/\\r/g, "\r");
+ // Convert literal string representations back to characters
+ const decoded = cleaned
+ .replace(/"/g, '"')
+ .replace(/</g, "<")
+ .replace(/>/g, ">")
+ .replace(/&/g, "&");
+ return decoded;
+ }
+ try {
+ const streamLinks = [];
+ const res = await axios.get(link, { headers });
+ const data = res.data;
+ // const regex = /\[(?=.*?"
{
+ const formData = new URLSearchParams();
+ formData.append("downloadid", id.id);
+ formData.append("token", "ok");
+ const messageToken = generateMessageToken(baseUrl);
+ const uid = getOrCreateUID();
+ const idRes = await fetch(`${baseUrl}/ppd.php`, {
+ headers: {
+ accept: "*/*",
+ "accept-language": "en-US,en;q=0.9,en-IN;q=0.8",
+ "cache-control": "no-cache",
+ "content-type": "application/x-www-form-urlencoded",
+ pragma: "no-cache",
+ priority: "u=1, i",
+ "sec-ch-ua": '"Chromium";v="136", "Microsoft Edge";v="136", "Not.A/Brand";v="99"',
+ "sec-ch-ua-mobile": "?0",
+ "sec-ch-ua-platform": '"Windows"',
+ "sec-fetch-dest": "empty",
+ "sec-fetch-mode": "cors",
+ "sec-fetch-site": "same-origin",
+ cookie: "ext_name=ojplmecpdpgccookcobabopnaifgidhf; tgInvite222=true; cf_clearance=3ynJv2B6lHMj3FCOqtfQaL7lTN4KC3xmPRMgcNtddAc-1748787867-1.2.1.1-SEIhLbWR3ehfib5Y3P5pjzj1Qu9wipc52Icv4AmNkztXn2pTXhjKgxXnvTuA2bNscgHuc1juXujAHteqY_vaMmy2C3djMWnJGzjje_XvXZXKht8rwHZt6sviq7KAYvrYZPTrATqENuopzmqmK6dDFS.CAnWHt0VDn8q06iLm5rYj1AXUo3qkV5p1Idx_25elWHYGG8yengBrQV1MYVM9LMdQqv44PXu69FZvNkgv.d6blCKyneJnoLkw4LHAccu.QRPbFwWqqTDyO9YTLRQW9w29bKghD3_JVxkz.qxpg5FbocJ3i6tJJy74SvROpYdpVUOn0fW1YgQ7RxYwhNoHpdTKy8pvmQJGRuSVW1GjO_k",
+ Referer: "https://m3.protonmovies.top/download/",
+ "Referrer-Policy": "strict-origin-when-cross-origin",
+ },
+ body: `downloadid=${id.id}&msg=${messageToken}&uid=${uid}&token=ok`,
+ method: "POST",
+ });
+ const idData = await idRes.text();
+ secondIdList.push({
+ quality: id.quality,
+ id: idData,
+ });
+ console.log("idData", idData);
+ }));
+ await Promise.all(secondIdList.map(async (id) => {
+ const idRes = await axios.post(`${baseUrl}/tmp/${id.id}`);
+ if (idRes.data.ppd["gofile.io"]) {
+ const goRes = await gofileExtracter(idRes.data.ppd["gofile.io"].link.split("/").pop());
+ console.log("link", goRes.link);
+ if (goRes.link) {
+ streamLinks.push({
+ link: goRes.link,
+ server: "gofile " + id.quality,
+ type: "mkv",
+ headers: {
+ referer: "https://gofile.io",
+ connection: "keep-alive",
+ contentType: "video/x-matroska",
+ cookie: "accountToken=" + goRes.token,
+ },
+ });
+ }
+ }
+ }));
+ return streamLinks;
+ }
+ catch (e) {
+ console.log("proton get stream err", e);
+ return [];
+ }
+};
+exports.getStream = getStream;
diff --git a/dist/ridoMovies/catalog.js b/dist/ridoMovies/catalog.js
new file mode 100644
index 0000000..0e38e58
--- /dev/null
+++ b/dist/ridoMovies/catalog.js
@@ -0,0 +1,14 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.genres = exports.catalog = void 0;
+exports.catalog = [
+ {
+ title: "Popular Movies",
+ filter: "/top/catalog/movie/top.json",
+ },
+ {
+ title: "Featured Movies",
+ filter: "/imdbRating/catalog/movie/imdbRating.json",
+ },
+];
+exports.genres = [];
diff --git a/dist/ridoMovies/meta.js b/dist/ridoMovies/meta.js
new file mode 100644
index 0000000..2224b7d
--- /dev/null
+++ b/dist/ridoMovies/meta.js
@@ -0,0 +1,85 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.getMeta = void 0;
+const getMeta = async function ({ link, providerContext, }) {
+ try {
+ const { getBaseUrl, axios } = providerContext;
+ const res = await axios.get(link);
+ const data = res.data;
+ const meta = {
+ title: "",
+ synopsis: "",
+ image: "",
+ imdbId: data?.meta?.imdb_id || "",
+ type: data?.meta?.type || "movie",
+ };
+ const baseUrl = await getBaseUrl("ridomovies");
+ let slug = "";
+ try {
+ const res2 = await axios.get(baseUrl + "/core/api/search?q=" + meta.imdbId);
+ const data2 = res2.data;
+ slug = data2?.data?.items[0]?.fullSlug;
+ if (!slug || meta?.type === "series") {
+ return {
+ title: "",
+ synopsis: "",
+ image: "",
+ imdbId: data?.meta?.imdb_id || "",
+ type: meta?.type || "movie",
+ linkList: [],
+ };
+ }
+ }
+ catch (err) {
+ return {
+ title: "",
+ synopsis: "",
+ image: "",
+ imdbId: meta?.imdbId || "",
+ type: meta?.type || "movie",
+ linkList: [],
+ };
+ }
+ const links = [];
+ let directLinks = [];
+ let season = new Map();
+ if (meta.type === "series") {
+ data?.meta?.videos?.map((video) => {
+ if (video?.season <= 0)
+ return;
+ if (!season.has(video?.season)) {
+ season.set(video?.season, []);
+ }
+ season.get(video?.season).push({
+ title: "Episode " + video?.episode,
+ link: "",
+ });
+ });
+ for (const [seasonNum, episodes] of season.entries()) {
+ links.push({
+ title: "Season " + seasonNum,
+ directLinks: episodes,
+ });
+ }
+ }
+ else {
+ directLinks.push({ title: "Movie", link: link });
+ links.push({ title: "Movie", directLinks: directLinks });
+ }
+ return {
+ ...meta,
+ linkList: links,
+ };
+ }
+ catch (err) {
+ return {
+ title: "",
+ synopsis: "",
+ image: "",
+ imdbId: "",
+ type: "movie",
+ linkList: [],
+ };
+ }
+};
+exports.getMeta = getMeta;
diff --git a/dist/ridoMovies/posts.js b/dist/ridoMovies/posts.js
new file mode 100644
index 0000000..3fddbf2
--- /dev/null
+++ b/dist/ridoMovies/posts.js
@@ -0,0 +1,66 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.getSearchPosts = exports.getPosts = void 0;
+const getPosts = async function ({ filter, signal, providerContext, }) {
+ try {
+ const catalog = [];
+ const url = "https://cinemeta-catalogs.strem.io" + filter;
+ console.log("allGetPostUrl", url);
+ const res = await providerContext.axios.get(url, {
+ headers: providerContext.commonHeaders,
+ signal,
+ });
+ const data = res.data;
+ data?.metas.map((result) => {
+ const title = result?.name;
+ const id = result?.imdb_id || result?.id;
+ const type = result?.type;
+ const image = result?.poster;
+ if (id) {
+ catalog.push({
+ title: title,
+ link: `https://v3-cinemeta.strem.io/meta/${type}/${id}.json`,
+ image: image,
+ });
+ }
+ });
+ console.log("catalog", catalog.length);
+ return catalog;
+ }
+ catch (err) {
+ console.error("AutoEmbed error ", err);
+ return [];
+ }
+};
+exports.getPosts = getPosts;
+const getSearchPosts = async function ({ searchQuery, page, signal, providerContext, }) {
+ try {
+ const { axios, commonHeaders: headers } = providerContext;
+ if (page > 1) {
+ return [];
+ }
+ const catalog = [];
+ const url2 = `https://v3-cinemeta.strem.io/catalog/movie/top/search=${encodeURI(searchQuery)}.json`;
+ const res2 = await axios.get(url2, { headers, signal });
+ const data2 = res2.data;
+ data2?.metas.map((result) => {
+ const title = result?.name || "";
+ const id = result?.imdb_id || result?.id;
+ const image = result?.poster;
+ const type = result?.type;
+ if (id) {
+ catalog.push({
+ title: title,
+ link: `https://v3-cinemeta.strem.io/meta/${type}/${id}.json`,
+ image: image,
+ });
+ }
+ });
+ return catalog;
+ }
+ catch (err) {
+ console.error("AutoEmbed error ", err);
+ return [];
+ }
+};
+exports.getSearchPosts = getSearchPosts;
diff --git a/dist/ridoMovies/stream.js b/dist/ridoMovies/stream.js
new file mode 100644
index 0000000..d3aa161
--- /dev/null
+++ b/dist/ridoMovies/stream.js
@@ -0,0 +1,64 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.getStream = void 0;
+const getStream = async ({ link: data, providerContext, }) => {
+ try {
+ const { cheerio, commonHeaders: headers, axios } = providerContext;
+ const streamData = JSON.parse(data);
+ const streamLinks = [];
+ // const path =
+ // streamData?.type === 'movie'
+ // ? `/${streamData?.slug}`
+ // : `/${streamData?.slug}/season-${streamData?.season}/episode-${streamData?.episode}`;
+ // const url = streamData?.baseUrl + path;
+ // console.log('all', url);
+ // const res = await axios.get(url, {headers});
+ // const postId = res.data.split('\\"postid\\":\\"')[1].split('\\"')[0];
+ // console.log('rido post id', postId);
+ const url = streamData?.baseUrl + "/api/" + streamData?.slug;
+ console.log("rido url", url);
+ const res = await axios.get(url, { headers });
+ const iframe = res.data.data?.[0]?.url;
+ console.log("rido data", iframe);
+ const iframeUrl = iframe.split('src="')[1].split('"')[0];
+ console.log("rido iframeUrl", iframeUrl);
+ const iframeRes = await axios.get(iframeUrl, {
+ headers: {
+ ...headers,
+ Referer: streamData?.baseUrl,
+ },
+ });
+ const $ = cheerio.load(iframeRes.data);
+ const script = $('script:contains("eval")').html();
+ if (!script) {
+ throw new Error("Unable to find script");
+ }
+ // console.log('rido script', script);
+ const srcUrl = unpackJavaScript(script.trim());
+ console.log("rido srcUrl", srcUrl);
+ streamLinks.push({
+ link: srcUrl,
+ server: "rido",
+ type: "m3u8",
+ headers: {
+ Referer: iframeUrl,
+ },
+ });
+ return streamLinks;
+ }
+ catch (e) {
+ console.log("rido get stream err", e);
+ return [];
+ }
+};
+exports.getStream = getStream;
+function unpackJavaScript(packedCode) {
+ const encodedString = packedCode.split("|aHR")[1].split("|")[0];
+ const base64Url = "aHR" + encodedString;
+ function addPadding(base64) {
+ return base64 + "=".repeat((4 - (base64.length % 4)) % 4);
+ }
+ console.log("rido base64Url", base64Url);
+ const unpackedCode = atob(addPadding(base64Url));
+ return unpackedCode;
+}
diff --git a/dist/ringz/catalog.js b/dist/ringz/catalog.js
new file mode 100644
index 0000000..9bc97ce
--- /dev/null
+++ b/dist/ringz/catalog.js
@@ -0,0 +1,18 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.genres = exports.catalog = void 0;
+exports.catalog = [
+ {
+ title: "Movies",
+ filter: "MOVIES",
+ },
+ {
+ title: "TV Shows",
+ filter: "SERIES",
+ },
+ {
+ title: "Anime",
+ filter: "ANIME",
+ },
+];
+exports.genres = [];
diff --git a/dist/ringz/meta.js b/dist/ringz/meta.js
new file mode 100644
index 0000000..4a64c73
--- /dev/null
+++ b/dist/ringz/meta.js
@@ -0,0 +1,85 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.getMeta = void 0;
+const getMeta = async function ({ link: data, }) {
+ try {
+ const dataJson = JSON.parse(data);
+ const title = dataJson?.kn || dataJson?.mn;
+ const image = dataJson?.IH || dataJson?.IV;
+ const tags = dataJson?.gn
+ .split(",")
+ .slice(0, 3)
+ .map((tag) => tag.trim());
+ const type = dataJson?.cg === "webSeries" ? "series" : "movie";
+ const linkList = [];
+ if (dataJson?.cg === "webSeries") {
+ ["1", "2", "3", "4"]?.forEach((item) => {
+ const directLinks = [];
+ if (typeof dataJson?.["eServer" + item] === "object" &&
+ Object?.keys(dataJson?.["eServer" + item])?.length > 0) {
+ Object.keys(dataJson?.["eServer" + item]).forEach((key) => {
+ directLinks.push({
+ title: "Episode " + key,
+ link: JSON.stringify({
+ url: dataJson?.["eServer" + item][key],
+ server: "Server " + item,
+ }),
+ });
+ });
+ linkList.push({
+ title: dataJson?.pn + " (Server " + item + ")",
+ directLinks,
+ });
+ }
+ });
+ }
+ else {
+ const directLinks = [];
+ ["1", "2", "3", "4"]?.forEach((item) => {
+ if (dataJson?.["s" + item]) {
+ directLinks.push({
+ title: "Server " + item + " (HD)",
+ link: JSON.stringify({
+ url: dataJson?.s1,
+ server: "Server " + item,
+ }),
+ });
+ }
+ if (dataJson?.["4s" + item]) {
+ directLinks.push({
+ title: "Server " + item + " (480p)",
+ link: JSON.stringify({
+ url: dataJson?.["4s" + item],
+ server: "Server " + item,
+ }),
+ });
+ }
+ });
+ linkList.push({
+ title: dataJson?.pn,
+ directLinks,
+ });
+ }
+ return {
+ title,
+ image,
+ imdbId: "",
+ synopsis: "",
+ type,
+ linkList,
+ tags,
+ };
+ }
+ catch (err) {
+ return {
+ title: "",
+ image: "",
+ imdbId: "",
+ synopsis: "",
+ type: "movie",
+ linkList: [],
+ tags: [],
+ };
+ }
+};
+exports.getMeta = getMeta;
diff --git a/dist/ringz/posts.js b/dist/ringz/posts.js
new file mode 100644
index 0000000..972f127
--- /dev/null
+++ b/dist/ringz/posts.js
@@ -0,0 +1,153 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ringzData = exports.headers = exports.getSearchPosts = exports.getPosts = void 0;
+exports.getRingzMovies = getRingzMovies;
+exports.getRingzShows = getRingzShows;
+exports.getRingzAnime = getRingzAnime;
+exports.getRingzAdult = getRingzAdult;
+const getPosts = async function ({ filter, signal, providerContext, }) {
+ return posts({ filter, signal, providerContext });
+};
+exports.getPosts = getPosts;
+const getSearchPosts = async function ({ searchQuery, page, // providerContext,
+ }) {
+ if (page > 1)
+ return [];
+ function searchData(data, query) {
+ // Convert query to lowercase for case-insensitive search
+ const searchQuery = query.toLowerCase();
+ // Filter movies based on movie name (mn)
+ return data.filter((movie) => {
+ // Convert movie name to lowercase and check if it includes the search query
+ const movieName = movie.mn.toLowerCase();
+ return movieName.includes(searchQuery);
+ });
+ }
+ try {
+ const catalog = [];
+ const promises = [getRingzMovies(), getRingzShows(), getRingzAnime()];
+ const responses = await Promise.all(promises);
+ responses.map((response) => {
+ const searchResults = searchData(response, searchQuery);
+ searchResults.map((element) => {
+ const title = element?.kn || element?.mn;
+ const link = JSON.stringify(element);
+ const image = element?.IV;
+ if (title && link) {
+ catalog.push({
+ title: title,
+ link: link,
+ image: image,
+ });
+ }
+ });
+ });
+ return catalog;
+ }
+ catch (err) {
+ console.error("ringz error ", err);
+ return [];
+ }
+};
+exports.getSearchPosts = getSearchPosts;
+async function posts({ filter, // signal,
+ }) {
+ try {
+ let response;
+ if (filter === "MOVIES") {
+ response = getRingzMovies();
+ }
+ if (filter === "SERIES") {
+ response = getRingzShows();
+ }
+ if (filter === "ANIME") {
+ response = getRingzAnime();
+ }
+ const data = await response;
+ const catalog = [];
+ data.map((element) => {
+ const title = element?.kn || element?.mn;
+ const link = JSON.stringify(element);
+ const image = element?.IV;
+ if (title && link) {
+ catalog.push({
+ title: title,
+ link: link,
+ image: image,
+ });
+ }
+ });
+ return catalog;
+ }
+ catch (err) {
+ console.error("ringz error ", err);
+ return [];
+ }
+}
+exports.headers = {
+ "cf-access-client-id": "833049b087acf6e787cedfd85d1ccdb8.access",
+ "cf-access-client-secret": "02db296a961d7513c3102d7785df4113eff036b2d57d060ffcc2ba3ba820c6aa",
+};
+const BASE_URL = "https://privatereporz.pages.dev";
+async function getRingzMovies() {
+ try {
+ const response = await fetch(`${BASE_URL}/test.json`, {
+ headers: {
+ ...exports.headers,
+ },
+ });
+ const data = await response.json();
+ return data.AllMovieDataList;
+ }
+ catch (error) {
+ console.error(error);
+ }
+}
+async function getRingzShows() {
+ try {
+ const response = await fetch(`${BASE_URL}/srs.json`, {
+ headers: {
+ ...exports.headers,
+ },
+ });
+ const data = await response.json();
+ return data.webSeriesDataList;
+ }
+ catch (error) {
+ console.error(error);
+ }
+}
+async function getRingzAnime() {
+ try {
+ const response = await fetch(`${BASE_URL}/anime.json`, {
+ headers: {
+ ...exports.headers,
+ },
+ });
+ const data = await response.json();
+ return data.webSeriesDataList;
+ }
+ catch (error) {
+ console.error(error);
+ }
+}
+async function getRingzAdult() {
+ try {
+ const response = await fetch(`${BASE_URL}/desihub.json`, {
+ headers: {
+ ...exports.headers,
+ },
+ });
+ const data = await response.json();
+ return data.webSeriesDataList;
+ }
+ catch (error) {
+ console.error(error);
+ }
+}
+exports.ringzData = {
+ getRingzMovies,
+ getRingzShows,
+ getRingzAnime,
+ getRingzAdult,
+};
diff --git a/dist/ringz/stream.js b/dist/ringz/stream.js
new file mode 100644
index 0000000..c060210
--- /dev/null
+++ b/dist/ringz/stream.js
@@ -0,0 +1,14 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.getStream = void 0;
+const getStream = async function ({ link: data, }) {
+ const streamLinks = [];
+ const dataJson = JSON.parse(data);
+ streamLinks.push({
+ link: dataJson.url,
+ server: dataJson.server,
+ type: "mkv",
+ });
+ return streamLinks;
+};
+exports.getStream = getStream;
diff --git a/dist/showbox/catalog.js b/dist/showbox/catalog.js
new file mode 100644
index 0000000..a6b76ab
--- /dev/null
+++ b/dist/showbox/catalog.js
@@ -0,0 +1,18 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.genres = exports.catalog = void 0;
+exports.catalog = [
+ {
+ title: "Home",
+ filter: "",
+ },
+ {
+ title: "Movies",
+ filter: "/movie",
+ },
+ {
+ title: "TV Shows",
+ filter: "/tv",
+ },
+];
+exports.genres = [];
diff --git a/dist/showbox/episodes.js b/dist/showbox/episodes.js
new file mode 100644
index 0000000..5a3c2c3
--- /dev/null
+++ b/dist/showbox/episodes.js
@@ -0,0 +1,43 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.getEpisodes = void 0;
+const getEpisodes = async function ({ url: id, providerContext, }) {
+ const { axios } = providerContext;
+ try {
+ const [fileId, febboxId] = id.split("&");
+ 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=&is_html=0`;
+ const res = await axios.get(febLink);
+ const data = res.data;
+ const fileList = data.data.file_list;
+ const episodeLinks = [];
+ fileList?.map((file) => {
+ const fileName = formatEpisodeName(file.file_name);
+ const epId = file?.fid;
+ if (!file.is_dir && fileName && epId) {
+ episodeLinks.push({
+ title: fileName,
+ link: `${fileId}&${epId}`,
+ });
+ }
+ });
+ return episodeLinks;
+ }
+ catch (err) {
+ return [];
+ }
+};
+exports.getEpisodes = getEpisodes;
+function formatEpisodeName(title) {
+ const regex = /[sS](\d+)\s*[eE](\d+)/;
+ const match = title.match(regex);
+ if (match) {
+ const season = match[1].padStart(2, "0");
+ const episode = match[2].padStart(2, "0");
+ return `Season${season} Episode${episode}`;
+ }
+ else {
+ return title;
+ }
+}
diff --git a/dist/showbox/meata.js b/dist/showbox/meata.js
new file mode 100644
index 0000000..5e6a995
--- /dev/null
+++ b/dist/showbox/meata.js
@@ -0,0 +1,65 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.getMeta = void 0;
+const getMeta = async function ({ link, providerContext, }) {
+ try {
+ const { axios, cheerio } = providerContext;
+ const url = link;
+ const res = await axios.get(url);
+ const data = res.data;
+ const $ = cheerio.load(data);
+ const type = url.includes("tv") ? "series" : "movie";
+ const imdbId = "";
+ const title = $(".heading-name").text();
+ const rating = $(".btn-imdb")
+ .text()
+ ?.match(/\d+(\.\d+)?/g)?.[0] || "";
+ const image = $(".cover_follow").attr("style")?.split("url(")[1]?.split(")")[0] || "";
+ const synopsis = $(".description")
+ .text()
+ ?.replace(/[\n\t]/g, "")
+ ?.trim();
+ const febID = $(".heading-name").find("a").attr("href")?.split("/")?.pop();
+ const baseUrl = url.split("/").slice(0, 3).join("/");
+ const indexUrl = `${baseUrl}/index/share_link?id=${febID}&type=${type === "movie" ? "1" : "2"}`;
+ const indexRes = await axios.get(indexUrl);
+ const indexData = indexRes.data;
+ const febKey = indexData.data.link.split("/").pop();
+ const febLink = `https://www.febbox.com/file/file_share_list?share_key=${febKey}&is_html=0`;
+ const febRes = await axios.get(febLink);
+ const febData = febRes.data;
+ const fileList = febData?.data?.file_list;
+ const links = [];
+ if (fileList) {
+ fileList.map((file) => {
+ const fileName = `${file.file_name} (${file.file_size})`;
+ const fileId = file.fid;
+ links.push({
+ title: fileName,
+ episodesLink: file.is_dir ? `${febKey}&${fileId}` : `${febKey}&`,
+ });
+ });
+ }
+ return {
+ title,
+ rating,
+ synopsis,
+ image,
+ imdbId,
+ type,
+ linkList: links,
+ };
+ }
+ catch (err) {
+ return {
+ title: "",
+ rating: "",
+ synopsis: "",
+ image: "",
+ imdbId: "",
+ type: "",
+ linkList: [],
+ };
+ }
+};
+exports.getMeta = getMeta;
diff --git a/dist/showbox/posts.js b/dist/showbox/posts.js
new file mode 100644
index 0000000..cd2e9a3
--- /dev/null
+++ b/dist/showbox/posts.js
@@ -0,0 +1,47 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.getSearchPosts = exports.getPosts = void 0;
+const getPosts = async function ({ filter, page,
+// providerValue,
+signal, providerContext, }) {
+ const { getBaseUrl, axios, cheerio } = providerContext;
+ const baseUrl = await getBaseUrl("showbox");
+ const url = `${baseUrl + filter}?page=${page}/`;
+ return posts({ url, signal, baseUrl, axios, cheerio });
+};
+exports.getPosts = getPosts;
+const getSearchPosts = async function ({ searchQuery, page,
+// providerValue,
+signal, providerContext, }) {
+ const { getBaseUrl, axios, cheerio } = providerContext;
+ const baseUrl = await getBaseUrl("showbox");
+ const url = `${baseUrl}/search?keyword=${searchQuery}&page=${page}`;
+ return posts({ url, signal, baseUrl, axios, cheerio });
+};
+exports.getSearchPosts = getSearchPosts;
+async function posts({ url, signal,
+// baseUrl,
+axios, cheerio, }) {
+ try {
+ const res = await axios.get(url, { signal });
+ const data = res.data;
+ const $ = cheerio.load(data);
+ const catalog = [];
+ $(".movie-item").map((i, element) => {
+ const title = $(element).find(".movie-title").text();
+ const link = $(element).find("a").attr("href");
+ const image = $(element).find("img").attr("src");
+ if (title && link && image) {
+ catalog.push({
+ title: title,
+ link: link,
+ image: image,
+ });
+ }
+ });
+ return catalog;
+ }
+ catch (err) {
+ return [];
+ }
+}
diff --git a/dist/showbox/stream.js b/dist/showbox/stream.js
new file mode 100644
index 0000000..d5efe4a
--- /dev/null
+++ b/dist/showbox/stream.js
@@ -0,0 +1,70 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || (function () {
+ var ownKeys = function(o) {
+ ownKeys = Object.getOwnPropertyNames || function (o) {
+ var ar = [];
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+ return ar;
+ };
+ return ownKeys(o);
+ };
+ return function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+ __setModuleDefault(result, mod);
+ return result;
+ };
+})();
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.getStream = void 0;
+const cheerio = __importStar(require("cheerio"));
+const getStream = async function ({ link: id,
+// type,
+signal, providerContext, }) {
+ try {
+ const { axios } = providerContext;
+ const stream = [];
+ const [, epId] = id.split("&");
+ const url = `https://febbox.vercel.app/api/video-quality?fid=${epId}`;
+ const res = await axios.get(url, { signal });
+ const data = res.data;
+ const $ = cheerio.load(data.html);
+ $(".file_quality").each((i, el) => {
+ const server = $(el).find("p.name").text() +
+ " - " +
+ $(el).find("p.size").text() +
+ " - " +
+ $(el).find("p.speed").text();
+ const link = $(el).attr("data-url");
+ if (link) {
+ stream.push({
+ server: server,
+ type: "mkv",
+ link: link,
+ });
+ }
+ });
+ return stream;
+ }
+ catch (err) {
+ return [];
+ }
+};
+exports.getStream = getStream;
diff --git a/dist/tokyoInsider/catalog.js b/dist/tokyoInsider/catalog.js
index 1ffc621..9d02423 100644
--- a/dist/tokyoInsider/catalog.js
+++ b/dist/tokyoInsider/catalog.js
@@ -1,14 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-exports.tokyoGenresList = exports.tokyoCatalogList = void 0;
-exports.tokyoCatalogList = [
+exports.genres = exports.catalog = void 0;
+exports.catalog = [
{
- title: 'Top Anime',
- filter: 'anime/search?r=5',
+ title: "Top Anime",
+ filter: "anime/search?r=5",
},
{
- title: 'Popular Anime',
- filter: 'anime/',
+ title: "Popular Anime",
+ filter: "anime/",
},
];
-exports.tokyoGenresList = [];
+exports.genres = [];
diff --git a/dist/tokyoInsider/meta.js b/dist/tokyoInsider/meta.js
new file mode 100644
index 0000000..6720ce6
--- /dev/null
+++ b/dist/tokyoInsider/meta.js
@@ -0,0 +1,60 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.getMeta = void 0;
+const getMeta = async function ({ link, providerContext, }) {
+ try {
+ const { cheerio } = providerContext;
+ const url = link;
+ const res = await fetch(url);
+ const data = await res.text();
+ const $ = cheerio.load(data);
+ const meta = {
+ title: $('.c_h2:contains("Title(s):")')
+ .text()
+ .replace("Title(s):", "")
+ .trim()
+ .split("\n")[0],
+ synopsis: $('.c_h2b:contains("Summary:"),.c_h2:contains("Summary:")')
+ .text()
+ .replace("Summary:", "")
+ .trim(),
+ image: $(".a_img").attr("src") || "",
+ imdbId: "",
+ type: "series",
+ };
+ const episodesList = [];
+ $(".episode").map((i, element) => {
+ const link = "https://www.tokyoinsider.com" + $(element).find("a").attr("href") ||
+ $(".download-link").attr("href");
+ let title = $(element).find("a").find("em").text() +
+ " " +
+ $(element).find("a").find("strong").text();
+ if (!title.trim()) {
+ title = $(".download-link").text();
+ }
+ if (link && title.trim()) {
+ episodesList.push({ title, link });
+ }
+ });
+ return {
+ ...meta,
+ linkList: [
+ {
+ title: meta.title,
+ directLinks: episodesList,
+ },
+ ],
+ };
+ }
+ catch (err) {
+ return {
+ title: "",
+ synopsis: "",
+ image: "",
+ imdbId: "",
+ type: "series",
+ linkList: [],
+ };
+ }
+};
+exports.getMeta = getMeta;
diff --git a/dist/tokyoInsider/posts.js b/dist/tokyoInsider/posts.js
new file mode 100644
index 0000000..9bfea14
--- /dev/null
+++ b/dist/tokyoInsider/posts.js
@@ -0,0 +1,50 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.getSearchPosts = exports.getPosts = void 0;
+const getPosts = async function ({ filter, page,
+// providerValue,
+signal, providerContext, }) {
+ const { getBaseUrl, axios, cheerio } = providerContext;
+ const baseURL = await getBaseUrl("tokyoinsider");
+ const start = page < 2 ? 0 : (page - 1) * 20;
+ const url = `${baseURL}/${filter}&start=${start}`;
+ return posts({ baseURL, url, signal, axios, cheerio });
+};
+exports.getPosts = getPosts;
+const getSearchPosts = async function ({ searchQuery, page,
+// providerValue,
+signal, providerContext, }) {
+ const { getBaseUrl, axios, cheerio } = providerContext;
+ const baseURL = await getBaseUrl("tokyoinsider");
+ const start = page < 2 ? 0 : (page - 1) * 20;
+ const url = `${baseURL}/anime/search?k=${searchQuery}&start=${start}`;
+ return posts({ baseURL, url, signal, axios, cheerio });
+};
+exports.getSearchPosts = getSearchPosts;
+async function posts({ baseURL, url, signal, axios, cheerio, }) {
+ try {
+ const res = await axios.get(url, { signal });
+ const data = res.data;
+ const $ = cheerio.load(data);
+ const catalog = [];
+ $('td.c_h2[width="40"]').map((i, element) => {
+ const image = $(element)
+ .find(".a_img")
+ .attr("src")
+ ?.replace("small", "default");
+ const title = $(element).find("a").attr("title");
+ const link = baseURL + $(element).find("a").attr("href");
+ if (title && link && image) {
+ catalog.push({
+ title: title,
+ link: link,
+ image: image,
+ });
+ }
+ });
+ return catalog;
+ }
+ catch (err) {
+ return [];
+ }
+}
diff --git a/dist/tokyoInsider/stream.js b/dist/tokyoInsider/stream.js
new file mode 100644
index 0000000..09a61d6
--- /dev/null
+++ b/dist/tokyoInsider/stream.js
@@ -0,0 +1,30 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.getStream = void 0;
+const getStream = async function ({ link, providerContext, }) {
+ try {
+ const { cheerio } = providerContext;
+ const url = link;
+ const res = await fetch(url);
+ const data = await res.text();
+ const $ = cheerio.load(data);
+ const streamLinks = [];
+ $(".c_h1,.c_h2").map((i, element) => {
+ $(element).find("span").remove();
+ const title = $(element).find("a").text() || "";
+ const link = $(element).find("a").attr("href") || "";
+ if (title && link.includes("media")) {
+ streamLinks.push({
+ server: title,
+ link,
+ type: link.split(".").pop() || "mkv",
+ });
+ }
+ });
+ return streamLinks;
+ }
+ catch (err) {
+ return [];
+ }
+};
+exports.getStream = getStream;
diff --git a/dist/topmovies/catalog.js b/dist/topmovies/catalog.js
new file mode 100644
index 0000000..845bab8
--- /dev/null
+++ b/dist/topmovies/catalog.js
@@ -0,0 +1,87 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.genres = exports.catalog = void 0;
+exports.catalog = [
+ {
+ title: "Latest",
+ filter: "",
+ },
+ {
+ title: "Netflix",
+ filter: "/web-series/tv-shows-by-network/netflix",
+ },
+ {
+ title: "Hotstar",
+ filter: "/web-series/tv-shows-by-network/hotstar",
+ },
+ {
+ title: "Amazon Prime",
+ filter: "/web-series/tv-shows-by-network/amazon-prime-video",
+ },
+];
+exports.genres = [
+ {
+ title: "Apple TV+",
+ filter: "/ott/apple-tv",
+ },
+ {
+ title: "Disney+",
+ filter: "/ott/disney-plus",
+ },
+ {
+ title: "Hulu",
+ filter: "/ott/hulu",
+ },
+ {
+ title: "Crunchyroll",
+ filter: "/ott/crunchyroll",
+ },
+ {
+ title: "Action",
+ filter: "/movies-by-genre/action/",
+ },
+ {
+ title: "Adventure",
+ filter: "/movies-by-genre/adventure/",
+ },
+ {
+ title: "Animation",
+ filter: "/movies-by-genre/animated/",
+ },
+ {
+ title: "Comedy",
+ filter: "/movies-by-genre/comedy/",
+ },
+ {
+ title: "Crime",
+ filter: "/movies-by-genre/crime/",
+ },
+ {
+ title: "Documentary",
+ filter: "/movies-by-genre/documentary/",
+ },
+ {
+ title: "Fantasy",
+ filter: "/movies-by-genre/fantasy/",
+ },
+ {
+ title: "Horror",
+ filter: "/movies-by-genre/horror/",
+ },
+ {
+ title: "Mystery",
+ filter: "/movies-by-genre/mystery/",
+ },
+ {
+ title: "Romance",
+ filter: "/movies-by-genre/romance/",
+ },
+ {
+ title: "Thriller",
+ filter: "/movies-by-genre/thriller/",
+ },
+ {
+ title: "Sci-Fi",
+ filter: "/movies-by-genre/sci-fi/",
+ },
+];
diff --git a/dist/topmovies/episodes.js b/dist/topmovies/episodes.js
new file mode 100644
index 0000000..b1236e3
--- /dev/null
+++ b/dist/topmovies/episodes.js
@@ -0,0 +1,49 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.getEpisodes = void 0;
+const getEpisodes = async function ({ url, providerContext, }) {
+ const { axios, cheerio } = providerContext;
+ try {
+ if (url.includes("url=")) {
+ url = atob(url.split("url=")[1]);
+ }
+ const res = await axios.get(url);
+ const html = res.data;
+ let $ = cheerio.load(html);
+ if (url.includes("url=")) {
+ const newUrl = $("meta[http-equiv='refresh']")
+ .attr("content")
+ ?.split("url=")[1];
+ const res2 = await axios.get(newUrl || url);
+ const html2 = res2.data;
+ $ = cheerio.load(html2);
+ }
+ const episodeLinks = [];
+ $("h3,h4").map((i, element) => {
+ const seriesTitle = $(element).text();
+ const episodesLink = $(element).find("a").attr("href");
+ if (episodesLink && episodesLink !== "#") {
+ episodeLinks.push({
+ title: seriesTitle.trim() || "No title found",
+ link: episodesLink || "",
+ });
+ }
+ });
+ $("a.maxbutton").map((i, element) => {
+ const seriesTitle = $(element).children("span").text();
+ const episodesLink = $(element).attr("href");
+ if (episodesLink && episodesLink !== "#") {
+ episodeLinks.push({
+ title: seriesTitle.trim() || "No title found",
+ link: episodesLink || "",
+ });
+ }
+ });
+ return episodeLinks;
+ }
+ catch (err) {
+ console.error(err);
+ return [];
+ }
+};
+exports.getEpisodes = getEpisodes;
diff --git a/dist/topmovies/meta.js b/dist/topmovies/meta.js
new file mode 100644
index 0000000..a2c4c23
--- /dev/null
+++ b/dist/topmovies/meta.js
@@ -0,0 +1,62 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.getMeta = void 0;
+const getMeta = async function ({ link, providerContext, }) {
+ try {
+ const { axios, cheerio } = providerContext;
+ const url = link;
+ const res = await axios.get(url);
+ const data = res.data;
+ const $ = cheerio.load(data);
+ const meta = {
+ title: $(".imdbwp__title").text(),
+ synopsis: $(".imdbwp__teaser").text(),
+ image: $(".imdbwp__thumb").find("img").attr("src") || "",
+ imdbId: $(".imdbwp__link").attr("href")?.split("/")[4] || "",
+ type: $(".thecontent").text().toLocaleLowerCase().includes("season")
+ ? "series"
+ : "movie",
+ };
+ const links = [];
+ $("h3,h4").map((i, element) => {
+ const seriesTitle = $(element).text();
+ // const batchZipLink = $(element)
+ // .next("p")
+ // .find(".maxbutton-batch-zip,.maxbutton-zip-download")
+ // .attr("href");
+ const episodesLink = $(element)
+ .next("p")
+ .find(".maxbutton-episode-links,.maxbutton-g-drive,.maxbutton-af-download")
+ .attr("href");
+ const movieLink = $(element)
+ .next("p")
+ .find(".maxbutton-download-links")
+ .attr("href");
+ if (movieLink ||
+ (episodesLink && episodesLink !== "javascript:void(0);")) {
+ links.push({
+ title: seriesTitle.replace("Download ", "").trim() || "Download",
+ episodesLink: episodesLink || "",
+ directLinks: movieLink
+ ? [{ link: movieLink, title: "Movie", type: "movie" }]
+ : [],
+ quality: seriesTitle?.match(/\d+p\b/)?.[0] || "",
+ });
+ }
+ });
+ // console.log('mod meta', links);
+ return { ...meta, linkList: links };
+ }
+ catch (err) {
+ console.error(err);
+ return {
+ title: "",
+ synopsis: "",
+ image: "",
+ imdbId: "",
+ type: "movie",
+ linkList: [],
+ };
+ }
+};
+exports.getMeta = getMeta;
diff --git a/dist/topmovies/posts.js b/dist/topmovies/posts.js
new file mode 100644
index 0000000..b5e989b
--- /dev/null
+++ b/dist/topmovies/posts.js
@@ -0,0 +1,64 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.getSearchPosts = exports.getPosts = void 0;
+const headers = {
+ Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
+ "Cache-Control": "no-store",
+ "Accept-Language": "en-US,en;q=0.9",
+ DNT: "1",
+ "sec-ch-ua": '"Not_A Brand";v="8", "Chromium";v="120", "Microsoft Edge";v="120"',
+ "sec-ch-ua-mobile": "?0",
+ "sec-ch-ua-platform": '"Windows"',
+ "Sec-Fetch-Dest": "document",
+ "Sec-Fetch-Mode": "navigate",
+ Cookie: "popads_user_id=6ba8fe60a481387a3249f05aa058822d",
+ "Sec-Fetch-Site": "none",
+ "Sec-Fetch-User": "?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",
+};
+const getPosts = async function ({ filter, page, signal, providerContext, }) {
+ const { getBaseUrl } = providerContext;
+ const baseUrl = await getBaseUrl("Topmovies");
+ const url = `${baseUrl + filter}/page/${page}/`;
+ return posts(url, signal, providerContext);
+};
+exports.getPosts = getPosts;
+const getSearchPosts = async function ({ searchQuery, page, signal, providerContext, }) {
+ const { getBaseUrl } = providerContext;
+ const baseUrl = await getBaseUrl("Topmovies");
+ const url = `${baseUrl}/search/${searchQuery}/page/${page}/`;
+ return posts(url, signal, providerContext);
+};
+exports.getSearchPosts = getSearchPosts;
+async function posts(url, signal, providerContext) {
+ try {
+ const { axios, cheerio } = providerContext;
+ const res = await axios.get(url, { headers, signal });
+ const data = res.data;
+ const $ = cheerio.load(data);
+ const catalog = [];
+ $(".post-cards")
+ .find("article")
+ .map((i, element) => {
+ const title = $(element).find("a").attr("title");
+ const link = $(element).find("a").attr("href");
+ const image = $(element).find("img").attr("data-src") ||
+ $(element).find("img").attr("src") ||
+ "";
+ if (title && link) {
+ catalog.push({
+ title: title.replace("Download", "").trim(),
+ link: link,
+ image: image,
+ });
+ }
+ });
+ // console.log(catalog);
+ return catalog;
+ }
+ catch (err) {
+ console.error("mod error ", err);
+ return [];
+ }
+}
diff --git a/dist/topmovies/stream.js b/dist/topmovies/stream.js
new file mode 100644
index 0000000..f7076c2
--- /dev/null
+++ b/dist/topmovies/stream.js
@@ -0,0 +1,256 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.getStream = void 0;
+const headers = {
+ Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
+ "Cache-Control": "no-store",
+ "Accept-Language": "en-US,en;q=0.9",
+ DNT: "1",
+ "sec-ch-ua": '"Not_A Brand";v="8", "Chromium";v="120", "Microsoft Edge";v="120"',
+ "sec-ch-ua-mobile": "?0",
+ "sec-ch-ua-platform": '"Windows"',
+ "Sec-Fetch-Dest": "document",
+ "Sec-Fetch-Mode": "navigate",
+ Cookie: "popads_user_id=6ba8fe60a481387a3249f05aa058822d",
+ "Sec-Fetch-Site": "none",
+ "Sec-Fetch-User": "?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",
+};
+const getStream = async function ({ link: url, type, providerContext, }) {
+ const { axios, cheerio } = providerContext;
+ try {
+ const modGetEpisodeLinks = async function ({ url, providerContext, }) {
+ const { axios, cheerio } = providerContext;
+ try {
+ if (url.includes("url=")) {
+ url = atob(url.split("url=")[1]);
+ }
+ const res = await axios.get(url);
+ const html = res.data;
+ let $ = cheerio.load(html);
+ if (url.includes("url=")) {
+ const newUrl = $("meta[http-equiv='refresh']")
+ .attr("content")
+ ?.split("url=")[1];
+ const res2 = await axios.get(newUrl || url);
+ const html2 = res2.data;
+ $ = cheerio.load(html2);
+ }
+ const episodeLinks = [];
+ $("h3,h4").map((i, element) => {
+ const seriesTitle = $(element).text();
+ const episodesLink = $(element).find("a").attr("href");
+ if (episodesLink && episodesLink !== "#") {
+ episodeLinks.push({
+ title: seriesTitle.trim() || "No title found",
+ link: episodesLink || "",
+ });
+ }
+ });
+ $("a.maxbutton").map((i, element) => {
+ const seriesTitle = $(element).children("span").text();
+ const episodesLink = $(element).attr("href");
+ if (episodesLink && episodesLink !== "#") {
+ episodeLinks.push({
+ title: seriesTitle.trim() || "No title found",
+ link: episodesLink || "",
+ });
+ }
+ });
+ return episodeLinks;
+ }
+ catch (err) {
+ console.error(err);
+ return [];
+ }
+ };
+ console.log("modGetStream", type, url);
+ if (type === "movie") {
+ const servers = await modGetEpisodeLinks({ url, providerContext });
+ url = servers[0].link || url;
+ }
+ let downloadLink = await modExtractor(url, providerContext);
+ // console.log(downloadLink.data);
+ const ddl = downloadLink?.data?.match(/content="0;url=(.*?)"/)?.[1] || url;
+ // console.log('ddl', url);
+ // console.log(ddl);
+ // console.log(ddl);
+ const servers = [];
+ const driveLink = await isDriveLink(ddl);
+ const driveRes = await axios.get(driveLink, { headers });
+ const driveHtml = driveRes.data;
+ const $drive = cheerio.load(driveHtml);
+ try {
+ const resumeBot = $drive(".btn.btn-light").attr("href") || "";
+ const resumeBotRes = await axios.get(resumeBot, { headers });
+ const resumeBotToken = resumeBotRes.data.match(/formData\.append\('token', '([a-f0-9]+)'\)/)[1];
+ const resumeBotBody = new FormData();
+ resumeBotBody.append("token", resumeBotToken);
+ const resumeBotPath = resumeBotRes.data.match(/fetch\('\/download\?id=([a-zA-Z0-9\/+]+)'/)[1];
+ const resumeBotBaseUrl = resumeBot.split("/download")[0];
+ // console.log(
+ // 'resumeBotPath',
+ // resumeBotBaseUrl + '/download?id=' + resumeBotPath,
+ // );
+ // console.log('resumeBotBody', resumeBotToken);
+ const resumeBotDownload = await fetch(resumeBotBaseUrl + "/download?id=" + resumeBotPath, {
+ method: "POST",
+ body: resumeBotBody,
+ headers: {
+ Referer: resumeBot,
+ Cookie: "PHPSESSID=7e9658ce7c805dab5bbcea9046f7f308",
+ },
+ });
+ const resumeBotDownloadData = await resumeBotDownload.json();
+ console.log("resumeBotDownloadData", resumeBotDownloadData.url);
+ servers.push({
+ server: "ResumeBot",
+ link: resumeBotDownloadData.url,
+ type: "mkv",
+ });
+ }
+ catch (err) {
+ console.log("ResumeBot link not found", err);
+ }
+ // CF workers type 1
+ try {
+ const cfWorkersLink = driveLink.replace("/file", "/wfile") + "?type=1";
+ const cfWorkersRes = await axios.get(cfWorkersLink, { headers });
+ const cfWorkersHtml = cfWorkersRes.data;
+ const $cfWorkers = cheerio.load(cfWorkersHtml);
+ const cfWorkersStream = $cfWorkers(".btn-success");
+ cfWorkersStream.each((i, el) => {
+ const link = el.attribs?.href;
+ if (link) {
+ servers.push({
+ server: "Cf Worker 1." + i,
+ link: link,
+ type: "mkv",
+ });
+ }
+ });
+ }
+ catch (err) {
+ console.log("CF workers link not found", err);
+ }
+ // CF workers type 2
+ try {
+ const cfWorkersLink = driveLink.replace("/file", "/wfile") + "?type=2";
+ const cfWorkersRes = await axios.get(cfWorkersLink, { headers });
+ const cfWorkersHtml = cfWorkersRes.data;
+ const $cfWorkers = cheerio.load(cfWorkersHtml);
+ const cfWorkersStream = $cfWorkers(".btn-success");
+ cfWorkersStream.each((i, el) => {
+ const link = el.attribs?.href;
+ if (link) {
+ servers.push({
+ server: "Cf Worker 2." + i,
+ link: link,
+ type: "mkv",
+ });
+ }
+ });
+ }
+ catch (err) {
+ console.log("CF workers link not found", err);
+ }
+ // gdrive
+ //instant link
+ try {
+ const seed = $drive(".btn-danger").attr("href") || "";
+ const instantToken = seed.split("=")[1];
+ // console.log('InstantToken', instantToken);
+ const InstantFromData = new FormData();
+ InstantFromData.append("keys", instantToken);
+ const videoSeedUrl = seed.split("/").slice(0, 3).join("/") + "/api";
+ // console.log('videoSeedUrl', videoSeedUrl);
+ const instantLinkRes = await fetch(videoSeedUrl, {
+ method: "POST",
+ body: InstantFromData,
+ headers: {
+ "x-token": videoSeedUrl,
+ },
+ });
+ const instantLinkData = await instantLinkRes.json();
+ // console.log('instantLinkData', instantLinkData);
+ if (instantLinkData.error === false) {
+ const instantLink = instantLinkData.url;
+ servers.push({
+ server: "Gdrive-Instant",
+ link: instantLink,
+ type: "mkv",
+ });
+ }
+ else {
+ console.log("Instant link not found", instantLinkData);
+ }
+ }
+ catch (err) {
+ console.log("Instant link not found", err);
+ }
+ return servers;
+ }
+ catch (err) {
+ console.log("getStream error", err);
+ return [];
+ }
+};
+exports.getStream = getStream;
+const isDriveLink = async (ddl) => {
+ if (ddl.includes("drive")) {
+ const driveLeach = await fetch(ddl);
+ const driveLeachData = await driveLeach.text();
+ const pathMatch = driveLeachData.match(/window\.location\.replace\("([^"]+)"\)/);
+ const path = pathMatch?.[1];
+ const mainUrl = ddl.split("/")[2];
+ console.log(`driveUrl = https://${mainUrl}${path}`);
+ return `https://${mainUrl}${path}`;
+ }
+ else {
+ return ddl;
+ }
+};
+async function modExtractor(url, providerContext) {
+ const { axios, cheerio } = providerContext;
+ try {
+ const wpHttp = url.split("sid=")[1];
+ var bodyFormData0 = new FormData();
+ bodyFormData0.append("_wp_http", wpHttp);
+ const res = await fetch(url.split("?")[0], {
+ method: "POST",
+ body: bodyFormData0,
+ });
+ const data = await res.text();
+ // console.log('', data);
+ const html = data;
+ const $ = cheerio.load(html);
+ // find input with name="_wp_http2"
+ const wpHttp2 = $("input").attr("name", "_wp_http2").val();
+ // console.log('wpHttp2', wpHttp2);
+ // form data
+ var bodyFormData = new FormData();
+ bodyFormData.append("_wp_http2", wpHttp2);
+ const formUrl1 = $("form").attr("action");
+ const formUrl = formUrl1 || url.split("?")[0];
+ const res2 = await fetch(formUrl, {
+ method: "POST",
+ body: bodyFormData,
+ });
+ const html2 = await res2.text();
+ const link = html2.match(/setAttribute\("href",\s*"(.*?)"/)[1];
+ console.log(link);
+ const cookie = link.split("=")[1];
+ console.log("cookie", cookie);
+ const downloadLink = await axios.get(link, {
+ headers: {
+ Referer: formUrl,
+ Cookie: `${cookie}=${wpHttp2}`,
+ },
+ });
+ return downloadLink;
+ }
+ catch (err) {
+ console.log("modGetStream error", err);
+ }
+}
diff --git a/dist/uhd/catalog.js b/dist/uhd/catalog.js
new file mode 100644
index 0000000..1d35fc2
--- /dev/null
+++ b/dist/uhd/catalog.js
@@ -0,0 +1,39 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.genres = exports.catalog = void 0;
+exports.catalog = [
+ {
+ title: "Latest",
+ filter: "",
+ },
+ {
+ title: "Web Series",
+ filter: "/web-series",
+ },
+ {
+ title: "Movies",
+ filter: "/movies",
+ },
+ {
+ title: "4K HDR",
+ filter: "/4k-hdr",
+ },
+];
+exports.genres = [
+ {
+ title: "4K HEVC",
+ filter: "/2160p-hevc",
+ },
+ {
+ title: "HD 10bit",
+ filter: "/1080p-10bit",
+ },
+ {
+ title: "English Movies",
+ filter: "/movies/english-movies",
+ },
+ {
+ title: "Dual Audio",
+ filter: "/movies/dual-audio-movies",
+ },
+];
diff --git a/dist/uhd/meta.js b/dist/uhd/meta.js
new file mode 100644
index 0000000..6d2416d
--- /dev/null
+++ b/dist/uhd/meta.js
@@ -0,0 +1,108 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.getMeta = void 0;
+const headers = {
+ Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
+ "Cache-Control": "no-store",
+ "Accept-Language": "en-US,en;q=0.9",
+ DNT: "1",
+ "sec-ch-ua": '"Not_A Brand";v="8", "Chromium";v="120", "Microsoft Edge";v="120"',
+ "sec-ch-ua-mobile": "?0",
+ "sec-ch-ua-platform": '"Windows"',
+ "Sec-Fetch-Dest": "document",
+ "Sec-Fetch-Mode": "navigate",
+ "Sec-Fetch-Site": "none",
+ "Sec-Fetch-User": "?1",
+ "Upgrade-Insecure-Requests": "1",
+ "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, }) {
+ try {
+ const { axios, cheerio } = providerContext;
+ const url = link;
+ const res = await axios.get(url, { headers });
+ const html = await res.data;
+ const $ = cheerio.load(html);
+ const title = $("h2:first").text() || "";
+ const image = $("h2").siblings().find("img").attr("src") || "";
+ // const trailer = $('iframe').attr('src') || '';
+ // console.log({ title, image, trailer });
+ // Links
+ const episodes = [];
+ // new structure
+ $(".mks_separator").each((index, element) => {
+ $(element)
+ .nextUntil(".mks_separator")
+ .each((index, element) => {
+ const title = $(element).text();
+ const episodesList = [];
+ $(element)
+ .next("p")
+ .find("a")
+ .each((index, element) => {
+ const title = $(element).text();
+ const link = $(element).attr("href");
+ if (title && link && !title.toLocaleLowerCase().includes("zip")) {
+ episodesList.push({ title, link });
+ // console.log({ title, link });
+ }
+ });
+ if (title && episodesList.length > 0) {
+ episodes.push({
+ title,
+ directLinks: episodesList,
+ });
+ }
+ });
+ });
+ // old structure
+ $("hr").each((index, element) => {
+ $(element)
+ .nextUntil("hr")
+ .each((index, element) => {
+ const title = $(element).text();
+ const episodesList = [];
+ $(element)
+ .next("p")
+ .find("a")
+ .each((index, element) => {
+ const title = $(element).text();
+ const link = $(element).attr("href");
+ if (title && link && !title.toLocaleLowerCase().includes("zip")) {
+ episodesList.push({ title, link });
+ // console.log({ title, link });
+ }
+ });
+ if (title && episodesList.length > 0) {
+ episodes.push({
+ title,
+ directLinks: episodesList,
+ });
+ }
+ });
+ });
+ // console.log(episodes);
+ return {
+ title: title.match(/^Download\s+([^(\[]+)/i)
+ ? title?.match(/^Download\s+([^(\[]+)/i)?.[1] || ""
+ : title.replace("Download", "") || "",
+ image,
+ imdbId: "",
+ synopsis: title,
+ type: "",
+ linkList: episodes,
+ };
+ }
+ catch (error) {
+ console.error(error);
+ return {
+ title: "",
+ image: "",
+ imdbId: "",
+ synopsis: "",
+ linkList: [],
+ type: "uhd",
+ };
+ }
+};
+exports.getMeta = getMeta;
diff --git a/dist/uhd/posts.js b/dist/uhd/posts.js
new file mode 100644
index 0000000..e4c39af
--- /dev/null
+++ b/dist/uhd/posts.js
@@ -0,0 +1,65 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.getSearchPosts = exports.getPosts = void 0;
+const headers = {
+ Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
+ "Cache-Control": "no-store",
+ "Accept-Language": "en-US,en;q=0.9",
+ DNT: "1",
+ "sec-ch-ua": '"Not_A Brand";v="8", "Chromium";v="120", "Microsoft Edge";v="120"',
+ "sec-ch-ua-mobile": "?0",
+ "sec-ch-ua-platform": '"Windows"',
+ "Sec-Fetch-Dest": "document",
+ "Sec-Fetch-Mode": "navigate",
+ "Sec-Fetch-Site": "none",
+ "Sec-Fetch-User": "?1",
+ "Upgrade-Insecure-Requests": "1",
+ "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 { getBaseUrl } = providerContext;
+ const baseUrl = await getBaseUrl("UhdMovies");
+ const url = page === 1 ? `${baseUrl}/${filter}/` : `${baseUrl + filter}/page/${page}/`;
+ console.log("url", url);
+ return posts(baseUrl, url, signal, providerContext);
+};
+exports.getPosts = getPosts;
+const getSearchPosts = async ({ searchQuery, page,
+// providerValue,
+signal, providerContext, }) => {
+ const { getBaseUrl } = providerContext;
+ const baseUrl = await getBaseUrl("UhdMovies");
+ const url = `${baseUrl}/search/${searchQuery}/page/${page}/`;
+ return posts(baseUrl, url, signal, providerContext);
+};
+exports.getSearchPosts = getSearchPosts;
+async function posts(baseURL, url, signal, providerContext) {
+ try {
+ const { axios, cheerio } = providerContext;
+ const res = await axios.get(url, { headers, signal });
+ const html = res.data;
+ const $ = cheerio.load(html);
+ const uhdCatalog = [];
+ $(".gridlove-posts")
+ .find(".layout-masonry")
+ .each((index, element) => {
+ const title = $(element).find("a").attr("title");
+ const link = $(element).find("a").attr("href");
+ const image = $(element).find("a").find("img").attr("src");
+ if (title && link && image) {
+ uhdCatalog.push({
+ title: title.replace("Download", "").trim(),
+ link: link,
+ image: image,
+ });
+ }
+ });
+ return uhdCatalog;
+ }
+ catch (err) {
+ console.error("uhd error ", err);
+ return [];
+ }
+}
diff --git a/dist/uhd/stream.js b/dist/uhd/stream.js
new file mode 100644
index 0000000..6281ff9
--- /dev/null
+++ b/dist/uhd/stream.js
@@ -0,0 +1,192 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.getStream = void 0;
+const headers = {
+ Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
+ "Cache-Control": "no-store",
+ "Accept-Language": "en-US,en;q=0.9",
+ DNT: "1",
+ "sec-ch-ua": '"Not_A Brand";v="8", "Chromium";v="120", "Microsoft Edge";v="120"',
+ "sec-ch-ua-mobile": "?0",
+ "sec-ch-ua-platform": '"Windows"',
+ "Sec-Fetch-Dest": "document",
+ "Sec-Fetch-Mode": "navigate",
+ "Sec-Fetch-Site": "none",
+ "Sec-Fetch-User": "?1",
+ "Upgrade-Insecure-Requests": "1",
+ "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, }) => {
+ try {
+ const { axios, cheerio } = providerContext;
+ let downloadLink = await modExtractor(url, providerContext);
+ // console.log(downloadLink.data);
+ const ddl = downloadLink?.data?.match(/content="0;url=(.*?)"/)?.[1] || url;
+ console.log("ddl", ddl);
+ // console.log(ddl);
+ const driveLink = await isDriveLink(ddl);
+ const ServerLinks = [];
+ const driveRes = await axios.get(driveLink, { headers });
+ const driveHtml = driveRes.data;
+ const $drive = cheerio.load(driveHtml);
+ //instant link
+ try {
+ const seed = $drive(".btn-danger").attr("href") || "";
+ const instantToken = seed.split("=")[1];
+ // console.log('InstantToken', instantToken);
+ const InstantFromData = new FormData();
+ InstantFromData.append("keys", instantToken);
+ const videoSeedUrl = seed.split("/").slice(0, 3).join("/") + "/api";
+ // console.log('videoSeedUrl', videoSeedUrl);
+ const instantLinkRes = await fetch(videoSeedUrl, {
+ method: "POST",
+ body: InstantFromData,
+ headers: {
+ "x-token": videoSeedUrl,
+ },
+ });
+ const instantLinkData = await instantLinkRes.json();
+ // console.log('instantLinkData', instantLinkData);
+ if (instantLinkData.error === false) {
+ const instantLink = instantLinkData.url;
+ ServerLinks.push({
+ server: "Gdrive-Instant",
+ link: instantLink,
+ type: "mkv",
+ });
+ }
+ else {
+ console.log("Instant link not found", instantLinkData);
+ }
+ }
+ catch (err) {
+ console.log("Instant link not found", err);
+ }
+ // resume link
+ try {
+ const resumeDrive = driveLink.replace("/file", "/zfile");
+ // console.log('resumeDrive', resumeDrive);
+ const resumeDriveRes = await axios.get(resumeDrive, { headers });
+ const resumeDriveHtml = resumeDriveRes.data;
+ const $resumeDrive = cheerio.load(resumeDriveHtml);
+ const resumeLink = $resumeDrive(".btn-success").attr("href");
+ // console.log('resumeLink', resumeLink);
+ if (resumeLink) {
+ ServerLinks.push({
+ server: "ResumeCloud",
+ link: resumeLink,
+ type: "mkv",
+ });
+ }
+ }
+ catch (err) {
+ console.log("Resume link not found");
+ }
+ // CF workers type 1
+ try {
+ const cfWorkersLink = driveLink.replace("/file", "/wfile") + "?type=1";
+ const cfWorkersRes = await axios.get(cfWorkersLink, { headers });
+ const cfWorkersHtml = cfWorkersRes.data;
+ const $cfWorkers = cheerio.load(cfWorkersHtml);
+ const cfWorkersStream = $cfWorkers(".btn-success");
+ cfWorkersStream.each((i, el) => {
+ const link = el.attribs?.href;
+ if (link) {
+ ServerLinks.push({
+ server: "Cf Worker 1." + i,
+ link: link,
+ type: "mkv",
+ });
+ }
+ });
+ }
+ catch (err) {
+ console.log("CF workers link not found", err);
+ }
+ // CF workers type 2
+ try {
+ const cfWorkersLink = driveLink.replace("/file", "/wfile") + "?type=2";
+ const cfWorkersRes = await axios.get(cfWorkersLink, { headers });
+ const cfWorkersHtml = cfWorkersRes.data;
+ const $cfWorkers = cheerio.load(cfWorkersHtml);
+ const cfWorkersStream = $cfWorkers(".btn-success");
+ cfWorkersStream.each((i, el) => {
+ const link = el.attribs?.href;
+ if (link) {
+ ServerLinks.push({
+ server: "Cf Worker 2." + i,
+ link: link,
+ type: "mkv",
+ });
+ }
+ });
+ }
+ catch (err) {
+ console.log("CF workers link not found", err);
+ }
+ console.log("ServerLinks", ServerLinks);
+ return ServerLinks;
+ }
+ catch (err) {
+ console.log("getStream error", err);
+ return [];
+ }
+};
+exports.getStream = getStream;
+const isDriveLink = async (ddl) => {
+ if (ddl.includes("drive")) {
+ const driveLeach = await fetch(ddl);
+ const driveLeachData = await driveLeach.text();
+ const pathMatch = driveLeachData.match(/window\.location\.replace\("([^"]+)"\)/);
+ const path = pathMatch?.[1];
+ const mainUrl = ddl.split("/")[2];
+ console.log(`driveUrl = https://${mainUrl}${path}`);
+ return `https://${mainUrl}${path}`;
+ }
+ else {
+ return ddl;
+ }
+};
+async function modExtractor(url, providerContext) {
+ const { axios, cheerio } = providerContext;
+ try {
+ const wpHttp = url.split("sid=")[1];
+ var bodyFormData0 = new FormData();
+ bodyFormData0.append("_wp_http", wpHttp);
+ const res = await fetch(url.split("?")[0], {
+ method: "POST",
+ body: bodyFormData0,
+ });
+ const data = await res.text();
+ // console.log('', data);
+ const html = data;
+ const $ = cheerio.load(html);
+ // find input with name="_wp_http2"
+ const wpHttp2 = $("input").attr("name", "_wp_http2").val();
+ // console.log('wpHttp2', wpHttp2);
+ // form data
+ var bodyFormData = new FormData();
+ bodyFormData.append("_wp_http2", wpHttp2);
+ const formUrl1 = $("form").attr("action");
+ const formUrl = formUrl1 || url.split("?")[0];
+ const res2 = await fetch(formUrl, {
+ method: "POST",
+ body: bodyFormData,
+ });
+ const html2 = await res2.text();
+ const link = html2.match(/setAttribute\("href",\s*"(.*?)"/)[1];
+ console.log(link);
+ const cookie = link.split("=")[1];
+ console.log("cookie", cookie);
+ const downloadLink = await axios.get(link, {
+ headers: {
+ Referer: formUrl,
+ Cookie: `${cookie}=${wpHttp2}`,
+ },
+ });
+ return downloadLink;
+ }
+ catch (err) {
+ console.log("modGetStream error", err);
+ }
+}
diff --git a/dist/vadapav/catalog.js b/dist/vadapav/catalog.js
new file mode 100644
index 0000000..ea9cb23
--- /dev/null
+++ b/dist/vadapav/catalog.js
@@ -0,0 +1,18 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.genres = exports.catalog = void 0;
+exports.catalog = [
+ {
+ title: "Movies",
+ filter: "/608c853f-704e-48f0-b785-4ae1f48ea70d",
+ },
+ {
+ title: "Tv Shows",
+ filter: "/72983eef-a12f-4be4-99a7-e8f6afa568c1",
+ },
+ {
+ title: "Anime",
+ filter: "/36abf81c-1032-4fbf-9a55-347a05ce2ca3",
+ },
+];
+exports.genres = [];
diff --git a/dist/vadapav/episodes.js b/dist/vadapav/episodes.js
new file mode 100644
index 0000000..6c448a3
--- /dev/null
+++ b/dist/vadapav/episodes.js
@@ -0,0 +1,30 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.getEpisodes = void 0;
+const getEpisodes = async function ({ url, providerContext, }) {
+ const { axios, cheerio } = providerContext;
+ try {
+ const baseUrl = url?.split("/").slice(0, 3).join("/");
+ const res = await axios.get(url);
+ const html = res.data;
+ let $ = cheerio.load(html);
+ const episodeLinks = [];
+ $('.file-entry:not(:contains("Parent Directory"))').map((i, element) => {
+ const link = $(element).attr("href");
+ if (link &&
+ ($(element).text()?.includes(".mp4") ||
+ $(element).text()?.includes(".mkv"))) {
+ episodeLinks.push({
+ title: $(element).text()?.match(/E\d+/)?.[0]?.replace("E", "Episode ") ||
+ i + 1 + ". " + $(element).text()?.replace(".mkv", ""),
+ link: baseUrl + link,
+ });
+ }
+ });
+ return episodeLinks;
+ }
+ catch (err) {
+ return [];
+ }
+};
+exports.getEpisodes = getEpisodes;
diff --git a/dist/vadapav/meta.js b/dist/vadapav/meta.js
new file mode 100644
index 0000000..fbf10a6
--- /dev/null
+++ b/dist/vadapav/meta.js
@@ -0,0 +1,68 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.getMeta = void 0;
+const getMeta = async function ({ link, providerContext, }) {
+ try {
+ const { axios, cheerio } = providerContext;
+ const baseUrl = link?.split("/").slice(0, 3).join("/");
+ const url = link;
+ const res = await axios.get(url);
+ const data = res.data;
+ const $ = cheerio.load(data);
+ const title = $(".directory")
+ .children()
+ .first()
+ .text()
+ .trim()
+ ?.split("/")
+ .pop()
+ ?.trim() || "";
+ const links = [];
+ $('.directory-entry:not(:contains("Parent Directory"))').map((i, element) => {
+ const link = $(element).attr("href");
+ if (link) {
+ links.push({
+ episodesLink: baseUrl + link,
+ title: $(element).text(),
+ });
+ }
+ });
+ const directLinks = [];
+ $('.file-entry:not(:contains("Parent Directory"))').map((i, element) => {
+ const link = $(element).attr("href");
+ if (link &&
+ ($(element).text()?.includes(".mp4") ||
+ $(element).text()?.includes(".mkv"))) {
+ directLinks.push({
+ title: i + 1 + ". " + $(element).text(),
+ link: baseUrl + link,
+ });
+ }
+ });
+ if (directLinks.length > 0) {
+ links.push({
+ title: title + " DL",
+ directLinks: directLinks,
+ });
+ }
+ return {
+ title: title,
+ synopsis: "",
+ image: "",
+ imdbId: "",
+ type: "movie",
+ linkList: links,
+ };
+ }
+ catch (err) {
+ return {
+ title: "",
+ synopsis: "",
+ image: "",
+ imdbId: "",
+ type: "movie",
+ linkList: [],
+ };
+ }
+};
+exports.getMeta = getMeta;
diff --git a/dist/vadapav/posts.js b/dist/vadapav/posts.js
new file mode 100644
index 0000000..40be3b2
--- /dev/null
+++ b/dist/vadapav/posts.js
@@ -0,0 +1,56 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.getSearchPosts = exports.getPosts = void 0;
+const getPosts = async function ({ filter, page,
+// providerValue,
+signal, providerContext, }) {
+ const { getBaseUrl, axios, cheerio } = providerContext;
+ const baseUrl = await getBaseUrl("vadapav");
+ if (page > 1) {
+ return [];
+ }
+ const url = `${baseUrl + filter}`;
+ return posts({ baseUrl, url, signal, axios, cheerio });
+};
+exports.getPosts = getPosts;
+const getSearchPosts = async function ({ searchQuery, page,
+// providerValue,
+signal, providerContext, }) {
+ const { getBaseUrl, axios, cheerio } = providerContext;
+ const baseUrl = await getBaseUrl("vadapav");
+ if (page > 1) {
+ return [];
+ }
+ const url = `${baseUrl}/s/${searchQuery}`;
+ return posts({ baseUrl, url, signal, axios, cheerio });
+};
+exports.getSearchPosts = getSearchPosts;
+async function posts({
+// baseUrl,
+url, signal, axios, cheerio, }) {
+ try {
+ const res = await axios.get(url, { signal });
+ const data = res.data;
+ const $ = cheerio.load(data);
+ const catalog = [];
+ $('.directory-entry:not(:contains("Parent Directory"))').map((i, element) => {
+ const title = $(element).text();
+ const link = $(element).attr("href");
+ const imageTitle = title?.length > 30
+ ? title?.slice(0, 30)?.replace(/\./g, " ")
+ : 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`;
+ if (title && link) {
+ catalog.push({
+ title: title,
+ link: link,
+ image: image,
+ });
+ }
+ });
+ return catalog;
+ }
+ catch (err) {
+ return [];
+ }
+}
diff --git a/dist/vadapav/stream.js b/dist/vadapav/stream.js
new file mode 100644
index 0000000..df2dc37
--- /dev/null
+++ b/dist/vadapav/stream.js
@@ -0,0 +1,19 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.getStream = void 0;
+const getStream = async function ({ link: url, // type, // providerContext,
+ }) {
+ try {
+ const stream = [];
+ stream.push({
+ server: "vadapav",
+ link: url,
+ type: url?.split(".").pop() || "mkv",
+ });
+ return stream;
+ }
+ catch (err) {
+ return [];
+ }
+};
+exports.getStream = getStream;
diff --git a/dist/vega/catalog.js b/dist/vega/catalog.js
index 3d4dddb..e2575e6 100644
--- a/dist/vega/catalog.js
+++ b/dist/vega/catalog.js
@@ -1,103 +1,103 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-exports.genresList = exports.homeList = void 0;
-exports.homeList = [
+exports.genres = exports.catalog = void 0;
+exports.catalog = [
{
- title: 'New',
- filter: '',
+ title: "New",
+ filter: "",
},
{
- title: 'Netflix',
- filter: 'web-series/netflix',
+ title: "Netflix",
+ filter: "web-series/netflix",
},
{
- title: 'Amazon Prime',
- filter: 'web-series/amazon-prime-video',
+ title: "Amazon Prime",
+ filter: "web-series/amazon-prime-video",
},
{
- title: '4K Movies',
- filter: 'movies-by-quality/2160p',
+ title: "4K Movies",
+ filter: "movies-by-quality/2160p",
},
];
-exports.genresList = [
+exports.genres = [
{
- title: 'Action',
- filter: 'category/movies-by-genres/action',
+ title: "Action",
+ filter: "category/movies-by-genres/action",
},
{
- title: 'Adventure',
- filter: 'category/movies-by-genres/adventure',
+ title: "Adventure",
+ filter: "category/movies-by-genres/adventure",
},
{
- title: 'Animation',
- filter: 'category/movies-by-genres/animation',
+ title: "Animation",
+ filter: "category/movies-by-genres/animation",
},
{
- title: 'Biography',
- filter: 'category/movies-by-genres/biography',
+ title: "Biography",
+ filter: "category/movies-by-genres/biography",
},
{
- title: 'Comedy',
- filter: 'category/movies-by-genres/comedy',
+ title: "Comedy",
+ filter: "category/movies-by-genres/comedy",
},
{
- title: 'Crime',
- filter: 'category/movies-by-genres/crime',
+ title: "Crime",
+ filter: "category/movies-by-genres/crime",
},
{
- title: 'Documentary',
- filter: 'category/movies-by-genres/documentary',
+ title: "Documentary",
+ filter: "category/movies-by-genres/documentary",
},
{
- title: 'Drama',
- filter: 'category/movies-by-genres/drama',
+ title: "Drama",
+ filter: "category/movies-by-genres/drama",
},
{
- title: 'Family',
- filter: 'category/movies-by-genres/family',
+ title: "Family",
+ filter: "category/movies-by-genres/family",
},
{
- title: 'Fantasy',
- filter: 'category/movies-by-genres/fantasy',
+ title: "Fantasy",
+ filter: "category/movies-by-genres/fantasy",
},
{
- title: 'History',
- filter: 'category/movies-by-genres/history',
+ title: "History",
+ filter: "category/movies-by-genres/history",
},
{
- title: 'Horror',
- filter: 'category/movies-by-genres/horror',
+ title: "Horror",
+ filter: "category/movies-by-genres/horror",
},
{
- title: 'Music',
- filter: 'category/movies-by-genres/music',
+ title: "Music",
+ filter: "category/movies-by-genres/music",
},
{
- title: 'Mystery',
- filter: 'category/movies-by-genres/mystery',
+ title: "Mystery",
+ filter: "category/movies-by-genres/mystery",
},
{
- title: 'Romance',
- filter: 'category/movies-by-genres/romance',
+ title: "Romance",
+ filter: "category/movies-by-genres/romance",
},
{
- title: 'Sci-Fi',
- filter: 'category/movies-by-genres/sci-fi',
+ title: "Sci-Fi",
+ filter: "category/movies-by-genres/sci-fi",
},
{
- title: 'Sport',
- filter: 'category/movies-by-genres/sport',
+ title: "Sport",
+ filter: "category/movies-by-genres/sport",
},
{
- title: 'Thriller',
- filter: 'category/movies-by-genres/thriller',
+ title: "Thriller",
+ filter: "category/movies-by-genres/thriller",
},
{
- title: 'War',
- filter: 'category/movies-by-genres/war',
+ title: "War",
+ filter: "category/movies-by-genres/war",
},
{
- title: 'Western',
- filter: 'category/movies-by-genres/western',
+ title: "Western",
+ filter: "category/movies-by-genres/western",
},
];
diff --git a/dist/vega/episodes.js b/dist/vega/episodes.js
new file mode 100644
index 0000000..7d19743
--- /dev/null
+++ b/dist/vega/episodes.js
@@ -0,0 +1,34 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.getEpisodes = void 0;
+const getEpisodes = async function ({ url, providerContext, }) {
+ const { axios, cheerio, commonHeaders: headers } = providerContext;
+ console.log("getEpisodeLinks", url);
+ try {
+ const res = await axios.get(url, { headers });
+ const $ = cheerio.load(res.data);
+ const container = $(".entry-content,.entry-inner");
+ $(".unili-content,.code-block-1").remove();
+ const episodes = [];
+ container.find("h4").each((index, element) => {
+ const el = $(element);
+ const title = el.text().replaceAll("-", "").replaceAll(":", "");
+ const link = el
+ .next("p")
+ .find('.btn-outline[style="background:linear-gradient(135deg,#ed0b0b,#f2d152); color: white;"]')
+ .parent()
+ .attr("href");
+ if (title && link) {
+ episodes.push({ title, link });
+ }
+ });
+ // console.log(episodes);
+ return episodes;
+ }
+ catch (err) {
+ console.log("getEpisodeLinks error: ");
+ // console.error(err);
+ return [];
+ }
+};
+exports.getEpisodes = getEpisodes;
diff --git a/dist/vega/meta.js b/dist/vega/meta.js
new file mode 100644
index 0000000..0abf761
--- /dev/null
+++ b/dist/vega/meta.js
@@ -0,0 +1,137 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.getMeta = void 0;
+const headers = {
+ Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
+ "Cache-Control": "no-store",
+ "Accept-Language": "en-US,en;q=0.9",
+ DNT: "1",
+ "sec-ch-ua": '"Not_A Brand";v="8", "Chromium";v="120", "Microsoft Edge";v="120"',
+ "sec-ch-ua-mobile": "?0",
+ "sec-ch-ua-platform": '"Windows"',
+ "Sec-Fetch-Dest": "document",
+ "Sec-Fetch-Mode": "navigate",
+ "Sec-Fetch-Site": "none",
+ "Sec-Fetch-User": "?1",
+ Cookie: "_lscache_vary=62abf8b96599676eb8ec211cffaeb8ff; ext_name=ojplmecpdpgccookcobabopnaifgidhf; cf_clearance=n4Y1XTKZ5TfIMBNQuAXzerwKpx0U35KoOm3imfT0GpU-1732097818-1.2.1.1-ZeAnEu.8D9TSZHYDoj7vwo1A1rpdKl304ZpaBn_QbAQOr211JFAb7.JRQU3EL2eIy1Dfl8HhYvH7_259.22lUz8gbchHcQ8hvfuQXMtFMCbqDBLzjNUZa9stuk.39l28IcPhH9Z2szsf3SGtNI1sAfo66Djt7sOReLK3lHw9UkJp7BdGqt6a2X9qAc8EsAI3lE480Tmt0fkHv14Oc30LSbPB_WwFmiqAki2W.Gv9hV7TN_QBFESleTDlXd.6KGflfd4.KwWF7rpSRo_cgoc9ALLLIafpxHVbe7_g5r7zvpml_Pj8fEL75fw.1GBuy16bciHBuB8s_kahuJYUnhtQFFgfTQl8_Gn6KeovBWx.PJ7nFv5sklHUfAyBVq3t30xKe8ZDydsQ_G.yipfj_In5GmmWcXGb6E4.bioDOwW_sKLtxwdTQt7Nu.RkILX_mKvXNpyLqflIVj8G7X5E8I.unw",
+ "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",
+};
+const getMeta = async ({ link, providerContext, }) => {
+ try {
+ const { axios, cheerio } = providerContext;
+ const url = link;
+ console.log("url", url);
+ const baseUrl = url.split("/").slice(0, 3).join("/");
+ const response = await axios.get(url, {
+ headers: {
+ ...headers,
+ Referer: baseUrl,
+ },
+ });
+ const $ = cheerio.load(response.data);
+ const infoContainer = $(".entry-content,.post-inner");
+ const heading = infoContainer?.find("h3");
+ const imdbId =
+ //@ts-ignore
+ heading?.next("p")?.find("a")?.[0]?.attribs?.href?.match(/tt\d+/g)?.[0] ||
+ infoContainer.text().match(/tt\d+/g)?.[0] ||
+ "";
+ // console.log(imdbId)
+ const type = heading?.next("p")?.text()?.includes("Series Name")
+ ? "series"
+ : "movie";
+ // console.log(type);
+ // title
+ const titleRegex = /Name: (.+)/;
+ const title = heading?.next("p")?.text()?.match(titleRegex)?.[1] || "";
+ // console.log(title);
+ // synopsis
+ const synopsisNode = //@ts-ignore
+ infoContainer?.find("p")?.next("h3,h4")?.next("p")?.[0]?.children?.[0];
+ const synopsis = synopsisNode && "data" in synopsisNode ? synopsisNode.data : "";
+ // console.log(synopsis);
+ // image
+ let image = infoContainer?.find("img[data-lazy-src]")?.attr("data-lazy-src") || "";
+ if (image.startsWith("//")) {
+ image = "https:" + image;
+ }
+ // console.log(image);
+ // console.log({title, synopsis, image, imdbId, type});
+ /// Links
+ const hr = infoContainer?.first()?.find("hr");
+ const list = hr?.nextUntil("hr");
+ const links = [];
+ list.each((index, element) => {
+ element = $(element);
+ // title
+ const title = element?.text() || "";
+ const quality = element?.text().match(/\d+p\b/)?.[0] || "";
+ // console.log(title);
+ // movieLinks
+ const movieLinks = element
+ ?.next()
+ .find(".dwd-button")
+ .text()
+ .toLowerCase()
+ .includes("download")
+ ? element?.next().find(".dwd-button")?.parent()?.attr("href")
+ : "";
+ // episode links
+ const vcloudLinks = 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;']")
+ ?.parent()
+ ?.attr("href");
+ console.log(title);
+ const episodesLink = (vcloudLinks
+ ? vcloudLinks
+ : element
+ ?.next()
+ .find(".dwd-button")
+ .text()
+ .toLowerCase()
+ .includes("episode")
+ ? element?.next().find(".dwd-button")?.parent()?.attr("href")
+ : "") ||
+ element
+ ?.next()
+ .find(".btn-outline[style='background:linear-gradient(135deg,#0ebac3,#09d261); color: white;']")
+ ?.parent()
+ ?.attr("href");
+ if (movieLinks || episodesLink) {
+ links.push({
+ title,
+ directLinks: movieLinks
+ ? [{ title: "Movie", link: movieLinks, type: "movie" }]
+ : [],
+ episodesLink,
+ quality,
+ });
+ }
+ });
+ // console.log(links);
+ return {
+ title,
+ synopsis,
+ image,
+ imdbId,
+ type,
+ linkList: links,
+ };
+ }
+ catch (error) {
+ console.log("getInfo error");
+ console.error(error);
+ // ToastAndroid.show('No response', ToastAndroid.SHORT);
+ return {
+ title: "",
+ synopsis: "",
+ image: "",
+ imdbId: "",
+ type: "",
+ linkList: [],
+ };
+ }
+};
+exports.getMeta = getMeta;
diff --git a/dist/vega/posts.js b/dist/vega/posts.js
new file mode 100644
index 0000000..12c5e13
--- /dev/null
+++ b/dist/vega/posts.js
@@ -0,0 +1,79 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.getSearchPosts = exports.getPosts = void 0;
+const headers = {
+ Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
+ "Cache-Control": "no-store",
+ "Accept-Language": "en-US,en;q=0.9",
+ DNT: "1",
+ "sec-ch-ua": '"Not_A Brand";v="8", "Chromium";v="120", "Microsoft Edge";v="120"',
+ "sec-ch-ua-mobile": "?0",
+ "sec-ch-ua-platform": '"Windows"',
+ "Sec-Fetch-Dest": "document",
+ "Sec-Fetch-Mode": "navigate",
+ "Sec-Fetch-Site": "none",
+ "Sec-Fetch-User": "?1",
+ Cookie: "_lscache_vary=62abf8b96599676eb8ec211cffaeb8ff; ext_name=ojplmecpdpgccookcobabopnaifgidhf; cf_clearance=n4Y1XTKZ5TfIMBNQuAXzerwKpx0U35KoOm3imfT0GpU-1732097818-1.2.1.1-ZeAnEu.8D9TSZHYDoj7vwo1A1rpdKl304ZpaBn_QbAQOr211JFAb7.JRQU3EL2eIy1Dfl8HhYvH7_259.22lUz8gbchHcQ8hvfuQXMtFMCbqDBLzjNUZa9stuk.39l28IcPhH9Z2szsf3SGtNI1sAfo66Djt7sOReLK3lHw9UkJp7BdGqt6a2X9qAc8EsAI3lE480Tmt0fkHv14Oc30LSbPB_WwFmiqAki2W.Gv9hV7TN_QBFESleTDlXd.6KGflfd4.KwWF7rpSRo_cgoc9ALLLIafpxHVbe7_g5r7zvpml_Pj8fEL75fw.1GBuy16bciHBuB8s_kahuJYUnhtQFFgfTQl8_Gn6KeovBWx.PJ7nFv5sklHUfAyBVq3t30xKe8ZDydsQ_G.yipfj_In5GmmWcXGb6E4.bioDOwW_sKLtxwdTQt7Nu.RkILX_mKvXNpyLqflIVj8G7X5E8I.unw",
+ "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",
+};
+const getPosts = async ({ filter, page, providerValue, signal, providerContext, }) => {
+ const { getBaseUrl, axios, cheerio } = providerContext;
+ const baseUrl = await getBaseUrl("Vega");
+ console.log("vegaGetPosts baseUrl:", providerValue, baseUrl);
+ const url = `${baseUrl}/${filter}/page/${page}/`;
+ console.log("vegaGetPosts url:", url);
+ return posts(baseUrl, url, signal, headers, axios, cheerio);
+};
+exports.getPosts = getPosts;
+const getSearchPosts = async ({ searchQuery, page, providerValue, signal, providerContext, }) => {
+ const { getBaseUrl, axios, commonHeaders, cheerio } = providerContext;
+ const baseUrl = await getBaseUrl("Vega");
+ console.log("vegaGetPosts baseUrl:", providerValue, baseUrl);
+ const url = `${baseUrl}/page/${page}/?s=${searchQuery}`;
+ console.log("vegaGetPosts url:", url);
+ return posts(baseUrl, url, signal, commonHeaders, axios, cheerio);
+};
+exports.getSearchPosts = getSearchPosts;
+async function posts(baseUrl, url, signal, headers = {}, axios, cheerio) {
+ try {
+ const urlRes = await axios.get(url, {
+ headers: {
+ ...headers,
+ Referer: baseUrl,
+ },
+ signal,
+ });
+ const $ = cheerio.load(urlRes.data);
+ const posts = [];
+ $(".blog-items,.post-list")
+ ?.children("article")
+ ?.each((index, element) => {
+ const post = {
+ title: ($(element)
+ ?.find("a")
+ ?.attr("title")
+ ?.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(),
+ link: $(element)?.find("a")?.attr("href") || "",
+ image: $(element).find("a").find("img").attr("data-lazy-src") ||
+ $(element).find("a").find("img").attr("data-src") ||
+ $(element).find("a").find("img").attr("src") ||
+ "",
+ };
+ if (post.image.startsWith("//")) {
+ post.image = "https:" + post.image;
+ }
+ posts.push(post);
+ });
+ // console.log(posts);
+ return posts;
+ }
+ catch (error) {
+ console.error("vegaGetPosts error:", error);
+ return [];
+ }
+}
diff --git a/dist/vega/stream.js b/dist/vega/stream.js
new file mode 100644
index 0000000..42f0062
--- /dev/null
+++ b/dist/vega/stream.js
@@ -0,0 +1,94 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.getStream = getStream;
+const headers = {
+ Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
+ "Cache-Control": "no-store",
+ "Accept-Language": "en-US,en;q=0.9",
+ DNT: "1",
+ "sec-ch-ua": '"Not_A Brand";v="8", "Chromium";v="120", "Microsoft Edge";v="120"',
+ "sec-ch-ua-mobile": "?0",
+ "sec-ch-ua-platform": '"Windows"',
+ "Sec-Fetch-Dest": "document",
+ "Sec-Fetch-Mode": "navigate",
+ "Sec-Fetch-Site": "none",
+ "Sec-Fetch-User": "?1",
+ Cookie: "_lscache_vary=62abf8b96599676eb8ec211cffaeb8ff; ext_name=ojplmecpdpgccookcobabopnaifgidhf; cf_clearance=n4Y1XTKZ5TfIMBNQuAXzerwKpx0U35KoOm3imfT0GpU-1732097818-1.2.1.1-ZeAnEu.8D9TSZHYDoj7vwo1A1rpdKl304ZpaBn_QbAQOr211JFAb7.JRQU3EL2eIy1Dfl8HhYvH7_259.22lUz8gbchHcQ8hvfuQXMtFMCbqDBLzjNUZa9stuk.39l28IcPhH9Z2szsf3SGtNI1sAfo66Djt7sOReLK3lHw9UkJp7BdGqt6a2X9qAc8EsAI3lE480Tmt0fkHv14Oc30LSbPB_WwFmiqAki2W.Gv9hV7TN_QBFESleTDlXd.6KGflfd4.KwWF7rpSRo_cgoc9ALLLIafpxHVbe7_g5r7zvpml_Pj8fEL75fw.1GBuy16bciHBuB8s_kahuJYUnhtQFFgfTQl8_Gn6KeovBWx.PJ7nFv5sklHUfAyBVq3t30xKe8ZDydsQ_G.yipfj_In5GmmWcXGb6E4.bioDOwW_sKLtxwdTQt7Nu.RkILX_mKvXNpyLqflIVj8G7X5E8I.unw",
+ "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",
+};
+async function getStream({ link, type, signal, providerContext, }) {
+ const { axios, cheerio, extractors } = providerContext;
+ const { hubcloudExtracter } = extractors;
+ try {
+ const streamLinks = [];
+ console.log("dotlink", link);
+ if (type === "movie") {
+ // vlink
+ const dotlinkRes = await axios(`${link}`, { headers });
+ const dotlinkText = dotlinkRes.data;
+ // console.log('dotlinkText', dotlinkText);
+ const vlink = dotlinkText.match(/
{
+ const title = $(element).text();
+ const link = $(element)
+ .parent()
+ .parent()
+ .next("h4")
+ .find("a")
+ .attr("href");
+ if (link && !title.includes("zip")) {
+ episodeLinks.push({
+ title: title,
+ link,
+ });
+ }
+ });
+ return episodeLinks;
+ }
+ catch (err) {
+ return [
+ {
+ title: "Server 1",
+ link: url,
+ },
+ ];
+ }
+};
+exports.getEpisodes = getEpisodes;
diff --git a/dist/world4u/meta.js b/dist/world4u/meta.js
new file mode 100644
index 0000000..343c700
--- /dev/null
+++ b/dist/world4u/meta.js
@@ -0,0 +1,76 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.getMeta = void 0;
+const getMeta = async function ({ link, providerContext, }) {
+ try {
+ const { axios, cheerio } = providerContext;
+ const url = link;
+ const res = await axios.get(url);
+ const data = res.data;
+ const $ = cheerio.load(data);
+ const type = $(".entry-content")
+ .text()
+ .toLocaleLowerCase()
+ .includes("movie name")
+ ? "movie"
+ : "series";
+ const imdbId = $(".imdb_left").find("a").attr("href")?.split("/")[4] || "";
+ const title = $(".entry-content")
+ .find('strong:contains("Name")')
+ .children()
+ .remove()
+ .end()
+ .text()
+ .replace(":", "");
+ const synopsis = $(".entry-content")
+ .find('p:contains("Synopsis"),p:contains("Plot"),p:contains("Story")')
+ .children()
+ .remove()
+ .end()
+ .text();
+ const image = $(".wp-caption").find("img").attr("data-src") ||
+ $(".entry-content").find("img").attr("data-src") ||
+ "";
+ const links = [];
+ $(".my-button").map((i, element) => {
+ const title = $(element).parent().parent().prev().text();
+ const episodesLink = $(element).attr("href");
+ const quality = title.match(/\b(480p|720p|1080p|2160p)\b/i)?.[0] || "";
+ if (episodesLink && title) {
+ links.push({
+ title,
+ episodesLink: type === "series" ? episodesLink : "",
+ directLinks: type === "movie"
+ ? [
+ {
+ link: episodesLink,
+ title,
+ type: "movie",
+ },
+ ]
+ : [],
+ quality,
+ });
+ }
+ });
+ return {
+ title,
+ synopsis,
+ image,
+ imdbId,
+ type,
+ linkList: links,
+ };
+ }
+ catch (err) {
+ return {
+ title: "",
+ synopsis: "",
+ image: "",
+ imdbId: "",
+ type: "movie",
+ linkList: [],
+ };
+ }
+};
+exports.getMeta = getMeta;
diff --git a/dist/world4u/posts.js b/dist/world4u/posts.js
new file mode 100644
index 0000000..21ae170
--- /dev/null
+++ b/dist/world4u/posts.js
@@ -0,0 +1,48 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.getSearchPosts = exports.getPosts = void 0;
+const getPosts = async function ({ filter, page,
+// providerValue,
+signal, providerContext, }) {
+ const { getBaseUrl, axios, cheerio } = providerContext;
+ const baseUrl = await getBaseUrl("w4u");
+ const url = `${baseUrl + filter}/page/${page}/`;
+ return posts({ url, signal, axios, cheerio });
+};
+exports.getPosts = getPosts;
+const getSearchPosts = async function ({ searchQuery, page,
+// providerValue,
+signal, providerContext, }) {
+ const { getBaseUrl, axios, cheerio } = providerContext;
+ const baseUrl = await getBaseUrl("w4u");
+ const url = `${baseUrl}/page/${page}/?s=${searchQuery}`;
+ return posts({ url, signal, axios, cheerio });
+};
+exports.getSearchPosts = getSearchPosts;
+async function posts({ url, signal, axios, cheerio, }) {
+ try {
+ const res = await axios.get(url, { signal });
+ const data = res.data;
+ const $ = cheerio.load(data);
+ const catalog = [];
+ $(".recent-posts")
+ .children()
+ .map((i, element) => {
+ const title = $(element).find(".post-thumb").find("a").attr("title");
+ const link = $(element).find(".post-thumb").find("a").attr("href");
+ const image = $(element).find(".post-thumb").find("img").attr("data-src") ||
+ $(element).find(".post-thumb").find("img").attr("src");
+ if (title && link && image) {
+ catalog.push({
+ title: title.replace("Download", "").trim(),
+ link: link,
+ image: image,
+ });
+ }
+ });
+ return catalog;
+ }
+ catch (err) {
+ return [];
+ }
+}
diff --git a/dist/world4u/stream.js b/dist/world4u/stream.js
new file mode 100644
index 0000000..907ad81
--- /dev/null
+++ b/dist/world4u/stream.js
@@ -0,0 +1,186 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.getStream = void 0;
+const getStream = async function ({ link: url, type, providerContext, }) {
+ const { axios, cheerio } = providerContext;
+ const headers = {
+ "sec-ch-ua": '"Not_A Brand";v="8", "Chromium";v="120", "Microsoft Edge";v="120"',
+ "sec-ch-ua-mobile": "?0",
+ "sec-ch-ua-platform": '"Windows"',
+ "Sec-Fetch-Site": "none",
+ "Sec-Fetch-User": "?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",
+ };
+ try {
+ if (type === "movie") {
+ const linkRes = await axios.get(url, { headers });
+ const linkData = linkRes.data;
+ const $ = cheerio.load(linkData);
+ url = $('strong:contains("INSTANT")').parent().attr("href") || url;
+ }
+ // fastilinks
+ if (url.includes("fastilinks")) {
+ const fastilinksRes = await axios.get(url, { headers });
+ const fastilinksData = fastilinksRes.data;
+ const $$ = cheerio.load(fastilinksData);
+ const fastilinksKey = $$('input[name="_csrf_token_645a83a41868941e4692aa31e7235f2"]').attr("value");
+ console.log("fastilinksKey", fastilinksKey);
+ const fastilinksFormData = new FormData();
+ fastilinksFormData.append("_csrf_token_645a83a41868941e4692aa31e7235f2", fastilinksKey || "");
+ const fastilinksRes2 = await fetch(url, {
+ method: "POST",
+ headers: headers,
+ body: fastilinksFormData,
+ });
+ const fastilinksHtml = await fastilinksRes2.text();
+ // console.log('fastilinksHtml', fastilinksHtml);
+ const $$$ = cheerio.load(fastilinksHtml);
+ const fastilinksLink = $$$('a:contains("mediafire")').attr("href") ||
+ $$$('a:contains("photolinx")').attr("href");
+ console.log("fastilinksLink", fastilinksLink);
+ url = fastilinksLink || url;
+ }
+ console.log("world4uGetStream", type, url);
+ if (url.includes("photolinx")) {
+ console.log("photolinx", url);
+ // const photolinxBaseUrl = url.split('/').slice(0, 3).join('/');
+ const photolinxRes = await axios.get(url, { headers });
+ const photolinxData = photolinxRes.data;
+ const $$$ = cheerio.load(photolinxData);
+ const access_token = $$$("#generate_url").attr("data-token");
+ const uid = $$$("#generate_url").attr("data-uid");
+ const body = {
+ type: "DOWNLOAD_GENERATE",
+ payload: {
+ access_token,
+ uid,
+ },
+ };
+ console.log("photolinxData", JSON.stringify(body));
+ const photolinxRes2 = await fetch("https://photolinx.shop/action", {
+ headers: {
+ "sec-fetch-site": "same-origin",
+ "x-requested-with": "xmlhttprequest",
+ cookie: "PHPSESSID=9a8d855c700cf0711831c04960c2e2b4",
+ Referer: "https://photolinx.shop/download/5mPkrBD0D2x",
+ "Referrer-Policy": "strict-origin-when-cross-origin",
+ },
+ body: JSON.stringify(body),
+ method: "POST",
+ });
+ const photolinxData2 = await photolinxRes2.json();
+ console.log("photolinxData2", photolinxData2);
+ const dwUrl = photolinxData2?.download_url;
+ if (dwUrl) {
+ const streamLinks = [
+ {
+ server: "Photolinx",
+ link: dwUrl,
+ type: "mkv",
+ },
+ ];
+ return streamLinks;
+ }
+ }
+ const res = await axios.get(url, { headers });
+ const html = res.data;
+ const streamLinks = [];
+ let data = { download: "" };
+ try {
+ const key = html.match(/formData\.append\('key',\s*'(\d+)'\);/)?.[1] || "";
+ console.log("key", key);
+ const formData = new FormData();
+ formData.append("key", key);
+ const streamRes = await fetch(url, {
+ method: "POST",
+ headers: headers,
+ body: formData,
+ });
+ data = await streamRes.json();
+ }
+ catch (err) {
+ console.log("error in world4uGetStream", err);
+ }
+ // console.log('streamRes', streamRes);
+ let $ = cheerio.load(html);
+ // console.log('data', html);
+ const mediafireUrl = $('h1:contains("Download")').find("a").attr("href") ||
+ $(".input.popsok").attr("href");
+ console.log("mediafireUrl", mediafireUrl);
+ if (mediafireUrl) {
+ const directUrl = await axios.head(mediafireUrl);
+ const urlContentType = directUrl.headers["content-type"];
+ console.log("mfcontentType", urlContentType);
+ if (urlContentType && urlContentType.includes("video")) {
+ streamLinks.push({
+ server: "Mediafire",
+ link: mediafireUrl,
+ type: "mkv",
+ });
+ return streamLinks;
+ }
+ else {
+ const repairRes = await axios.get(mediafireUrl, {
+ headers: {
+ Referer: url,
+ },
+ });
+ const repairHtml = repairRes.data;
+ // Regex to match the window.location.href assignment in the script content
+ const hrefRegex = /window\.location\.href\s*=\s*['"]([^'"]+)['"]/;
+ const match = repairHtml.match(hrefRegex);
+ // If a match is found, return the URL; otherwise return null
+ let downloadLInk = match ? match[1] : null;
+ console.log("downloadLInk", downloadLInk);
+ if (downloadLInk) {
+ streamLinks.push({
+ server: "Mediafire",
+ link: downloadLInk,
+ type: "mkv",
+ });
+ }
+ return streamLinks;
+ }
+ }
+ const requireRepairRes = await axios.head(data.download);
+ const contentType = requireRepairRes.headers["content-type"];
+ console.log("contentType", contentType);
+ if (contentType && contentType.includes("video")) {
+ streamLinks.push({
+ server: "Mediafire",
+ link: data.download,
+ type: "mkv",
+ });
+ return streamLinks;
+ }
+ else {
+ const repairRes = await axios.get(data.download, {
+ headers: {
+ Referer: url,
+ },
+ });
+ const repairHtml = repairRes.data;
+ const $ = cheerio.load(repairHtml);
+ const repairLink = $("#continue-btn").attr("href");
+ console.log("repairLink", "https://www.mediafire.com" + repairLink);
+ const repairRequireRepairRes = await axios.get("https://www.mediafire.com" + repairLink);
+ const $$ = cheerio.load(repairRequireRepairRes.data);
+ const repairDownloadLink = $$(".input.popsok").attr("href");
+ console.log("repairDownloadLink", repairDownloadLink);
+ if (repairDownloadLink) {
+ streamLinks.push({
+ server: "Mediafire",
+ link: repairDownloadLink,
+ type: "mkv",
+ });
+ }
+ }
+ return streamLinks;
+ }
+ catch (err) {
+ console.log(err);
+ return [];
+ }
+};
+exports.getStream = getStream;