This commit is contained in:
himanshu8443
2025-07-11 19:45:14 +05:30
parent 13f71510d5
commit 35f1e57a0b
139 changed files with 10578 additions and 139 deletions

View File

@@ -1 +1,14 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),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=[];
"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 = [];

100
dist/guardahd/meta.js vendored
View File

@@ -1 +1,99 @@
"use strict";var __awaiter=this&&this.__awaiter||function(i,e,t,o){return new(t||(t=Promise))(function(l,n){function d(i){try{s(o.next(i))}catch(i){n(i)}}function v(i){try{s(o.throw(i))}catch(i){n(i)}}function s(i){var e;i.done?l(i.value):(e=i.value,e instanceof t?e:new t(function(i){i(e)})).then(d,v)}s((o=o.apply(i,e||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getMeta=void 0;const getMeta=function(i){return __awaiter(this,arguments,void 0,function*({link:i,providerContext:e}){var t,o,l,n,d,v,s,a,u,r,m;const p=e.axios;try{const e=(yield p.get(i)).data,y={title:"",synopsis:"",image:"",imdbId:(null===(t=null==e?void 0:e.meta)||void 0===t?void 0:t.imdb_id)||"",type:(null===(o=null==e?void 0:e.meta)||void 0===o?void 0:o.type)||"movie"},c=[];let g=[],b=new Map;if("series"===y.type){null===(n=null===(l=null==e?void 0:e.meta)||void 0===l?void 0:l.videos)||void 0===n||n.map(i=>{var t,o,l,n,d,v,s,a;(null==i?void 0:i.season)<=0||(b.has(null==i?void 0:i.season)||b.set(null==i?void 0:i.season,[]),b.get(null==i?void 0:i.season).push({title:"Episode "+(null==i?void 0:i.episode),type:"series",link:JSON.stringify({title:null===(t=null==e?void 0:e.meta)||void 0===t?void 0:t.name,imdbId:null===(o=null==e?void 0:e.meta)||void 0===o?void 0:o.imdb_id,season:null===(l=null==i?void 0:i.id)||void 0===l?void 0:l.split(":")[1],episode:null===(n=null==i?void 0:i.id)||void 0===n?void 0:n.split(":")[2],type:null===(d=null==e?void 0:e.meta)||void 0===d?void 0:d.type,tmdbId:(null===(s=null===(v=null==e?void 0:e.meta)||void 0===v?void 0:v.moviedb_id)||void 0===s?void 0:s.toString())||"",year:null===(a=null==e?void 0:e.meta)||void 0===a?void 0:a.year})}))});const i=Array.from(b.keys());i.sort(),i.map(i=>{g=b.get(i),c.push({title:`Season ${i}`,directLinks:g})})}else c.push({title:null===(d=null==e?void 0:e.meta)||void 0===d?void 0:d.name,directLinks:[{title:"Movie",type:"movie",link:JSON.stringify({title:null===(v=null==e?void 0:e.meta)||void 0===v?void 0:v.name,imdbId:null===(s=null==e?void 0:e.meta)||void 0===s?void 0:s.imdb_id,season:"",episode:"",type:null===(a=null==e?void 0:e.meta)||void 0===a?void 0:a.type,tmdbId:(null===(r=null===(u=null==e?void 0:e.meta)||void 0===u?void 0:u.moviedb_id)||void 0===r?void 0:r.toString())||"",year:null===(m=null==e?void 0:e.meta)||void 0===m?void 0:m.year})}]});return Object.assign(Object.assign({},y),{linkList:c})}catch(i){return{title:"",synopsis:"",image:"",imdbId:"",type:"movie",linkList:[]}}})};exports.getMeta=getMeta;
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getMeta = void 0;
const getMeta = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ link, providerContext, }) {
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
const axios = providerContext.axios;
try {
console.log("all", link);
const res = yield axios.get(link);
const data = res.data;
const meta = {
title: "",
synopsis: "",
image: "",
imdbId: ((_b = data === null || data === void 0 ? void 0 : data.meta) === null || _b === void 0 ? void 0 : _b.imdb_id) || "",
type: ((_c = data === null || data === void 0 ? void 0 : data.meta) === null || _c === void 0 ? void 0 : _c.type) || "movie",
};
const links = [];
let directLinks = [];
let season = new Map();
if (meta.type === "series") {
(_e = (_d = data === null || data === void 0 ? void 0 : data.meta) === null || _d === void 0 ? void 0 : _d.videos) === null || _e === void 0 ? void 0 : _e.map((video) => {
var _a, _b, _c, _d, _e, _f, _g, _h;
if ((video === null || video === void 0 ? void 0 : video.season) <= 0)
return;
if (!season.has(video === null || video === void 0 ? void 0 : video.season)) {
season.set(video === null || video === void 0 ? void 0 : video.season, []);
}
season.get(video === null || video === void 0 ? void 0 : video.season).push({
title: "Episode " + (video === null || video === void 0 ? void 0 : video.episode),
type: "series",
link: JSON.stringify({
title: (_a = data === null || data === void 0 ? void 0 : data.meta) === null || _a === void 0 ? void 0 : _a.name,
imdbId: (_b = data === null || data === void 0 ? void 0 : data.meta) === null || _b === void 0 ? void 0 : _b.imdb_id,
season: (_c = video === null || video === void 0 ? void 0 : video.id) === null || _c === void 0 ? void 0 : _c.split(":")[1],
episode: (_d = video === null || video === void 0 ? void 0 : video.id) === null || _d === void 0 ? void 0 : _d.split(":")[2],
type: (_e = data === null || data === void 0 ? void 0 : data.meta) === null || _e === void 0 ? void 0 : _e.type,
tmdbId: ((_g = (_f = data === null || data === void 0 ? void 0 : data.meta) === null || _f === void 0 ? void 0 : _f.moviedb_id) === null || _g === void 0 ? void 0 : _g.toString()) || "",
year: (_h = data === null || data === void 0 ? void 0 : data.meta) === null || _h === void 0 ? void 0 : _h.year,
}),
});
});
const keys = Array.from(season.keys());
keys.sort();
keys.map((key) => {
directLinks = season.get(key);
links.push({
title: `Season ${key}`,
directLinks: directLinks,
});
});
}
else {
console.log("all meta Mv🔥🔥", meta);
links.push({
title: (_f = data === null || data === void 0 ? void 0 : data.meta) === null || _f === void 0 ? void 0 : _f.name,
directLinks: [
{
title: "Movie",
type: "movie",
link: JSON.stringify({
title: (_g = data === null || data === void 0 ? void 0 : data.meta) === null || _g === void 0 ? void 0 : _g.name,
imdbId: (_h = data === null || data === void 0 ? void 0 : data.meta) === null || _h === void 0 ? void 0 : _h.imdb_id,
season: "",
episode: "",
type: (_j = data === null || data === void 0 ? void 0 : data.meta) === null || _j === void 0 ? void 0 : _j.type,
tmdbId: ((_l = (_k = data === null || data === void 0 ? void 0 : data.meta) === null || _k === void 0 ? void 0 : _k.moviedb_id) === null || _l === void 0 ? void 0 : _l.toString()) || "",
year: (_m = data === null || data === void 0 ? void 0 : data.meta) === null || _m === void 0 ? void 0 : _m.year,
}),
},
],
});
}
return Object.assign(Object.assign({}, meta), { linkList: links });
}
catch (err) {
console.error(err);
return {
title: "",
synopsis: "",
image: "",
imdbId: "",
type: "movie",
linkList: [],
};
}
});
};
exports.getMeta = getMeta;

View File

@@ -1 +1,79 @@
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))(function(i,s){function a(t){try{c(o.next(t))}catch(t){s(t)}}function r(t){try{c(o.throw(t))}catch(t){s(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,r)}c((o=o.apply(t,e||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getSearchPosts=exports.getPosts=void 0;const getPosts=function(t){return __awaiter(this,arguments,void 0,function*({filter:t,signal:e,providerContext:n}){try{const o=[],i="https://cinemeta-catalogs.strem.io"+t,s=(yield n.axios.get(i,{headers:n.commonHeaders,signal:e})).data;return null==s||s.metas.map(t=>{const e=null==t?void 0:t.name,n=(null==t?void 0:t.imdb_id)||(null==t?void 0:t.id),i=null==t?void 0:t.type,s=null==t?void 0:t.poster;n&&o.push({title:e,link:`https://v3-cinemeta.strem.io/meta/${i}/${n}.json`,image:s})}),o}catch(t){return[]}})};exports.getPosts=getPosts;const getSearchPosts=function(t){return __awaiter(this,arguments,void 0,function*({searchQuery:t,page:e,signal:n,providerContext:o}){try{const{axios:i,commonHeaders:s}=o;if(e>1)return[];const a=[],r=`https://v3-cinemeta.strem.io/catalog/movie/top/search=${encodeURI(t)}.json`,c=(yield i.get(r,{headers:s,signal:n})).data;return null==c||c.metas.map(t=>{const e=(null==t?void 0:t.name)||"",n=(null==t?void 0:t.imdb_id)||(null==t?void 0:t.id),o=null==t?void 0:t.poster,i=null==t?void 0:t.type;n&&a.push({title:e,link:`https://v3-cinemeta.strem.io/meta/${i}/${n}.json`,image:o})}),a}catch(t){return[]}})};exports.getSearchPosts=getSearchPosts;
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getSearchPosts = exports.getPosts = void 0;
const getPosts = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ filter, signal, providerContext, }) {
try {
const catalog = [];
const url = "https://cinemeta-catalogs.strem.io" + filter;
console.log("allGetPostUrl", url);
const res = yield providerContext.axios.get(url, {
headers: providerContext.commonHeaders,
signal,
});
const data = res.data;
data === null || data === void 0 ? void 0 : data.metas.map((result) => {
const title = result === null || result === void 0 ? void 0 : result.name;
const id = (result === null || result === void 0 ? void 0 : result.imdb_id) || (result === null || result === void 0 ? void 0 : result.id);
const type = result === null || result === void 0 ? void 0 : result.type;
const image = result === null || result === void 0 ? void 0 : 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 = function (_a) {
return __awaiter(this, arguments, void 0, 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 = yield axios.get(url2, { headers, signal });
const data2 = res2.data;
data2 === null || data2 === void 0 ? void 0 : data2.metas.map((result) => {
const title = (result === null || result === void 0 ? void 0 : result.name) || "";
const id = (result === null || result === void 0 ? void 0 : result.imdb_id) || (result === null || result === void 0 ? void 0 : result.id);
const image = result === null || result === void 0 ? void 0 : result.poster;
const type = result === null || result === void 0 ? void 0 : 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;

View File

@@ -1 +1,117 @@
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,i,n){return new(i||(i=Promise))(function(r,o){function a(t){try{u(n.next(t))}catch(t){o(t)}}function s(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(a,s)}u((n=n.apply(t,e||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getStream=void 0;const getStream=function(t){return __awaiter(this,arguments,void 0,function*({link:t,type:e,providerContext:i}){try{const{axios:n,cheerio:r,extractors:o}=i,{superVideoExtractor:a}=o;function s(t){return __awaiter(this,arguments,void 0,function*({imdb:t}){try{const e="https://guardahd.stream"+("/set-movie-a/"+t),i=(yield n.get(e,{timeout:4e3})).data,o=r.load(i)('li:contains("supervideo")').attr("data-link");if(!o)return null;const s=new AbortController,u=s.signal;setTimeout(()=>s.abort(),4e3);const c=yield fetch("https:"+o,{signal:u}),d=yield c.text();return yield a(d)}catch(t){}})}function u(t){return __awaiter(this,arguments,void 0,function*({imdb:t,type:e,season:i,episode:o}){try{const s="https://mostraguarda.stream"+("tv"===e?`/serie/${t}/${i}/${o}`:`/movie/${t}`),u=(yield n(s,{timeout:4e3})).data,c=r.load(u)('li:contains("supervideo")').attr("data-link");if(!c)return null;const d=new AbortController,l=d.signal;setTimeout(()=>d.abort(),4e3);const p=yield fetch("https:"+c,{signal:l}),y=yield p.text();return yield a(y)}catch(t){}})}const c=[],{imdbId:d,season:l,episode:p}=JSON.parse(t),y=yield u({imdb:d,type:e,season:l,episode:p});y&&c.push({server:"Supervideo 1",link:y,type:"m3u8"});const h=yield s({imdb:d,type:e,season:l,episode:p});return h&&c.push({server:"Supervideo 2",link:h,type:"m3u8"}),c}catch(m){return[]}})};exports.getStream=getStream;
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getStream = void 0;
const getStream = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ link: id, type, providerContext, }) {
try {
const { axios, cheerio, extractors } = providerContext;
const { superVideoExtractor } = extractors;
function ExtractGuardahd(_a) {
return __awaiter(this, arguments, void 0, function* ({ imdb, // type, // season,
}) {
try {
const baseUrl = "https://guardahd.stream";
const path = "/set-movie-a/" + imdb;
const url = baseUrl + path;
console.log("url:", url);
const res = yield axios.get(url, { timeout: 4000 });
const html = res.data;
const $ = cheerio.load(html);
const superVideoUrl = $('li:contains("supervideo")').attr("data-link");
console.log("superVideoUrl:", superVideoUrl);
if (!superVideoUrl) {
return null;
}
const controller2 = new AbortController();
const signal2 = controller2.signal;
setTimeout(() => controller2.abort(), 4000);
const res2 = yield fetch("https:" + superVideoUrl, { signal: signal2 });
const data = yield res2.text();
// console.log('mostraguarda data:', data);
const streamUrl = yield superVideoExtractor(data);
return streamUrl;
}
catch (err) {
console.error("Error in GetMostraguardaStram:", err);
}
});
}
function GetMostraguardaStream(_a) {
return __awaiter(this, arguments, void 0, function* ({ imdb, type, season, episode, }) {
try {
const baseUrl = "https://mostraguarda.stream";
const path = type === "tv"
? `/serie/${imdb}/${season}/${episode}`
: `/movie/${imdb}`;
const url = baseUrl + path;
console.log("url:", url);
const res = yield axios(url, { timeout: 4000 });
const html = res.data;
const $ = cheerio.load(html);
const superVideoUrl = $('li:contains("supervideo")').attr("data-link");
console.log("superVideoUrl:", superVideoUrl);
if (!superVideoUrl) {
return null;
}
const controller2 = new AbortController();
const signal2 = controller2.signal;
setTimeout(() => controller2.abort(), 4000);
const res2 = yield fetch("https:" + superVideoUrl, { signal: signal2 });
const data = yield res2.text();
// console.log('mostraguarda data:', data);
const streamUrl = yield superVideoExtractor(data);
return streamUrl;
}
catch (err) {
console.error("Error in GetMostraguardaStram:", err);
}
});
}
console.log(id);
const streams = [];
const { imdbId, season, episode } = JSON.parse(id);
///// mostraguarda
const mostraguardaStream = yield GetMostraguardaStream({
imdb: imdbId,
type: type,
season: season,
episode: episode,
});
if (mostraguardaStream) {
streams.push({
server: "Supervideo 1",
link: mostraguardaStream,
type: "m3u8",
});
}
const guardahdStream = yield ExtractGuardahd({
imdb: imdbId,
type: type,
season: season,
episode: episode,
});
if (guardahdStream) {
streams.push({
server: "Supervideo 2",
link: guardahdStream,
type: "m3u8",
});
}
return streams;
}
catch (err) {
console.error(err);
return [];
}
});
};
exports.getStream = getStream;