mirror of
https://github.com/vega-org/vega-providers.git
synced 2026-04-17 15:41:45 +00:00
minify
This commit is contained in:
23
dist/4khdhub/catalog.js
vendored
23
dist/4khdhub/catalog.js
vendored
@@ -1,22 +1 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.genres = exports.catalog = void 0;
|
||||
exports.catalog = [
|
||||
{
|
||||
title: "Popular Movies",
|
||||
filter: "/category/new-movies-10810.html",
|
||||
},
|
||||
{
|
||||
title: "Latest TV Shows",
|
||||
filter: "/category/new-series-10811.html",
|
||||
},
|
||||
{
|
||||
title: "Anime",
|
||||
filter: "/category/anime-10812.html",
|
||||
},
|
||||
{
|
||||
title: "4K HDR",
|
||||
filter: "/category/4k-hdr-10776.html",
|
||||
},
|
||||
];
|
||||
exports.genres = [];
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.genres=exports.catalog=void 0,exports.catalog=[{title:"Popular Movies",filter:"/category/new-movies-10810.html"},{title:"Latest TV Shows",filter:"/category/new-series-10811.html"},{title:"Anime",filter:"/category/anime-10812.html"},{title:"4K HDR",filter:"/category/4k-hdr-10776.html"}],exports.genres=[];
|
||||
98
dist/4khdhub/meta.js
vendored
98
dist/4khdhub/meta.js
vendored
@@ -1,97 +1 @@
|
||||
"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, }) {
|
||||
try {
|
||||
const { axios, cheerio, getBaseUrl } = providerContext;
|
||||
const baseUrl = yield getBaseUrl("4khdhub");
|
||||
const url = `${baseUrl}${link}`;
|
||||
const res = yield axios.get(url);
|
||||
const data = res.data;
|
||||
const $ = cheerio.load(data);
|
||||
const type = $(".season-content").length > 0 ? "series" : "movie";
|
||||
const imdbId = "";
|
||||
const title = $(".page-title").text() || "";
|
||||
const image = $(".poster-image").find("img").attr("src") || "";
|
||||
const synopsis = $(".content-section").find("p").first().text().trim() || "";
|
||||
// Links
|
||||
const links = [];
|
||||
if (type === "series") {
|
||||
$(".season-item").map((i, element) => {
|
||||
const title = $(element).find(".episode-title").text();
|
||||
let directLinks = [];
|
||||
$(element)
|
||||
.find(".episode-download-item")
|
||||
.map((i, element) => {
|
||||
const title = $(element)
|
||||
.find(".episode-file-info")
|
||||
.text()
|
||||
.trim()
|
||||
.replace("\n", " ");
|
||||
const link = $(element)
|
||||
.find(".episode-links")
|
||||
.find("a:contains('HubDrive')")
|
||||
.attr("href");
|
||||
console.log("title⭐", title, "link", link);
|
||||
if (title && link) {
|
||||
directLinks.push({ title, link });
|
||||
}
|
||||
});
|
||||
if (title && directLinks.length > 0) {
|
||||
links.push({
|
||||
title,
|
||||
directLinks: directLinks,
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
$(".download-item").map((i, element) => {
|
||||
const title = $(element)
|
||||
.find(".flex-1.text-left.font-semibold")
|
||||
.text()
|
||||
.trim();
|
||||
const link = $(element)
|
||||
.find(".grid.grid-cols-2.gap-2")
|
||||
.find("a:contains('HubDrive')")
|
||||
.attr("href");
|
||||
// console.log("title⭐", title, "link", link);
|
||||
if (title && link) {
|
||||
links.push({ title, directLinks: [{ title, link }] });
|
||||
}
|
||||
});
|
||||
}
|
||||
// console.log('multi meta', links);
|
||||
return {
|
||||
title,
|
||||
synopsis,
|
||||
image,
|
||||
imdbId,
|
||||
type,
|
||||
linkList: links,
|
||||
};
|
||||
}
|
||||
catch (err) {
|
||||
console.error(err);
|
||||
return {
|
||||
title: "",
|
||||
synopsis: "",
|
||||
image: "",
|
||||
imdbId: "",
|
||||
type: "movie",
|
||||
linkList: [],
|
||||
};
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getMeta = getMeta;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,i,n){return new(i||(i=Promise))(function(o,s){function r(t){try{d(n.next(t))}catch(t){s(t)}}function a(t){try{d(n.throw(t))}catch(t){s(t)}}function d(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(r,a)}d((n=n.apply(t,e||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getMeta=void 0;const getMeta=function(t){return __awaiter(this,arguments,void 0,function*({link:t,providerContext:e}){try{const{axios:i,cheerio:n,getBaseUrl:o}=e,s=`${yield o("4khdhub")}${t}`,r=(yield i.get(s)).data,a=n.load(r),d=a(".season-content").length>0?"series":"movie",l="",c=a(".page-title").text()||"",f=a(".poster-image").find("img").attr("src")||"",p=a(".content-section").find("p").first().text().trim()||"",u=[];return"series"===d?a(".season-item").map((t,e)=>{const i=a(e).find(".episode-title").text();let n=[];a(e).find(".episode-download-item").map((t,e)=>{const i=a(e).find(".episode-file-info").text().trim().replace("\n"," "),o=a(e).find(".episode-links").find("a:contains('HubDrive')").attr("href");i&&o&&n.push({title:i,link:o})}),i&&n.length>0&&u.push({title:i,directLinks:n})}):a(".download-item").map((t,e)=>{const i=a(e).find(".flex-1.text-left.font-semibold").text().trim(),n=a(e).find(".grid.grid-cols-2.gap-2").find("a:contains('HubDrive')").attr("href");i&&n&&u.push({title:i,directLinks:[{title:i,link:n}]})}),{title:c,synopsis:p,image:f,imdbId:l,type:d,linkList:u}}catch(t){return{title:"",synopsis:"",image:"",imdbId:"",type:"movie",linkList:[]}}})};exports.getMeta=getMeta;
|
||||
69
dist/4khdhub/posts.js
vendored
69
dist/4khdhub/posts.js
vendored
@@ -1,68 +1 @@
|
||||
"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, page, signal, providerContext, }) {
|
||||
const { getBaseUrl, cheerio } = providerContext;
|
||||
const baseUrl = yield getBaseUrl("4khdhub");
|
||||
const url = `${baseUrl + filter}/page/${page}.html`;
|
||||
console.log("4khdhubGetPosts url", url);
|
||||
return posts({ url, signal, cheerio });
|
||||
});
|
||||
};
|
||||
exports.getPosts = getPosts;
|
||||
const getSearchPosts = function (_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ searchQuery, page, signal, providerContext, }) {
|
||||
const { getBaseUrl, cheerio } = providerContext;
|
||||
const baseUrl = yield getBaseUrl("4khdhub");
|
||||
const url = `${baseUrl}/page/${page}.html?s=${searchQuery}`;
|
||||
return posts({ url, signal, cheerio });
|
||||
});
|
||||
};
|
||||
exports.getSearchPosts = getSearchPosts;
|
||||
function posts(_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ url, signal, cheerio, }) {
|
||||
try {
|
||||
const res = yield fetch(url, { signal });
|
||||
const data = yield res.text();
|
||||
const $ = cheerio.load(data);
|
||||
const catalog = [];
|
||||
$(".card-grid")
|
||||
.children()
|
||||
.map((i, element) => {
|
||||
const title = $(element).find(".movie-card-title").text();
|
||||
const link = $(element).attr("href");
|
||||
const image = $(element).find("img").attr("src");
|
||||
// console.log(
|
||||
// "4khdhubGetPosts title",
|
||||
// title,
|
||||
// "link",
|
||||
// link,
|
||||
// "image",
|
||||
// image
|
||||
// );
|
||||
if (title && link && image) {
|
||||
catalog.push({
|
||||
title: title,
|
||||
link: link,
|
||||
image: image,
|
||||
});
|
||||
}
|
||||
});
|
||||
return catalog;
|
||||
}
|
||||
catch (err) {
|
||||
console.error("4khdhubGetPosts error ", err);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
}
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))(function(i,o){function s(t){try{c(n.next(t))}catch(t){o(t)}}function a(t){try{c(n.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r(function(t){t(e)})).then(s,a)}c((n=n.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,page:e,signal:r,providerContext:n}){const{getBaseUrl:i,cheerio:o}=n;return posts({url:`${(yield i("4khdhub"))+t}/page/${e}.html`,signal:r,cheerio:o})})};exports.getPosts=getPosts;const getSearchPosts=function(t){return __awaiter(this,arguments,void 0,function*({searchQuery:t,page:e,signal:r,providerContext:n}){const{getBaseUrl:i,cheerio:o}=n;return posts({url:`${yield i("4khdhub")}/page/${e}.html?s=${t}`,signal:r,cheerio:o})})};function posts(t){return __awaiter(this,arguments,void 0,function*({url:t,signal:e,cheerio:r}){try{const n=yield fetch(t,{signal:e}),i=yield n.text(),o=r.load(i),s=[];return o(".card-grid").children().map((t,e)=>{const r=o(e).find(".movie-card-title").text(),n=o(e).attr("href"),i=o(e).find("img").attr("src");r&&n&&i&&s.push({title:r,link:n,image:i})}),s}catch(t){return[]}})}exports.getSearchPosts=getSearchPosts;
|
||||
165
dist/4khdhub/stream.js
vendored
165
dist/4khdhub/stream.js
vendored
@@ -1,164 +1 @@
|
||||
"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 = getStream;
|
||||
exports.getRedirectLinks = getRedirectLinks;
|
||||
exports.decodeString = decodeString;
|
||||
function getStream(_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ link, signal, providerContext, }) {
|
||||
var _b, _c, _d, _e;
|
||||
const { axios, cheerio, extractors, commonHeaders: headers, } = providerContext;
|
||||
const { hubcloudExtracter } = extractors;
|
||||
let hubdriveLink = "";
|
||||
if (link.includes("hubdrive")) {
|
||||
const hubdriveRes = yield axios.get(link, { headers, signal });
|
||||
const hubdriveText = hubdriveRes.data;
|
||||
const $ = cheerio.load(hubdriveText);
|
||||
hubdriveLink =
|
||||
$(".btn.btn-primary.btn-user.btn-success1.m-1").attr("href") || link;
|
||||
}
|
||||
else {
|
||||
const res = yield axios.get(link, { headers, signal });
|
||||
const text = res.data;
|
||||
const encryptedString = (_d = (_c = (_b = text.split("s('o','")) === null || _b === void 0 ? void 0 : _b[1]) === null || _c === void 0 ? void 0 : _c.split("',180")) === null || _d === void 0 ? void 0 : _d[0];
|
||||
const decodedString = decodeString(encryptedString);
|
||||
link = atob(decodedString === null || decodedString === void 0 ? void 0 : decodedString.o);
|
||||
const redirectLink = yield getRedirectLinks(link, signal, headers);
|
||||
const redirectLinkRes = yield axios.get(redirectLink, { headers, signal });
|
||||
const redirectLinkText = redirectLinkRes.data;
|
||||
const $ = cheerio.load(redirectLinkText);
|
||||
hubdriveLink =
|
||||
$('h3:contains("1080p")').find("a").attr("href") ||
|
||||
redirectLinkText.match(/href="(https:\/\/hubcloud\.[^\/]+\/drive\/[^"]+)"/)[1];
|
||||
if (hubdriveLink.includes("hubdrive")) {
|
||||
const hubdriveRes = yield axios.get(hubdriveLink, { headers, signal });
|
||||
const hubdriveText = hubdriveRes.data;
|
||||
const $$ = cheerio.load(hubdriveText);
|
||||
hubdriveLink =
|
||||
$$(".btn.btn-primary.btn-user.btn-success1.m-1").attr("href") ||
|
||||
hubdriveLink;
|
||||
}
|
||||
}
|
||||
const hubdriveLinkRes = yield axios.get(hubdriveLink, { headers, signal });
|
||||
const hubcloudText = hubdriveLinkRes.data;
|
||||
const hubcloudLink = ((_e = hubcloudText.match(/<META HTTP-EQUIV="refresh" content="0; url=([^"]+)">/i)) === null || _e === void 0 ? void 0 : _e[1]) || hubdriveLink;
|
||||
try {
|
||||
return yield hubcloudExtracter(hubcloudLink, signal);
|
||||
}
|
||||
catch (error) {
|
||||
console.log("hd hub 4 getStream error: ", error);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
}
|
||||
const encode = function (value) {
|
||||
return btoa(value.toString());
|
||||
};
|
||||
const decode = function (value) {
|
||||
if (value === undefined) {
|
||||
return "";
|
||||
}
|
||||
return atob(value.toString());
|
||||
};
|
||||
const pen = function (value) {
|
||||
return value.replace(/[a-zA-Z]/g, function (_0x1a470e) {
|
||||
return String.fromCharCode((_0x1a470e <= "Z" ? 90 : 122) >=
|
||||
(_0x1a470e = _0x1a470e.charCodeAt(0) + 13)
|
||||
? _0x1a470e
|
||||
: _0x1a470e - 26);
|
||||
});
|
||||
};
|
||||
const abortableTimeout = (ms, { signal } = {}) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (signal && signal.aborted) {
|
||||
return reject(new Error("Aborted"));
|
||||
}
|
||||
const timer = setTimeout(resolve, ms);
|
||||
if (signal) {
|
||||
signal.addEventListener("abort", () => {
|
||||
clearTimeout(timer);
|
||||
reject(new Error("Aborted"));
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
function getRedirectLinks(link, signal, headers) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
try {
|
||||
const res = yield fetch(link, { headers, signal });
|
||||
const resText = yield res.text();
|
||||
var regex = /ck\('_wp_http_\d+','([^']+)'/g;
|
||||
var combinedString = "";
|
||||
var match;
|
||||
while ((match = regex.exec(resText)) !== null) {
|
||||
// console.log(match[1]);
|
||||
combinedString += match[1];
|
||||
}
|
||||
// console.log(decode(combinedString));
|
||||
const decodedString = decode(pen(decode(decode(combinedString))));
|
||||
// console.log(decodedString);
|
||||
const data = JSON.parse(decodedString);
|
||||
console.log(data);
|
||||
const token = encode(data === null || data === void 0 ? void 0 : data.data);
|
||||
const blogLink = (data === null || data === void 0 ? void 0 : data.wp_http1) + "?re=" + token;
|
||||
// abort timeout on signal
|
||||
let wait = abortableTimeout((Number(data === null || data === void 0 ? void 0 : data.total_time) + 3) * 1000, {
|
||||
signal,
|
||||
});
|
||||
yield wait;
|
||||
console.log("blogLink", blogLink);
|
||||
let vcloudLink = "Invalid Request";
|
||||
while (vcloudLink.includes("Invalid Request")) {
|
||||
const blogRes = yield fetch(blogLink, { headers, signal });
|
||||
const blogResText = (yield blogRes.text());
|
||||
if (blogResText.includes("Invalid Request")) {
|
||||
console.log(blogResText);
|
||||
}
|
||||
else {
|
||||
vcloudLink = blogResText.match(/var reurl = "([^"]+)"/) || "";
|
||||
break;
|
||||
}
|
||||
}
|
||||
// console.log('vcloudLink', vcloudLink?.[1]);
|
||||
return blogLink || link;
|
||||
}
|
||||
catch (err) {
|
||||
console.log("Error in getRedirectLinks", err);
|
||||
return link;
|
||||
}
|
||||
});
|
||||
}
|
||||
function rot13(str) {
|
||||
return str.replace(/[a-zA-Z]/g, function (char) {
|
||||
const charCode = char.charCodeAt(0);
|
||||
const isUpperCase = char <= "Z";
|
||||
const baseCharCode = isUpperCase ? 65 : 97;
|
||||
return String.fromCharCode(((charCode - baseCharCode + 13) % 26) + baseCharCode);
|
||||
});
|
||||
}
|
||||
function decodeString(encryptedString) {
|
||||
try {
|
||||
// First base64 decode
|
||||
let decoded = atob(encryptedString);
|
||||
// Second base64 decode
|
||||
decoded = atob(decoded);
|
||||
// ROT13 decode
|
||||
decoded = rot13(decoded);
|
||||
// Third base64 decode
|
||||
decoded = atob(decoded);
|
||||
// Parse JSON
|
||||
return JSON.parse(decoded);
|
||||
}
|
||||
catch (error) {
|
||||
console.error("Error decoding string:", error);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{c(n.next(e))}catch(e){o(e)}}function d(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,d)}c((n=n.apply(e,t||[])).next())})};function getStream(e){return __awaiter(this,arguments,void 0,function*({link:e,signal:t,providerContext:r}){var n,i,o,a;const{axios:d,cheerio:c,extractors:s,commonHeaders:l}=r,{hubcloudExtracter:u}=s;let h="";if(e.includes("hubdrive")){const r=(yield d.get(e,{headers:l,signal:t})).data;h=c.load(r)(".btn.btn-primary.btn-user.btn-success1.m-1").attr("href")||e}else{const r=decodeString(null===(o=null===(i=null===(n=(yield d.get(e,{headers:l,signal:t})).data.split("s('o','"))||void 0===n?void 0:n[1])||void 0===i?void 0:i.split("',180"))||void 0===o?void 0:o[0]);e=atob(null==r?void 0:r.o);const a=yield getRedirectLinks(e,t,l),s=(yield d.get(a,{headers:l,signal:t})).data;if(h=c.load(s)('h3:contains("1080p")').find("a").attr("href")||s.match(/href="(https:\/\/hubcloud\.[^\/]+\/drive\/[^"]+)"/)[1],h.includes("hubdrive")){const e=(yield d.get(h,{headers:l,signal:t})).data;h=c.load(e)(".btn.btn-primary.btn-user.btn-success1.m-1").attr("href")||h}}const f=(null===(a=(yield d.get(h,{headers:l,signal:t})).data.match(/<META HTTP-EQUIV="refresh" content="0; url=([^"]+)">/i))||void 0===a?void 0:a[1])||h;try{return yield u(f,t)}catch(e){return[]}})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.getStream=getStream,exports.getRedirectLinks=getRedirectLinks,exports.decodeString=decodeString;const encode=function(e){return btoa(e.toString())},decode=function(e){return void 0===e?"":atob(e.toString())},pen=function(e){return e.replace(/[a-zA-Z]/g,function(e){return String.fromCharCode((e<="Z"?90:122)>=(e=e.charCodeAt(0)+13)?e:e-26)})},abortableTimeout=(e,{signal:t}={})=>new Promise((r,n)=>{if(t&&t.aborted)return n(new Error("Aborted"));const i=setTimeout(r,e);t&&t.addEventListener("abort",()=>{clearTimeout(i),n(new Error("Aborted"))})});function getRedirectLinks(e,t,r){return __awaiter(this,void 0,void 0,function*(){try{const a=yield fetch(e,{headers:r,signal:t}),d=yield a.text();for(var n,i=/ck\('_wp_http_\d+','([^']+)'/g,o="";null!==(n=i.exec(d));)o+=n[1];const c=decode(pen(decode(decode(o)))),s=JSON.parse(c),l=encode(null==s?void 0:s.data),u=(null==s?void 0:s.wp_http1)+"?re="+l;let h=abortableTimeout(1e3*(Number(null==s?void 0:s.total_time)+3),{signal:t});yield h;let f="Invalid Request";for(;f.includes("Invalid Request");){const e=yield fetch(u,{headers:r,signal:t}),n=yield e.text();if(!n.includes("Invalid Request")){f=n.match(/var reurl = "([^"]+)"/)||"";break}}return u||e}catch(t){return e}})}function rot13(e){return e.replace(/[a-zA-Z]/g,function(e){const t=e.charCodeAt(0),r=e<="Z"?65:97;return String.fromCharCode((t-r+13)%26+r)})}function decodeString(e){try{let t=atob(e);return t=atob(t),t=rot13(t),t=atob(t),JSON.parse(t)}catch(e){return null}}
|
||||
23
dist/autoEmbed/catalog.js
vendored
23
dist/autoEmbed/catalog.js
vendored
@@ -1,22 +1 @@
|
||||
"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: "Popular TV Shows",
|
||||
filter: "/top/catalog/series/top.json",
|
||||
},
|
||||
{
|
||||
title: "Featured Movies",
|
||||
filter: "/imdbRating/catalog/movie/imdbRating.json",
|
||||
},
|
||||
{
|
||||
title: "Featured TV Shows",
|
||||
filter: "/imdbRating/catalog/series/imdbRating.json",
|
||||
},
|
||||
];
|
||||
exports.genres = [];
|
||||
"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:"Popular TV Shows",filter:"/top/catalog/series/top.json"},{title:"Featured Movies",filter:"/imdbRating/catalog/movie/imdbRating.json"},{title:"Featured TV Shows",filter:"/imdbRating/catalog/series/imdbRating.json"}],exports.genres=[];
|
||||
100
dist/autoEmbed/meta.js
vendored
100
dist/autoEmbed/meta.js
vendored
@@ -1,99 +1 @@
|
||||
"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;
|
||||
"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;
|
||||
103
dist/autoEmbed/posts.js
vendored
103
dist/autoEmbed/posts.js
vendored
@@ -1,102 +1 @@
|
||||
"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,
|
||||
// providerValue,
|
||||
signal, providerContext, }) {
|
||||
try {
|
||||
if (page > 1) {
|
||||
return [];
|
||||
}
|
||||
const catalog = [];
|
||||
const url1 = `https://v3-cinemeta.strem.io/catalog/series/top/search=${encodeURI(searchQuery)}.json`;
|
||||
const url2 = `https://v3-cinemeta.strem.io/catalog/movie/top/search=${encodeURI(searchQuery)}.json`;
|
||||
const res = yield providerContext.axios.get(url1, {
|
||||
headers: providerContext.commonHeaders,
|
||||
signal,
|
||||
});
|
||||
const data = res.data;
|
||||
data === null || data === void 0 ? void 0 : data.metas.map((result) => {
|
||||
const title = 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,
|
||||
});
|
||||
}
|
||||
});
|
||||
const res2 = yield providerContext.axios.get(url2, {
|
||||
headers: providerContext.commonHeaders,
|
||||
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;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))(function(i,s){function a(t){try{l(o.next(t))}catch(t){s(t)}}function r(t){try{l(o.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,r)}l((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{if(e>1)return[];const i=[],s=`https://v3-cinemeta.strem.io/catalog/series/top/search=${encodeURI(t)}.json`,a=`https://v3-cinemeta.strem.io/catalog/movie/top/search=${encodeURI(t)}.json`,r=(yield o.axios.get(s,{headers:o.commonHeaders,signal:n})).data;null==r||r.metas.map(t=>{const e=t.name||"",n=(null==t?void 0:t.imdb_id)||(null==t?void 0:t.id),o=null==t?void 0:t.poster,s=null==t?void 0:t.type;n&&i.push({title:e,link:`https://v3-cinemeta.strem.io/meta/${s}/${n}.json`,image:o})});const l=(yield o.axios.get(a,{headers:o.commonHeaders,signal:n})).data;return null==l||l.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,s=null==t?void 0:t.type;n&&i.push({title:e,link:`https://v3-cinemeta.strem.io/meta/${s}/${n}.json`,image:o})}),i}catch(t){return[]}})};exports.getSearchPosts=getSearchPosts;
|
||||
235
dist/autoEmbed/stream.js
vendored
235
dist/autoEmbed/stream.js
vendored
@@ -1,234 +1 @@
|
||||
"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;
|
||||
exports.getRiveStream = getRiveStream;
|
||||
const getStream = (_a) => __awaiter(void 0, [_a], void 0, function* ({ link: id, type, providerContext, }) {
|
||||
try {
|
||||
const streams = [];
|
||||
const { imdbId, season, episode, title, tmdbId, year } = JSON.parse(id);
|
||||
yield getRiveStream(tmdbId, episode, season, type, streams, providerContext);
|
||||
return streams;
|
||||
}
|
||||
catch (err) {
|
||||
console.error(err);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
exports.getStream = getStream;
|
||||
function getRiveStream(tmdId, episode, season, type, Streams, providerContext) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const secret = generateSecretKey(Number(tmdId));
|
||||
const servers = [
|
||||
"flowcast",
|
||||
"shadow",
|
||||
"asiacloud",
|
||||
"hindicast",
|
||||
"anime",
|
||||
"animez",
|
||||
"guard",
|
||||
"curve",
|
||||
"hq",
|
||||
"ninja",
|
||||
"alpha",
|
||||
"kaze",
|
||||
"zenesis",
|
||||
"genesis",
|
||||
"zenith",
|
||||
"ghost",
|
||||
"halo",
|
||||
"kinoecho",
|
||||
"ee3",
|
||||
"volt",
|
||||
"putafilme",
|
||||
"ophim",
|
||||
"kage",
|
||||
];
|
||||
const baseUrl = yield providerContext.getBaseUrl("rive");
|
||||
const cors = process.env.CORS_PRXY ? process.env.CORS_PRXY + "?url=" : "";
|
||||
console.log("CORS: " + cors);
|
||||
const route = type === "series"
|
||||
? `/api/backendfetch?requestID=tvVideoProvider&id=${tmdId}&season=${season}&episode=${episode}&secretKey=${secret}&service=`
|
||||
: `/api/backendfetch?requestID=movieVideoProvider&id=${tmdId}&secretKey=${secret}&service=`;
|
||||
const url = cors
|
||||
? cors + encodeURIComponent(baseUrl + route)
|
||||
: baseUrl + route;
|
||||
yield Promise.all(servers.map((server) => __awaiter(this, void 0, void 0, function* () {
|
||||
var _a, _b, _c, _d, _e, _f;
|
||||
console.log("Rive: " + url + server);
|
||||
try {
|
||||
const res = yield providerContext.axios.get(url + server, {
|
||||
timeout: 4000,
|
||||
headers: providerContext.commonHeaders,
|
||||
});
|
||||
const subtitles = [];
|
||||
if ((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.captions) {
|
||||
(_d = (_c = res.data) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.captions.forEach((sub) => {
|
||||
var _a, _b;
|
||||
subtitles.push({
|
||||
language: ((_a = sub === null || sub === void 0 ? void 0 : sub.label) === null || _a === void 0 ? void 0 : _a.slice(0, 2)) || "Und",
|
||||
uri: sub === null || sub === void 0 ? void 0 : sub.file,
|
||||
title: (sub === null || sub === void 0 ? void 0 : sub.label) || "Undefined",
|
||||
type: ((_b = sub === null || sub === void 0 ? void 0 : sub.file) === null || _b === void 0 ? void 0 : _b.endsWith(".vtt"))
|
||||
? "text/vtt"
|
||||
: "application/x-subrip",
|
||||
});
|
||||
});
|
||||
}
|
||||
(_f = (_e = res.data) === null || _e === void 0 ? void 0 : _e.data) === null || _f === void 0 ? void 0 : _f.sources.forEach((source) => {
|
||||
Streams.push({
|
||||
server: (source === null || source === void 0 ? void 0 : source.source) + "-" + (source === null || source === void 0 ? void 0 : source.quality),
|
||||
link: source === null || source === void 0 ? void 0 : source.url,
|
||||
type: (source === null || source === void 0 ? void 0 : source.format) === "hls" ? "m3u8" : "mp4",
|
||||
quality: source === null || source === void 0 ? void 0 : source.quality,
|
||||
subtitles: subtitles,
|
||||
});
|
||||
});
|
||||
}
|
||||
catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
})));
|
||||
});
|
||||
}
|
||||
function generateSecretKey(id) {
|
||||
// Array of secret key fragments - updated array from the new implementation
|
||||
const c = [
|
||||
"Yhv40uKAZa",
|
||||
"nn8YU4yBA",
|
||||
"uNeH",
|
||||
"ehK",
|
||||
"jT0",
|
||||
"n5G",
|
||||
"99R",
|
||||
"MvB1M",
|
||||
"DQtPCh",
|
||||
"GBRjk4k4I",
|
||||
"CzIOoa95UT",
|
||||
"BLE8s",
|
||||
"GDZlc7",
|
||||
"Fz45T",
|
||||
"JW6lWn",
|
||||
"DE3g4uw0i",
|
||||
"18KxmYizv",
|
||||
"8ji",
|
||||
"JUDdNMnZ",
|
||||
"oGpBippPgm",
|
||||
"7De8Pg",
|
||||
"Zv6",
|
||||
"VHT9TVN",
|
||||
"bYH6m",
|
||||
"aK1",
|
||||
"WcWH6jU",
|
||||
"Q47YEMi4k",
|
||||
"vRD3A",
|
||||
"CGOsfJO",
|
||||
"BLn8",
|
||||
"RgK0drv7l",
|
||||
"oPTfGCn3a",
|
||||
"MkpMDkttW9",
|
||||
"VNI1fPM",
|
||||
"XNFi6",
|
||||
"6cq",
|
||||
"4LvTksXoEI",
|
||||
"1rRa2KOZB0",
|
||||
"zoOGRb8HT2",
|
||||
"mhcXDtvz",
|
||||
"NUmexFY2Ur",
|
||||
"6BIMdvSZ",
|
||||
"Tr0zU2vjRd",
|
||||
"QPR",
|
||||
"fhOqJR",
|
||||
"R9VnFY",
|
||||
"xkZ99D6S",
|
||||
"umY7E",
|
||||
"5Ds8qyDq",
|
||||
"Cc6jy09y3",
|
||||
"yvU3iR",
|
||||
"Bg07zY",
|
||||
"GccECglg",
|
||||
"VYd",
|
||||
"6vOiXqz",
|
||||
"7xX",
|
||||
"UdRrbEzF",
|
||||
"fE6wc",
|
||||
"BUd25Rb",
|
||||
"lxq5Zum89o",
|
||||
];
|
||||
// Handle undefined input
|
||||
if (id === undefined) {
|
||||
return "rive";
|
||||
}
|
||||
try {
|
||||
let fragment, insertPos;
|
||||
// Convert input to string
|
||||
const idStr = String(id);
|
||||
// Updated string hash function to match the new implementation
|
||||
/* eslint-disable no-bitwise */
|
||||
const generateStringHash = function (input) {
|
||||
input = String(input);
|
||||
let hash = 0;
|
||||
for (let i = 0; i < input.length; i++) {
|
||||
const char = input.charCodeAt(i);
|
||||
hash =
|
||||
((char + (hash << 6) + (hash << 16) - hash) ^ (char << i % 5)) >>> 0;
|
||||
}
|
||||
hash ^= hash >>> 13;
|
||||
hash = (1540483477 * hash) >>> 0;
|
||||
return (hash ^= hash >>> 15).toString(16).padStart(8, "0");
|
||||
};
|
||||
// Updated MurmurHash-like function to match the new implementation
|
||||
const applyMurmurHash = function (input) {
|
||||
const str = String(input);
|
||||
let hash = 3735928559 ^ str.length;
|
||||
for (let i = 0; i < str.length; i++) {
|
||||
let char = str.charCodeAt(i);
|
||||
char ^= ((i + 31) * 131) & 255;
|
||||
hash =
|
||||
(668265261 *
|
||||
(hash = (((hash << 7) | (hash >>> 25)) >>> 0) ^ char)) >>>
|
||||
0;
|
||||
}
|
||||
hash ^= hash >>> 16;
|
||||
hash = (2246822507 * hash) >>> 0;
|
||||
hash ^= hash >>> 13;
|
||||
hash = (3266489909 * hash) >>> 0;
|
||||
return (hash ^= hash >>> 16).toString(16).padStart(8, "0");
|
||||
};
|
||||
/* eslint-enable no-bitwise */
|
||||
// Generate the encoded hash using the new implementation
|
||||
const encodedHash = btoa(applyMurmurHash(generateStringHash(idStr)));
|
||||
// Different handling for non-numeric vs numeric inputs
|
||||
if (isNaN(Number(id))) {
|
||||
// For non-numeric inputs, sum the character codes
|
||||
const charSum = idStr
|
||||
.split("")
|
||||
.reduce((sum, char) => sum + char.charCodeAt(0), 0);
|
||||
// Select array element or fallback to base64 encoded input
|
||||
fragment = c[charSum % c.length] || btoa(idStr);
|
||||
// Calculate insertion position
|
||||
insertPos = Math.floor((charSum % encodedHash.length) / 2);
|
||||
}
|
||||
else {
|
||||
// For numeric inputs, use the number directly
|
||||
const numId = Number(id);
|
||||
fragment = c[numId % c.length] || btoa(idStr);
|
||||
// Calculate insertion position
|
||||
insertPos = Math.floor((numId % encodedHash.length) / 2);
|
||||
}
|
||||
// Construct the final key by inserting the selected value into the base64 string
|
||||
return (encodedHash.slice(0, insertPos) + fragment + encodedHash.slice(insertPos));
|
||||
}
|
||||
catch (error) {
|
||||
// Return fallback value if any errors occur
|
||||
return "topSecret";
|
||||
}
|
||||
}
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,r){function a(e){try{d(n.next(e))}catch(e){r(e)}}function l(e){try{d(n.throw(e))}catch(e){r(e)}}function d(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(a,l)}d((n=n.apply(e,t||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getStream=void 0,exports.getRiveStream=getRiveStream;const getStream=e=>__awaiter(void 0,[e],void 0,function*({link:e,type:t,providerContext:i}){try{const n=[],{imdbId:o,season:r,episode:a,title:l,tmdbId:d,year:s}=JSON.parse(e);return yield getRiveStream(d,a,r,t,n,i),n}catch(e){return[]}});function getRiveStream(e,t,i,n,o,r){return __awaiter(this,void 0,void 0,function*(){const a=generateSecretKey(Number(e)),l=yield r.getBaseUrl("rive"),d=process.env.CORS_PRXY?process.env.CORS_PRXY+"?url=":"",s="series"===n?`/api/backendfetch?requestID=tvVideoProvider&id=${e}&season=${i}&episode=${t}&secretKey=${a}&service=`:`/api/backendfetch?requestID=movieVideoProvider&id=${e}&secretKey=${a}&service=`,c=d?d+encodeURIComponent(l+s):l+s;yield Promise.all(["flowcast","shadow","asiacloud","hindicast","anime","animez","guard","curve","hq","ninja","alpha","kaze","zenesis","genesis","zenith","ghost","halo","kinoecho","ee3","volt","putafilme","ophim","kage"].map(e=>__awaiter(this,void 0,void 0,function*(){var t,i,n,a,l,d;try{const s=yield r.axios.get(c+e,{timeout:4e3,headers:r.commonHeaders}),u=[];(null===(i=null===(t=s.data)||void 0===t?void 0:t.data)||void 0===i?void 0:i.captions)&&(null===(a=null===(n=s.data)||void 0===n?void 0:n.data)||void 0===a||a.captions.forEach(e=>{var t,i;u.push({language:(null===(t=null==e?void 0:e.label)||void 0===t?void 0:t.slice(0,2))||"Und",uri:null==e?void 0:e.file,title:(null==e?void 0:e.label)||"Undefined",type:(null===(i=null==e?void 0:e.file)||void 0===i?void 0:i.endsWith(".vtt"))?"text/vtt":"application/x-subrip"})})),null===(d=null===(l=s.data)||void 0===l?void 0:l.data)||void 0===d||d.sources.forEach(e=>{o.push({server:(null==e?void 0:e.source)+"-"+(null==e?void 0:e.quality),link:null==e?void 0:e.url,type:"hls"===(null==e?void 0:e.format)?"m3u8":"mp4",quality:null==e?void 0:e.quality,subtitles:u})})}catch(e){}})))})}function generateSecretKey(e){const t=["Yhv40uKAZa","nn8YU4yBA","uNeH","ehK","jT0","n5G","99R","MvB1M","DQtPCh","GBRjk4k4I","CzIOoa95UT","BLE8s","GDZlc7","Fz45T","JW6lWn","DE3g4uw0i","18KxmYizv","8ji","JUDdNMnZ","oGpBippPgm","7De8Pg","Zv6","VHT9TVN","bYH6m","aK1","WcWH6jU","Q47YEMi4k","vRD3A","CGOsfJO","BLn8","RgK0drv7l","oPTfGCn3a","MkpMDkttW9","VNI1fPM","XNFi6","6cq","4LvTksXoEI","1rRa2KOZB0","zoOGRb8HT2","mhcXDtvz","NUmexFY2Ur","6BIMdvSZ","Tr0zU2vjRd","QPR","fhOqJR","R9VnFY","xkZ99D6S","umY7E","5Ds8qyDq","Cc6jy09y3","yvU3iR","Bg07zY","GccECglg","VYd","6vOiXqz","7xX","UdRrbEzF","fE6wc","BUd25Rb","lxq5Zum89o"];if(void 0===e)return"rive";try{let i,n;const o=String(e),r=btoa(function(e){const t=String(e);let i=3735928559^t.length;for(let e=0;e<t.length;e++){let n=t.charCodeAt(e);n^=131*(e+31)&255,i=668265261*(i=(i<<7|i>>>25)>>>0^n)>>>0}return i^=i>>>16,i=2246822507*i>>>0,i^=i>>>13,i=3266489909*i>>>0,(i^=i>>>16).toString(16).padStart(8,"0")}(function(e){e=String(e);let t=0;for(let i=0;i<e.length;i++){const n=e.charCodeAt(i);t=(n+(t<<6)+(t<<16)-t^n<<i%5)>>>0}return t^=t>>>13,t=1540483477*t>>>0,(t^=t>>>15).toString(16).padStart(8,"0")}(o)));if(isNaN(Number(e))){const e=o.split("").reduce((e,t)=>e+t.charCodeAt(0),0);i=t[e%t.length]||btoa(o),n=Math.floor(e%r.length/2)}else{const a=Number(e);i=t[a%t.length]||btoa(o),n=Math.floor(a%r.length/2)}return r.slice(0,n)+i+r.slice(n)}catch(e){return"topSecret"}}exports.getStream=getStream;
|
||||
23
dist/cinemaLuxe/catalog.js
vendored
23
dist/cinemaLuxe/catalog.js
vendored
@@ -1,22 +1 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.genres = exports.catalog = void 0;
|
||||
exports.catalog = [
|
||||
{
|
||||
title: "Trending",
|
||||
filter: "/genre/latest-trending-releases/",
|
||||
},
|
||||
{
|
||||
title: "Netflix",
|
||||
filter: "/network/netflix/",
|
||||
},
|
||||
{
|
||||
title: "Amazon Prime",
|
||||
filter: "/network/prime-video/",
|
||||
},
|
||||
{
|
||||
title: "Animation",
|
||||
filter: "/genre/anime/",
|
||||
},
|
||||
];
|
||||
exports.genres = [];
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.genres=exports.catalog=void 0,exports.catalog=[{title:"Trending",filter:"/genre/latest-trending-releases/"},{title:"Netflix",filter:"/network/netflix/"},{title:"Amazon Prime",filter:"/network/prime-video/"},{title:"Animation",filter:"/genre/anime/"}],exports.genres=[];
|
||||
78
dist/cinemaLuxe/episodes.js
vendored
78
dist/cinemaLuxe/episodes.js
vendored
@@ -1,77 +1 @@
|
||||
"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.getEpisodes = void 0;
|
||||
const getEpisodes = function (_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ url, providerContext, }) {
|
||||
var _b;
|
||||
try {
|
||||
if (!url.includes("luxelinks") || url.includes("cinemalux")) {
|
||||
const res = yield providerContext.axios.get(url, {
|
||||
headers: providerContext.commonHeaders,
|
||||
});
|
||||
const data = res.data;
|
||||
const encodedLink = (_b = data.match(/"link":"([^"]+)"/)) === null || _b === void 0 ? void 0 : _b[1];
|
||||
if (encodedLink) {
|
||||
url = encodedLink ? atob(encodedLink) : url;
|
||||
}
|
||||
else {
|
||||
const redirectUrlRes = yield fetch("https://ext.8man.me/api/cinemaluxe", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: JSON.stringify({ url }),
|
||||
});
|
||||
const redirectUrl = yield redirectUrlRes.json();
|
||||
url = (redirectUrl === null || redirectUrl === void 0 ? void 0 : redirectUrl.redirectUrl) || url;
|
||||
}
|
||||
}
|
||||
const episodeLinks = [];
|
||||
if (url.includes("luxedrive") || url.includes("drive.linkstore")) {
|
||||
episodeLinks.push({
|
||||
title: "Movie",
|
||||
link: url,
|
||||
});
|
||||
return episodeLinks;
|
||||
}
|
||||
const res = yield providerContext.axios.get(url, {
|
||||
headers: providerContext.commonHeaders,
|
||||
});
|
||||
const html = res.data;
|
||||
let $ = providerContext.cheerio.load(html);
|
||||
$("a.maxbutton-4,a.maxbutton,.maxbutton-hubcloud,.ep-simple-button").map((i, element) => {
|
||||
var _a;
|
||||
const title = (_a = $(element).text()) === null || _a === void 0 ? void 0 : _a.trim();
|
||||
const link = $(element).attr("href");
|
||||
if (title &&
|
||||
link &&
|
||||
!title.includes("Batch") &&
|
||||
!title.toLowerCase().includes("zip")) {
|
||||
episodeLinks.push({
|
||||
title: title
|
||||
.replace(/\(\d{4}\)/, "")
|
||||
.replace("Download", "Movie")
|
||||
.replace("⚡", "")
|
||||
.trim(),
|
||||
link,
|
||||
});
|
||||
}
|
||||
});
|
||||
return episodeLinks;
|
||||
}
|
||||
catch (err) {
|
||||
console.error("cl episode links", err);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getEpisodes = getEpisodes;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,r){function a(e){try{l(n.next(e))}catch(e){r(e)}}function s(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(a,s)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getEpisodes=void 0;const getEpisodes=function(e){return __awaiter(this,arguments,void 0,function*({url:e,providerContext:t}){var i;try{if(!e.includes("luxelinks")||e.includes("cinemalux")){const n=yield t.axios.get(e,{headers:t.commonHeaders}),o=null===(i=n.data.match(/"link":"([^"]+)"/))||void 0===i?void 0:i[1];if(o)e=o?atob(o):e;else{const t=yield fetch("https://ext.8man.me/api/cinemaluxe",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:e})}),i=yield t.json();e=(null==i?void 0:i.redirectUrl)||e}}const n=[];if(e.includes("luxedrive")||e.includes("drive.linkstore"))return n.push({title:"Movie",link:e}),n;const o=(yield t.axios.get(e,{headers:t.commonHeaders})).data;let r=t.cheerio.load(o);return r("a.maxbutton-4,a.maxbutton,.maxbutton-hubcloud,.ep-simple-button").map((e,t)=>{var i;const o=null===(i=r(t).text())||void 0===i?void 0:i.trim(),a=r(t).attr("href");o&&a&&!o.includes("Batch")&&!o.toLowerCase().includes("zip")&&n.push({title:o.replace(/\(\d{4}\)/,"").replace("Download","Movie").replace("⚡","").trim(),link:a})}),n}catch(e){return[]}})};exports.getEpisodes=getEpisodes;
|
||||
107
dist/cinemaLuxe/meta.js
vendored
107
dist/cinemaLuxe/meta.js
vendored
@@ -1,106 +1 @@
|
||||
"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, }) {
|
||||
try {
|
||||
const url = link;
|
||||
const res = yield providerContext.axios.get(url, {
|
||||
headers: providerContext.commonHeaders,
|
||||
});
|
||||
const data = res.data;
|
||||
const $ = providerContext.cheerio.load(data);
|
||||
const type = url.includes("tvshows") ? "series" : "movie";
|
||||
const imdbId = "";
|
||||
const title = url.split("/")[4].replace(/-/g, " ");
|
||||
const image = $(".g-item").find("a").attr("href") || "";
|
||||
const synopsis = $(".wp-content").text().trim();
|
||||
const tags = $(".sgeneros")
|
||||
.children()
|
||||
.map((i, element) => $(element).text())
|
||||
.get()
|
||||
.slice(3);
|
||||
const rating = Number($("#repimdb").find("strong").text())
|
||||
.toFixed(1)
|
||||
.toString();
|
||||
const links = [];
|
||||
$(".custom-links")
|
||||
.find(".ep-button-container")
|
||||
.map((i, element) => {
|
||||
var _a;
|
||||
const title = $(element)
|
||||
.text()
|
||||
.replace("\u2b07Download", "")
|
||||
.replace("\u2b07 Download", "")
|
||||
.trim();
|
||||
const link = $(element).find("a").attr("href");
|
||||
if (title && link) {
|
||||
links.push({
|
||||
title,
|
||||
episodesLink: link,
|
||||
quality: ((_a = title === null || title === void 0 ? void 0 : title.match(/\d+P\b/)) === null || _a === void 0 ? void 0 : _a[0].replace("P", "p")) || "",
|
||||
});
|
||||
}
|
||||
});
|
||||
if (links.length === 0) {
|
||||
$(".ep-button-container:not(:has(a:contains('Click Here To Visit')))").map((i, element) => {
|
||||
var _a;
|
||||
let title = $(element)
|
||||
.find("a")
|
||||
.text()
|
||||
.replace("\u2b07Download", "")
|
||||
.replace("\u2b07 Download", "")
|
||||
.trim();
|
||||
if (title.includes("Download Now")) {
|
||||
title = $(element)
|
||||
.parent()
|
||||
.find("h3")
|
||||
.text()
|
||||
.trim()
|
||||
.replace("\u2b07Download", "")
|
||||
.replace("\u2b07 Download", "");
|
||||
}
|
||||
const link = $(element).find("a").attr("href");
|
||||
if (title && link) {
|
||||
links.push({
|
||||
title,
|
||||
episodesLink: link,
|
||||
quality: ((_a = title === null || title === void 0 ? void 0 : title.match(/\d+P\b/)) === null || _a === void 0 ? void 0 : _a[0].replace("P", "p")) || "",
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
return {
|
||||
title,
|
||||
tags,
|
||||
rating,
|
||||
synopsis,
|
||||
image,
|
||||
imdbId,
|
||||
type,
|
||||
linkList: links,
|
||||
};
|
||||
}
|
||||
catch (err) {
|
||||
console.error(err);
|
||||
return {
|
||||
title: "",
|
||||
synopsis: "",
|
||||
image: "",
|
||||
imdbId: "",
|
||||
type: "movie",
|
||||
linkList: [],
|
||||
};
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getMeta = getMeta;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,i,n){return new(i||(i=Promise))(function(o,a){function r(t){try{s(n.next(t))}catch(t){a(t)}}function l(t){try{s(n.throw(t))}catch(t){a(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(r,l)}s((n=n.apply(t,e||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getMeta=void 0;const getMeta=function(t){return __awaiter(this,arguments,void 0,function*({link:t,providerContext:e}){try{const i=t,n=(yield e.axios.get(i,{headers:e.commonHeaders})).data,o=e.cheerio.load(n),a=i.includes("tvshows")?"series":"movie",r="",l=i.split("/")[4].replace(/-/g," "),s=o(".g-item").find("a").attr("href")||"",c=o(".wp-content").text().trim(),d=o(".sgeneros").children().map((t,e)=>o(e).text()).get().slice(3),p=Number(o("#repimdb").find("strong").text()).toFixed(1).toString(),u=[];return o(".custom-links").find(".ep-button-container").map((t,e)=>{var i;const n=o(e).text().replace("⬇Download","").replace("⬇ Download","").trim(),a=o(e).find("a").attr("href");n&&a&&u.push({title:n,episodesLink:a,quality:(null===(i=null==n?void 0:n.match(/\d+P\b/))||void 0===i?void 0:i[0].replace("P","p"))||""})}),0===u.length&&o(".ep-button-container:not(:has(a:contains('Click Here To Visit')))").map((t,e)=>{var i;let n=o(e).find("a").text().replace("⬇Download","").replace("⬇ Download","").trim();n.includes("Download Now")&&(n=o(e).parent().find("h3").text().trim().replace("⬇Download","").replace("⬇ Download",""));const a=o(e).find("a").attr("href");n&&a&&u.push({title:n,episodesLink:a,quality:(null===(i=null==n?void 0:n.match(/\d+P\b/))||void 0===i?void 0:i[0].replace("P","p"))||""})}),{title:l,tags:d,rating:p,synopsis:c,image:s,imdbId:r,type:a,linkList:u}}catch(t){return{title:"",synopsis:"",image:"",imdbId:"",type:"movie",linkList:[]}}})};exports.getMeta=getMeta;
|
||||
71
dist/cinemaLuxe/posts.js
vendored
71
dist/cinemaLuxe/posts.js
vendored
@@ -1,70 +1 @@
|
||||
"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, page, signal, providerContext, }) {
|
||||
const baseUrl = yield providerContext.getBaseUrl("cinemaLuxe");
|
||||
const url = `${baseUrl + filter}page/${page}/`;
|
||||
return posts({ url, signal, providerContext });
|
||||
});
|
||||
};
|
||||
exports.getPosts = getPosts;
|
||||
const getSearchPosts = function (_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ searchQuery, page, signal, providerContext, }) {
|
||||
const baseUrl = yield providerContext.getBaseUrl("cinemaLuxe");
|
||||
const url = `${baseUrl}/page/${page}/?s=${searchQuery}`;
|
||||
return posts({ url, signal, providerContext });
|
||||
});
|
||||
};
|
||||
exports.getSearchPosts = getSearchPosts;
|
||||
function posts(_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ url, signal, providerContext, }) {
|
||||
try {
|
||||
const res = yield fetch(url, {
|
||||
headers: providerContext.commonHeaders,
|
||||
signal,
|
||||
});
|
||||
const data = yield res.text();
|
||||
const $ = providerContext.cheerio.load(data);
|
||||
const catalog = [];
|
||||
$(".item.tvshows,.item.movies").map((i, element) => {
|
||||
const title = $(element).find(".poster").find("img").attr("alt");
|
||||
const link = $(element).find(".poster").find("a").attr("href");
|
||||
const image = $(element).find(".poster").find("img").attr("data-src");
|
||||
if (title && link && image) {
|
||||
catalog.push({
|
||||
title: title,
|
||||
link: link,
|
||||
image: image,
|
||||
});
|
||||
}
|
||||
});
|
||||
$(".result-item").map((i, element) => {
|
||||
const title = $(element).find(".thumbnail").find("img").attr("alt");
|
||||
const link = $(element).find(".thumbnail").find("a").attr("href");
|
||||
const image = $(element).find(".thumbnail").find("img").attr("data-src");
|
||||
if (title && link && image) {
|
||||
catalog.push({
|
||||
title: title,
|
||||
link: link,
|
||||
image: image,
|
||||
});
|
||||
}
|
||||
});
|
||||
return catalog;
|
||||
}
|
||||
catch (err) {
|
||||
console.error("cinemaluxe error ", err);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
}
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,i,n){return new(i||(i=Promise))(function(r,s){function a(t){try{c(n.next(t))}catch(t){s(t)}}function o(t){try{c(n.throw(t))}catch(t){s(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(a,o)}c((n=n.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,page:e,signal:i,providerContext:n}){return posts({url:`${(yield n.getBaseUrl("cinemaLuxe"))+t}page/${e}/`,signal:i,providerContext:n})})};exports.getPosts=getPosts;const getSearchPosts=function(t){return __awaiter(this,arguments,void 0,function*({searchQuery:t,page:e,signal:i,providerContext:n}){return posts({url:`${yield n.getBaseUrl("cinemaLuxe")}/page/${e}/?s=${t}`,signal:i,providerContext:n})})};function posts(t){return __awaiter(this,arguments,void 0,function*({url:t,signal:e,providerContext:i}){try{const n=yield fetch(t,{headers:i.commonHeaders,signal:e}),r=yield n.text(),s=i.cheerio.load(r),a=[];return s(".item.tvshows,.item.movies").map((t,e)=>{const i=s(e).find(".poster").find("img").attr("alt"),n=s(e).find(".poster").find("a").attr("href"),r=s(e).find(".poster").find("img").attr("data-src");i&&n&&r&&a.push({title:i,link:n,image:r})}),s(".result-item").map((t,e)=>{const i=s(e).find(".thumbnail").find("img").attr("alt"),n=s(e).find(".thumbnail").find("a").attr("href"),r=s(e).find(".thumbnail").find("img").attr("data-src");i&&n&&r&&a.push({title:i,link:n,image:r})}),a}catch(t){return[]}})}exports.getSearchPosts=getSearchPosts;
|
||||
79
dist/cinemaLuxe/stream.js
vendored
79
dist/cinemaLuxe/stream.js
vendored
@@ -1,78 +1 @@
|
||||
"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 = (_a) => __awaiter(void 0, [_a], void 0, function* ({ link, signal, providerContext, }) {
|
||||
var _b;
|
||||
try {
|
||||
let newLink = link;
|
||||
console.log("getStream 1", link);
|
||||
if (link.includes("linkstore")) {
|
||||
console.log("linkstore detected");
|
||||
const res = yield fetch(link, {
|
||||
signal,
|
||||
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",
|
||||
"accept-language": "en-US,en;q=0.9,en-IN;q=0.8",
|
||||
"cache-control": "no-cache",
|
||||
pragma: "no-cache",
|
||||
priority: "u=0, i",
|
||||
"sec-ch-ua": '"Microsoft Edge";v="137", "Chromium";v="137", "Not/A)Brand";v="24"',
|
||||
"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",
|
||||
cookie: "PHPSESSID=9o57cff841dqtv8djtn1rp1712; ext_name=ojplmecpdpgccookcobabopnaifgidhf",
|
||||
},
|
||||
});
|
||||
const html = yield res.text();
|
||||
const refreshMetaMatch = html.match(/<meta\s+http-equiv="refresh"\s+content="[^"]*url=([^"]+)"/i);
|
||||
if (refreshMetaMatch && refreshMetaMatch[1]) {
|
||||
link = refreshMetaMatch[1];
|
||||
}
|
||||
}
|
||||
else {
|
||||
console.log("linkstore not detected");
|
||||
}
|
||||
console.log("getStream 2", link);
|
||||
if (link.includes("luxedrive")) {
|
||||
const res = yield providerContext.axios.get(link, { signal });
|
||||
const $ = providerContext.cheerio.load(res.data);
|
||||
const hubcloudLink = $("a.btn.hubcloud").attr("href");
|
||||
if (hubcloudLink) {
|
||||
newLink = hubcloudLink;
|
||||
}
|
||||
else {
|
||||
const gdFlixLink = $("a.btn.gdflix").attr("href");
|
||||
if (gdFlixLink) {
|
||||
newLink = gdFlixLink;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (newLink.includes("flix")) {
|
||||
const sreams = yield providerContext.extractors.gdFlixExtracter(newLink, signal);
|
||||
return sreams;
|
||||
}
|
||||
const res2 = yield providerContext.axios.get(newLink, { signal });
|
||||
const data2 = res2.data;
|
||||
const hcLink = ((_b = data2.match(/location\.replace\('([^']+)'/)) === null || _b === void 0 ? void 0 : _b[1]) || newLink;
|
||||
const hubCloudLinks = yield providerContext.extractors.hubcloudExtracter(hcLink.includes("https://hubcloud") ? hcLink : newLink, signal);
|
||||
return hubCloudLinks;
|
||||
}
|
||||
catch (err) {
|
||||
console.error(err);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
exports.getStream = getStream;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(e,t,a,c){return new(a||(a=Promise))(function(i,n){function o(e){try{s(c.next(e))}catch(e){n(e)}}function r(e){try{s(c.throw(e))}catch(e){n(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof a?t:new a(function(e){e(t)})).then(o,r)}s((c=c.apply(e,t||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getStream=void 0;const getStream=e=>__awaiter(void 0,[e],void 0,function*({link:e,signal:t,providerContext:a}){var c;try{let i=e;if(e.includes("linkstore")){const a=yield fetch(e,{signal:t,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","accept-language":"en-US,en;q=0.9,en-IN;q=0.8","cache-control":"no-cache",pragma:"no-cache",priority:"u=0, i","sec-ch-ua":'"Microsoft Edge";v="137", "Chromium";v="137", "Not/A)Brand";v="24"',"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",cookie:"PHPSESSID=9o57cff841dqtv8djtn1rp1712; ext_name=ojplmecpdpgccookcobabopnaifgidhf"}}),c=(yield a.text()).match(/<meta\s+http-equiv="refresh"\s+content="[^"]*url=([^"]+)"/i);c&&c[1]&&(e=c[1])}if(e.includes("luxedrive")){const c=yield a.axios.get(e,{signal:t}),n=a.cheerio.load(c.data),o=n("a.btn.hubcloud").attr("href");if(o)i=o;else{const e=n("a.btn.gdflix").attr("href");e&&(i=e)}}if(i.includes("flix")){return yield a.extractors.gdFlixExtracter(i,t)}const n=yield a.axios.get(i,{signal:t}),o=(null===(c=n.data.match(/location\.replace\('([^']+)'/))||void 0===c?void 0:c[1])||i;return yield a.extractors.hubcloudExtracter(o.includes("https://hubcloud")?o:i,t)}catch(e){return[]}});exports.getStream=getStream;
|
||||
15
dist/dooflix/catalog.js
vendored
15
dist/dooflix/catalog.js
vendored
@@ -1,14 +1 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.genres = exports.catalog = void 0;
|
||||
exports.catalog = [
|
||||
{
|
||||
title: "Series",
|
||||
filter: "/rest-api//v130/tvseries",
|
||||
},
|
||||
{
|
||||
title: "Movies",
|
||||
filter: "/rest-api//v130/movies",
|
||||
},
|
||||
];
|
||||
exports.genres = [];
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.genres=exports.catalog=void 0,exports.catalog=[{title:"Series",filter:"/rest-api//v130/tvseries"},{title:"Movies",filter:"/rest-api//v130/movies"}],exports.genres=[];
|
||||
93
dist/dooflix/meta.js
vendored
93
dist/dooflix/meta.js
vendored
@@ -1,92 +1 @@
|
||||
"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 headers = {
|
||||
"Accept-Encoding": "gzip",
|
||||
"API-KEY": "2pm95lc6prpdbk0ppji9rsqo",
|
||||
Connection: "Keep-Alive",
|
||||
"If-Modified-Since": "Wed, 14 Aug 2024 13:00:04 GMT",
|
||||
"User-Agent": "okhttp/3.14.9",
|
||||
};
|
||||
const getMeta = function (_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ link, providerContext, }) {
|
||||
var _b, _c, _d, _e;
|
||||
try {
|
||||
const { axios } = providerContext;
|
||||
const res = yield axios.get(link, { headers });
|
||||
const resData = res.data;
|
||||
const jsonStart = resData === null || resData === void 0 ? void 0 : resData.indexOf("{");
|
||||
const jsonEnd = (resData === null || resData === void 0 ? void 0 : resData.lastIndexOf("}")) + 1;
|
||||
const data = ((_b = JSON === null || JSON === void 0 ? void 0 : JSON.parse(resData === null || resData === void 0 ? void 0 : resData.substring(jsonStart, jsonEnd))) === null || _b === void 0 ? void 0 : _b.title)
|
||||
? JSON === null || JSON === void 0 ? void 0 : JSON.parse(resData === null || resData === void 0 ? void 0 : resData.substring(jsonStart, jsonEnd))
|
||||
: resData;
|
||||
const title = (data === null || data === void 0 ? void 0 : data.title) || "";
|
||||
const synopsis = (data === null || data === void 0 ? void 0 : data.description) || "";
|
||||
const image = (data === null || data === void 0 ? void 0 : data.poster_url) || "";
|
||||
const cast = (data === null || data === void 0 ? void 0 : data.cast) || [];
|
||||
const rating = (data === null || data === void 0 ? void 0 : data.imdb_rating) || "";
|
||||
const type = Number(data === null || data === void 0 ? void 0 : data.is_tvseries) ? "series" : "movie";
|
||||
const tags = ((_c = data === null || data === void 0 ? void 0 : data.genre) === null || _c === void 0 ? void 0 : _c.map((genre) => genre === null || genre === void 0 ? void 0 : genre.name)) || [];
|
||||
const links = [];
|
||||
if (type === "series") {
|
||||
(_d = data === null || data === void 0 ? void 0 : data.season) === null || _d === void 0 ? void 0 : _d.map((season) => {
|
||||
var _a;
|
||||
const title = (season === null || season === void 0 ? void 0 : season.seasons_name) || "";
|
||||
const directLinks = ((_a = season === null || season === void 0 ? void 0 : season.episodes) === null || _a === void 0 ? void 0 : _a.map((episode) => ({
|
||||
title: episode === null || episode === void 0 ? void 0 : episode.episodes_name,
|
||||
link: episode === null || episode === void 0 ? void 0 : episode.file_url,
|
||||
}))) || [];
|
||||
links.push({
|
||||
title: title,
|
||||
directLinks: directLinks,
|
||||
});
|
||||
});
|
||||
}
|
||||
else {
|
||||
(_e = data === null || data === void 0 ? void 0 : data.videos) === null || _e === void 0 ? void 0 : _e.map((video) => {
|
||||
links.push({
|
||||
title: title + " " + (video === null || video === void 0 ? void 0 : video.label),
|
||||
directLinks: [
|
||||
{
|
||||
title: "Play",
|
||||
link: video === null || video === void 0 ? void 0 : video.file_url,
|
||||
},
|
||||
],
|
||||
});
|
||||
});
|
||||
}
|
||||
return {
|
||||
image: (image === null || image === void 0 ? void 0 : image.includes("https")) ? image : image === null || image === void 0 ? void 0 : image.replace("http", "https"),
|
||||
synopsis: synopsis,
|
||||
title: title,
|
||||
rating: rating,
|
||||
imdbId: "",
|
||||
cast: cast,
|
||||
tags: tags,
|
||||
type: type,
|
||||
linkList: links,
|
||||
};
|
||||
}
|
||||
catch (err) {
|
||||
console.error(err);
|
||||
return {
|
||||
title: "",
|
||||
synopsis: "",
|
||||
image: "",
|
||||
imdbId: "",
|
||||
type: "movie",
|
||||
linkList: [],
|
||||
};
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getMeta = getMeta;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(i,e,t,n){return new(t||(t=Promise))(function(l,o){function d(i){try{u(n.next(i))}catch(i){o(i)}}function s(i){try{u(n.throw(i))}catch(i){o(i)}}function u(i){var e;i.done?l(i.value):(e=i.value,e instanceof t?e:new t(function(i){i(e)})).then(d,s)}u((n=n.apply(i,e||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getMeta=void 0;const headers={"Accept-Encoding":"gzip","API-KEY":"2pm95lc6prpdbk0ppji9rsqo",Connection:"Keep-Alive","If-Modified-Since":"Wed, 14 Aug 2024 13:00:04 GMT","User-Agent":"okhttp/3.14.9"},getMeta=function(i){return __awaiter(this,arguments,void 0,function*({link:i,providerContext:e}){var t,n,l,o;try{const{axios:d}=e,s=(yield d.get(i,{headers:headers})).data,u=null==s?void 0:s.indexOf("{"),r=(null==s?void 0:s.lastIndexOf("}"))+1,a=(null===(t=null===JSON||void 0===JSON?void 0:JSON.parse(null==s?void 0:s.substring(u,r)))||void 0===t?void 0:t.title)?null===JSON||void 0===JSON?void 0:JSON.parse(null==s?void 0:s.substring(u,r)):s,v=(null==a?void 0:a.title)||"",p=(null==a?void 0:a.description)||"",c=(null==a?void 0:a.poster_url)||"",g=(null==a?void 0:a.cast)||[],h=(null==a?void 0:a.imdb_rating)||"",m=Number(null==a?void 0:a.is_tvseries)?"series":"movie",f=(null===(n=null==a?void 0:a.genre)||void 0===n?void 0:n.map(i=>null==i?void 0:i.name))||[],_=[];return"series"===m?null===(l=null==a?void 0:a.season)||void 0===l||l.map(i=>{var e;const t=(null==i?void 0:i.seasons_name)||"",n=(null===(e=null==i?void 0:i.episodes)||void 0===e?void 0:e.map(i=>({title:null==i?void 0:i.episodes_name,link:null==i?void 0:i.file_url})))||[];_.push({title:t,directLinks:n})}):null===(o=null==a?void 0:a.videos)||void 0===o||o.map(i=>{_.push({title:v+" "+(null==i?void 0:i.label),directLinks:[{title:"Play",link:null==i?void 0:i.file_url}]})}),{image:(null==c?void 0:c.includes("https"))?c:null==c?void 0:c.replace("http","https"),synopsis:p,title:v,rating:h,imdbId:"",cast:g,tags:f,type:m,linkList:_}}catch(i){return{title:"",synopsis:"",image:"",imdbId:"",type:"movie",linkList:[]}}})};exports.getMeta=getMeta;
|
||||
155
dist/dooflix/posts.js
vendored
155
dist/dooflix/posts.js
vendored
@@ -1,154 +1 @@
|
||||
"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 headers = {
|
||||
"Accept-Encoding": "gzip",
|
||||
"API-KEY": "2pm95lc6prpdbk0ppji9rsqo",
|
||||
Connection: "Keep-Alive",
|
||||
"If-Modified-Since": "Wed, 14 Aug 2024 13:00:04 GMT",
|
||||
"User-Agent": "okhttp/3.14.9",
|
||||
};
|
||||
const getPosts = function (_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ filter, page, signal, providerContext, }) {
|
||||
try {
|
||||
const { axios, getBaseUrl } = providerContext;
|
||||
const baseUrl = yield getBaseUrl("dooflix");
|
||||
const catalog = [];
|
||||
const url = `${baseUrl + filter + `?page=${page}`}`;
|
||||
const res = yield axios.get(url, { headers, signal });
|
||||
const resData = res.data;
|
||||
if (!resData || typeof resData !== "string") {
|
||||
console.warn("Unexpected response format from dooflix API");
|
||||
return [];
|
||||
}
|
||||
let data;
|
||||
try {
|
||||
const jsonStart = resData.indexOf("[");
|
||||
const jsonEnd = resData.lastIndexOf("]") + 1;
|
||||
if (jsonStart === -1 || jsonEnd <= jsonStart) {
|
||||
// If we can't find valid JSON array markers, try parsing the entire response
|
||||
data = JSON.parse(resData);
|
||||
}
|
||||
else {
|
||||
const jsonSubstring = resData.substring(jsonStart, jsonEnd);
|
||||
const parsedArray = JSON.parse(jsonSubstring);
|
||||
data = parsedArray.length > 0 ? parsedArray : resData;
|
||||
}
|
||||
}
|
||||
catch (parseError) {
|
||||
console.error("Error parsing dooflix response:", parseError);
|
||||
return [];
|
||||
}
|
||||
if (!Array.isArray(data)) {
|
||||
console.warn("Unexpected data format from dooflix API");
|
||||
return [];
|
||||
}
|
||||
data.forEach((result) => {
|
||||
const id = result === null || result === void 0 ? void 0 : result.videos_id;
|
||||
if (!id)
|
||||
return;
|
||||
const type = !(result === null || result === void 0 ? void 0 : result.is_tvseries) ? "tvseries" : "movie";
|
||||
const link = `${baseUrl}/rest-api//v130/single_details?type=${type}&id=${id}`;
|
||||
const thumbnailUrl = result === null || result === void 0 ? void 0 : result.thumbnail_url;
|
||||
const image = (thumbnailUrl === null || thumbnailUrl === void 0 ? void 0 : thumbnailUrl.includes("https"))
|
||||
? thumbnailUrl
|
||||
: thumbnailUrl === null || thumbnailUrl === void 0 ? void 0 : thumbnailUrl.replace("http", "https");
|
||||
catalog.push({
|
||||
title: (result === null || result === void 0 ? void 0 : result.title) || "",
|
||||
link,
|
||||
image,
|
||||
});
|
||||
});
|
||||
return catalog;
|
||||
}
|
||||
catch (err) {
|
||||
console.error("dooflix error:", err);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getPosts = getPosts;
|
||||
const getSearchPosts = function (_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ searchQuery, page, providerContext, signal, }) {
|
||||
var _b, _c;
|
||||
try {
|
||||
if (page > 1) {
|
||||
return [];
|
||||
}
|
||||
const { axios, getBaseUrl } = providerContext;
|
||||
const catalog = [];
|
||||
const baseUrl = yield getBaseUrl("dooflix");
|
||||
const url = `${baseUrl}/rest-api//v130/search?q=${searchQuery}&type=movietvserieslive&range_to=0&range_from=0&tv_category_id=0&genre_id=0&country_id=0`;
|
||||
const res = yield axios.get(url, { headers, signal });
|
||||
const resData = res.data;
|
||||
if (!resData || typeof resData !== "string") {
|
||||
console.warn("Unexpected search response format from dooflix API");
|
||||
return [];
|
||||
}
|
||||
let data;
|
||||
try {
|
||||
const jsonStart = resData.indexOf("{");
|
||||
const jsonEnd = resData.lastIndexOf("}") + 1;
|
||||
if (jsonStart === -1 || jsonEnd <= jsonStart) {
|
||||
data = resData;
|
||||
}
|
||||
else {
|
||||
const jsonSubstring = resData.substring(jsonStart, jsonEnd);
|
||||
const parsedData = JSON.parse(jsonSubstring);
|
||||
data = (parsedData === null || parsedData === void 0 ? void 0 : parsedData.movie) ? parsedData : resData;
|
||||
}
|
||||
}
|
||||
catch (parseError) {
|
||||
console.error("Error parsing dooflix search response:", parseError);
|
||||
return [];
|
||||
}
|
||||
// Process movies
|
||||
(_b = data === null || data === void 0 ? void 0 : data.movie) === null || _b === void 0 ? void 0 : _b.forEach((result) => {
|
||||
const id = result === null || result === void 0 ? void 0 : result.videos_id;
|
||||
if (!id)
|
||||
return;
|
||||
const link = `${baseUrl}/rest-api//v130/single_details?type=movie&id=${id}`;
|
||||
const thumbnailUrl = result === null || result === void 0 ? void 0 : result.thumbnail_url;
|
||||
const image = (thumbnailUrl === null || thumbnailUrl === void 0 ? void 0 : thumbnailUrl.includes("https"))
|
||||
? thumbnailUrl
|
||||
: thumbnailUrl === null || thumbnailUrl === void 0 ? void 0 : thumbnailUrl.replace("http", "https");
|
||||
catalog.push({
|
||||
title: (result === null || result === void 0 ? void 0 : result.title) || "",
|
||||
link,
|
||||
image,
|
||||
});
|
||||
});
|
||||
// Process TV series
|
||||
(_c = data === null || data === void 0 ? void 0 : data.tvseries) === null || _c === void 0 ? void 0 : _c.forEach((result) => {
|
||||
const id = result === null || result === void 0 ? void 0 : result.videos_id;
|
||||
if (!id)
|
||||
return;
|
||||
const link = `${baseUrl}/rest-api//v130/single_details?type=tvseries&id=${id}`;
|
||||
const thumbnailUrl = result === null || result === void 0 ? void 0 : result.thumbnail_url;
|
||||
const image = (thumbnailUrl === null || thumbnailUrl === void 0 ? void 0 : thumbnailUrl.includes("https"))
|
||||
? thumbnailUrl
|
||||
: thumbnailUrl === null || thumbnailUrl === void 0 ? void 0 : thumbnailUrl.replace("http", "https");
|
||||
catalog.push({
|
||||
title: (result === null || result === void 0 ? void 0 : result.title) || "",
|
||||
link,
|
||||
image,
|
||||
});
|
||||
});
|
||||
return catalog;
|
||||
}
|
||||
catch (error) {
|
||||
console.error("dooflix search error:", error);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getSearchPosts = getSearchPosts;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,i,n){return new(i||(i=Promise))(function(s,r){function o(t){try{a(n.next(t))}catch(t){r(t)}}function l(t){try{a(n.throw(t))}catch(t){r(t)}}function a(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(o,l)}a((n=n.apply(t,e||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getSearchPosts=exports.getPosts=void 0;const headers={"Accept-Encoding":"gzip","API-KEY":"2pm95lc6prpdbk0ppji9rsqo",Connection:"Keep-Alive","If-Modified-Since":"Wed, 14 Aug 2024 13:00:04 GMT","User-Agent":"okhttp/3.14.9"},getPosts=function(t){return __awaiter(this,arguments,void 0,function*({filter:t,page:e,signal:i,providerContext:n}){try{const{axios:s,getBaseUrl:r}=n,o=yield r("dooflix"),l=[],a=""+(o+t+`?page=${e}`),d=(yield s.get(a,{headers:headers,signal:i})).data;if(!d||"string"!=typeof d)return[];let u;try{const t=d.indexOf("["),e=d.lastIndexOf("]")+1;if(-1===t||e<=t)u=JSON.parse(d);else{const i=d.substring(t,e),n=JSON.parse(i);u=n.length>0?n:d}}catch(t){return[]}return Array.isArray(u)?(u.forEach(t=>{const e=null==t?void 0:t.videos_id;if(!e)return;const i=(null==t?void 0:t.is_tvseries)?"movie":"tvseries",n=`${o}/rest-api//v130/single_details?type=${i}&id=${e}`,s=null==t?void 0:t.thumbnail_url,r=(null==s?void 0:s.includes("https"))?s:null==s?void 0:s.replace("http","https");l.push({title:(null==t?void 0:t.title)||"",link:n,image:r})}),l):[]}catch(t){return[]}})};exports.getPosts=getPosts;const getSearchPosts=function(t){return __awaiter(this,arguments,void 0,function*({searchQuery:t,page:e,providerContext:i,signal:n}){var s,r;try{if(e>1)return[];const{axios:o,getBaseUrl:l}=i,a=[],d=yield l("dooflix"),u=`${d}/rest-api//v130/search?q=${t}&type=movietvserieslive&range_to=0&range_from=0&tv_category_id=0&genre_id=0&country_id=0`,c=(yield o.get(u,{headers:headers,signal:n})).data;if(!c||"string"!=typeof c)return[];let v;try{const t=c.indexOf("{"),e=c.lastIndexOf("}")+1;if(-1===t||e<=t)v=c;else{const i=c.substring(t,e),n=JSON.parse(i);v=(null==n?void 0:n.movie)?n:c}}catch(t){return[]}return null===(s=null==v?void 0:v.movie)||void 0===s||s.forEach(t=>{const e=null==t?void 0:t.videos_id;if(!e)return;const i=`${d}/rest-api//v130/single_details?type=movie&id=${e}`,n=null==t?void 0:t.thumbnail_url,s=(null==n?void 0:n.includes("https"))?n:null==n?void 0:n.replace("http","https");a.push({title:(null==t?void 0:t.title)||"",link:i,image:s})}),null===(r=null==v?void 0:v.tvseries)||void 0===r||r.forEach(t=>{const e=null==t?void 0:t.videos_id;if(!e)return;const i=`${d}/rest-api//v130/single_details?type=tvseries&id=${e}`,n=null==t?void 0:t.thumbnail_url,s=(null==n?void 0:n.includes("https"))?n:null==n?void 0:n.replace("http","https");a.push({title:(null==t?void 0:t.title)||"",link:i,image:s})}),a}catch(t){return[]}})};exports.getSearchPosts=getSearchPosts;
|
||||
52
dist/dooflix/stream.js
vendored
52
dist/dooflix/stream.js
vendored
@@ -1,51 +1 @@
|
||||
"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, }) {
|
||||
try {
|
||||
const streams = [];
|
||||
const headers = {
|
||||
Connection: "Keep-Alive",
|
||||
"User-Agent": "Mozilla/5.0 (WindowsNT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.37",
|
||||
Referer: "https://molop.art/",
|
||||
Cookie: "cf_clearance=M2_2Hy4lKRy_ruRX3dzOgm3iho1FHe2DUC1lq28BUtI-1737377622-1.2.1.1-6R8RaH94._H2BuNuotsjTZ3fAF6cLwPII0guemu9A5Xa46lpCJPuELycojdREwoonYS2kRTYcZ9_1c4h4epi2LtDvMM9jIoOZKE9pIdWa30peM1hRMpvffTjGUCraHsJNCJez8S_QZ6XkkdP7GeQ5iwiYaI6Grp6qSJWoq0Hj8lS7EITZ1LzyrALI6iLlYjgLmgLGa1VuhORWJBN8ZxrJIZ_ba_pqbrR9fjnyToqxZ0XQaZfk1d3rZyNWoZUjI98GoAxVjnKtcBQQG6b2jYPJuMbbYraGoa54N7E7BR__7o",
|
||||
};
|
||||
const response = yield fetch(link, {
|
||||
redirect: "manual",
|
||||
headers: headers,
|
||||
});
|
||||
if (response.status >= 300 && response.status < 400) {
|
||||
const redirectLink = response.headers.get("Location");
|
||||
if (redirectLink) {
|
||||
link = redirectLink;
|
||||
}
|
||||
}
|
||||
if (response.url) {
|
||||
link = response.url;
|
||||
}
|
||||
streams.push({
|
||||
server: "Dooflix",
|
||||
link: link,
|
||||
headers: headers,
|
||||
type: "m3u8",
|
||||
});
|
||||
console.log("doo streams", streams);
|
||||
return streams;
|
||||
}
|
||||
catch (err) {
|
||||
console.error(err);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getStream = getStream;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(e,t,r,o){return new(r||(r=Promise))(function(n,a){function i(e){try{u(o.next(e))}catch(e){a(e)}}function c(e){try{u(o.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(i,c)}u((o=o.apply(e,t||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getStream=void 0;const getStream=function(e){return __awaiter(this,arguments,void 0,function*({link:e}){try{const t=[],r={Connection:"Keep-Alive","User-Agent":"Mozilla/5.0 (WindowsNT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.37",Referer:"https://molop.art/",Cookie:"cf_clearance=M2_2Hy4lKRy_ruRX3dzOgm3iho1FHe2DUC1lq28BUtI-1737377622-1.2.1.1-6R8RaH94._H2BuNuotsjTZ3fAF6cLwPII0guemu9A5Xa46lpCJPuELycojdREwoonYS2kRTYcZ9_1c4h4epi2LtDvMM9jIoOZKE9pIdWa30peM1hRMpvffTjGUCraHsJNCJez8S_QZ6XkkdP7GeQ5iwiYaI6Grp6qSJWoq0Hj8lS7EITZ1LzyrALI6iLlYjgLmgLGa1VuhORWJBN8ZxrJIZ_ba_pqbrR9fjnyToqxZ0XQaZfk1d3rZyNWoZUjI98GoAxVjnKtcBQQG6b2jYPJuMbbYraGoa54N7E7BR__7o"},o=yield fetch(e,{redirect:"manual",headers:r});if(o.status>=300&&o.status<400){const t=o.headers.get("Location");t&&(e=t)}return o.url&&(e=o.url),t.push({server:"Dooflix",link:e,headers:r,type:"m3u8"}),t}catch(e){return[]}})};exports.getStream=getStream;
|
||||
64
dist/drive/catalog.js
vendored
64
dist/drive/catalog.js
vendored
@@ -1,63 +1 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.genres = exports.catalog = void 0;
|
||||
exports.catalog = [
|
||||
{
|
||||
title: "Latest",
|
||||
filter: "",
|
||||
},
|
||||
{
|
||||
title: "Anime",
|
||||
filter: "category/anime/",
|
||||
},
|
||||
{
|
||||
title: "Netflix",
|
||||
filter: "category/netflix/",
|
||||
},
|
||||
{
|
||||
title: "4K",
|
||||
filter: "category/2160p-4k/",
|
||||
},
|
||||
];
|
||||
exports.genres = [
|
||||
{
|
||||
title: "Action",
|
||||
filter: "/category/action",
|
||||
},
|
||||
{
|
||||
title: "Crime",
|
||||
filter: "/category/crime",
|
||||
},
|
||||
{
|
||||
title: "Comedy",
|
||||
filter: "/category/comedy",
|
||||
},
|
||||
{
|
||||
title: "Drama",
|
||||
filter: "/category/drama",
|
||||
},
|
||||
{
|
||||
title: "Horror",
|
||||
filter: "/category/horror",
|
||||
},
|
||||
{
|
||||
title: "Family",
|
||||
filter: "/category/family",
|
||||
},
|
||||
{
|
||||
title: "Sci-Fi",
|
||||
filter: "/category/sifi",
|
||||
},
|
||||
{
|
||||
title: "Thriller",
|
||||
filter: "/category/triller",
|
||||
},
|
||||
{
|
||||
title: "Romance",
|
||||
filter: "/category/romance",
|
||||
},
|
||||
{
|
||||
title: "Fight",
|
||||
filter: "/category/fight",
|
||||
},
|
||||
];
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.genres=exports.catalog=void 0,exports.catalog=[{title:"Latest",filter:""},{title:"Anime",filter:"category/anime/"},{title:"Netflix",filter:"category/netflix/"},{title:"4K",filter:"category/2160p-4k/"}],exports.genres=[{title:"Action",filter:"/category/action"},{title:"Crime",filter:"/category/crime"},{title:"Comedy",filter:"/category/comedy"},{title:"Drama",filter:"/category/drama"},{title:"Horror",filter:"/category/horror"},{title:"Family",filter:"/category/family"},{title:"Sci-Fi",filter:"/category/sifi"},{title:"Thriller",filter:"/category/triller"},{title:"Romance",filter:"/category/romance"},{title:"Fight",filter:"/category/fight"}];
|
||||
46
dist/drive/episodes.js
vendored
46
dist/drive/episodes.js
vendored
@@ -1,45 +1 @@
|
||||
"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.getEpisodes = void 0;
|
||||
const getEpisodes = function (_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ url, providerContext, }) {
|
||||
try {
|
||||
const { axios, cheerio } = providerContext;
|
||||
const res = yield axios.get(url);
|
||||
const html = res.data;
|
||||
let $ = cheerio.load(html);
|
||||
const episodeLinks = [];
|
||||
$('a:contains("HubCloud")').map((i, element) => {
|
||||
const title = $(element).parent().prev().text();
|
||||
const link = $(element).attr("href");
|
||||
if (link && (title.includes("Ep") || title.includes("Download"))) {
|
||||
episodeLinks.push({
|
||||
title: title.includes("Download") ? "Play" : title,
|
||||
link,
|
||||
});
|
||||
}
|
||||
});
|
||||
// console.log(episodeLinks);
|
||||
return episodeLinks;
|
||||
}
|
||||
catch (err) {
|
||||
console.error(err);
|
||||
return [
|
||||
{
|
||||
title: "Server 1",
|
||||
link: url,
|
||||
},
|
||||
];
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getEpisodes = getEpisodes;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))(function(i,r){function s(t){try{c(o.next(t))}catch(t){r(t)}}function a(t){try{c(o.throw(t))}catch(t){r(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(s,a)}c((o=o.apply(t,e||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getEpisodes=void 0;const getEpisodes=function(t){return __awaiter(this,arguments,void 0,function*({url:t,providerContext:e}){try{const{axios:n,cheerio:o}=e,i=(yield n.get(t)).data;let r=o.load(i);const s=[];return r('a:contains("HubCloud")').map((t,e)=>{const n=r(e).parent().prev().text(),o=r(e).attr("href");o&&(n.includes("Ep")||n.includes("Download"))&&s.push({title:n.includes("Download")?"Play":n,link:o})}),s}catch(e){return[{title:"Server 1",link:t}]}})};exports.getEpisodes=getEpisodes;
|
||||
86
dist/drive/meta.js
vendored
86
dist/drive/meta.js
vendored
@@ -1,85 +1 @@
|
||||
"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;
|
||||
try {
|
||||
const { axios, cheerio } = providerContext;
|
||||
const url = link;
|
||||
const res = yield axios.get(url);
|
||||
const data = res.data;
|
||||
const $ = cheerio.load(data);
|
||||
const type = $(".left-wrapper")
|
||||
.text()
|
||||
.toLocaleLowerCase()
|
||||
.includes("movie name")
|
||||
? "movie"
|
||||
: "series";
|
||||
const imdbId = ((_b = $('a:contains("IMDb")').attr("href")) === null || _b === void 0 ? void 0 : _b.split("/")[4]) || "";
|
||||
const title = $(".left-wrapper").find('strong:contains("Name")').next().text() ||
|
||||
$(".left-wrapper")
|
||||
.find('strong:contains("Name"),h5:contains("Name")')
|
||||
.find("span:first")
|
||||
.text();
|
||||
const synopsis = $(".left-wrapper")
|
||||
.find('h2:contains("Storyline"),h3:contains("Storyline"),h5:contains("Storyline"),h4:contains("Storyline"),h4:contains("STORYLINE")')
|
||||
.next()
|
||||
.text() ||
|
||||
$(".ipc-html-content-inner-div").text() ||
|
||||
"";
|
||||
const image = $("img.entered.lazyloaded,img.entered,img.litespeed-loaded").attr("src") ||
|
||||
$("img.aligncenter").attr("src") ||
|
||||
"";
|
||||
// Links
|
||||
const links = [];
|
||||
$('a:contains("1080")a:not(:contains("Zip")),a:contains("720")a:not(:contains("Zip")),a:contains("480")a:not(:contains("Zip")),a:contains("2160")a:not(:contains("Zip")),a:contains("4k")a:not(:contains("Zip"))').map((i, element) => {
|
||||
var _a;
|
||||
const title = $(element).parent("h5").prev().text();
|
||||
const episodesLink = $(element).attr("href");
|
||||
const quality = ((_a = title.match(/\b(480p|720p|1080p|2160p)\b/i)) === null || _a === void 0 ? void 0 : _a[0]) || "";
|
||||
if (episodesLink && title) {
|
||||
links.push({
|
||||
title,
|
||||
episodesLink: type === "series" ? episodesLink : "",
|
||||
directLinks: type === "movie"
|
||||
? [{ title: "Movie", link: episodesLink, type: "movie" }]
|
||||
: [],
|
||||
quality: quality,
|
||||
});
|
||||
}
|
||||
});
|
||||
// console.log('drive meta', title, synopsis, image, imdbId, type, links);
|
||||
console.log("drive meta", links, type);
|
||||
return {
|
||||
title,
|
||||
synopsis,
|
||||
image,
|
||||
imdbId,
|
||||
type,
|
||||
linkList: links,
|
||||
};
|
||||
}
|
||||
catch (err) {
|
||||
console.error(err);
|
||||
return {
|
||||
title: "",
|
||||
synopsis: "",
|
||||
image: "",
|
||||
imdbId: "",
|
||||
type: "movie",
|
||||
linkList: [],
|
||||
};
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getMeta = getMeta;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,n,i){return new(n||(n=Promise))(function(a,o){function r(t){try{c(i.next(t))}catch(t){o(t)}}function s(t){try{c(i.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?a(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(r,s)}c((i=i.apply(t,e||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getMeta=void 0;const getMeta=function(t){return __awaiter(this,arguments,void 0,function*({link:t,providerContext:e}){var n;try{const{axios:i,cheerio:a}=e,o=t,r=(yield i.get(o)).data,s=a.load(r),c=s(".left-wrapper").text().toLocaleLowerCase().includes("movie name")?"movie":"series",p=(null===(n=s('a:contains("IMDb")').attr("href"))||void 0===n?void 0:n.split("/")[4])||"",l=s(".left-wrapper").find('strong:contains("Name")').next().text()||s(".left-wrapper").find('strong:contains("Name"),h5:contains("Name")').find("span:first").text(),d=s(".left-wrapper").find('h2:contains("Storyline"),h3:contains("Storyline"),h5:contains("Storyline"),h4:contains("Storyline"),h4:contains("STORYLINE")').next().text()||s(".ipc-html-content-inner-div").text()||"",u=s("img.entered.lazyloaded,img.entered,img.litespeed-loaded").attr("src")||s("img.aligncenter").attr("src")||"",v=[];return s('a:contains("1080")a:not(:contains("Zip")),a:contains("720")a:not(:contains("Zip")),a:contains("480")a:not(:contains("Zip")),a:contains("2160")a:not(:contains("Zip")),a:contains("4k")a:not(:contains("Zip"))').map((t,e)=>{var n;const i=s(e).parent("h5").prev().text(),a=s(e).attr("href"),o=(null===(n=i.match(/\b(480p|720p|1080p|2160p)\b/i))||void 0===n?void 0:n[0])||"";a&&i&&v.push({title:i,episodesLink:"series"===c?a:"",directLinks:"movie"===c?[{title:"Movie",link:a,type:"movie"}]:[],quality:o})}),{title:l,synopsis:d,image:u,imdbId:p,type:c,linkList:v}}catch(t){return{title:"",synopsis:"",image:"",imdbId:"",type:"movie",linkList:[]}}})};exports.getMeta=getMeta;
|
||||
61
dist/drive/posts.js
vendored
61
dist/drive/posts.js
vendored
@@ -1,60 +1 @@
|
||||
"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, page, signal, providerContext, }) {
|
||||
const { getBaseUrl } = providerContext;
|
||||
const baseUrl = yield getBaseUrl("drive");
|
||||
const url = `${baseUrl + filter}/page/${page}/`;
|
||||
return posts({ url, signal, providerContext });
|
||||
});
|
||||
};
|
||||
exports.getPosts = getPosts;
|
||||
const getSearchPosts = function (_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ searchQuery, page, signal, providerContext, }) {
|
||||
const { getBaseUrl } = providerContext;
|
||||
const baseUrl = yield getBaseUrl("drive");
|
||||
const url = `${baseUrl}page/${page}/?s=${searchQuery}`;
|
||||
return posts({ url, signal, providerContext });
|
||||
});
|
||||
};
|
||||
exports.getSearchPosts = getSearchPosts;
|
||||
function posts(_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ url, signal, providerContext, }) {
|
||||
try {
|
||||
const { cheerio } = providerContext;
|
||||
const res = yield fetch(url, { signal });
|
||||
const data = yield res.text();
|
||||
const $ = cheerio.load(data);
|
||||
const catalog = [];
|
||||
$(".recent-movies")
|
||||
.children()
|
||||
.map((i, element) => {
|
||||
const title = $(element).find("figure").find("img").attr("alt");
|
||||
const link = $(element).find("a").attr("href");
|
||||
const image = $(element).find("figure").find("img").attr("src");
|
||||
if (title && link && image) {
|
||||
catalog.push({
|
||||
title: title.replace("Download", "").trim(),
|
||||
link: link,
|
||||
image: image,
|
||||
});
|
||||
}
|
||||
});
|
||||
return catalog;
|
||||
}
|
||||
catch (err) {
|
||||
console.error("drive error ", err);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
}
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))(function(i,o){function s(t){try{c(n.next(t))}catch(t){o(t)}}function a(t){try{c(n.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r(function(t){t(e)})).then(s,a)}c((n=n.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,page:e,signal:r,providerContext:n}){const{getBaseUrl:i}=n;return posts({url:`${(yield i("drive"))+t}/page/${e}/`,signal:r,providerContext:n})})};exports.getPosts=getPosts;const getSearchPosts=function(t){return __awaiter(this,arguments,void 0,function*({searchQuery:t,page:e,signal:r,providerContext:n}){const{getBaseUrl:i}=n;return posts({url:`${yield i("drive")}page/${e}/?s=${t}`,signal:r,providerContext:n})})};function posts(t){return __awaiter(this,arguments,void 0,function*({url:t,signal:e,providerContext:r}){try{const{cheerio:n}=r,i=yield fetch(t,{signal:e}),o=yield i.text(),s=n.load(o),a=[];return s(".recent-movies").children().map((t,e)=>{const r=s(e).find("figure").find("img").attr("alt"),n=s(e).find("a").attr("href"),i=s(e).find("figure").find("img").attr("src");r&&n&&i&&a.push({title:r.replace("Download","").trim(),link:n,image:i})}),a}catch(t){return[]}})}exports.getSearchPosts=getSearchPosts;
|
||||
46
dist/drive/stream.js
vendored
46
dist/drive/stream.js
vendored
@@ -1,45 +1 @@
|
||||
"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: url, type, signal, providerContext, }) {
|
||||
var _b, _c;
|
||||
const headers = providerContext.commonHeaders;
|
||||
try {
|
||||
if (type === "movie") {
|
||||
const res = yield providerContext.axios.get(url, { headers });
|
||||
const html = res.data;
|
||||
const $ = providerContext.cheerio.load(html);
|
||||
const link = $('a:contains("HubCloud")').attr("href");
|
||||
url = link || url;
|
||||
}
|
||||
const res = yield providerContext.axios.get(url, { headers });
|
||||
let redirectUrl = (_b = res.data.match(/<meta\s+http-equiv="refresh"\s+content="[^"]*?;\s*url=([^"]+)"\s*\/?>/i)) === null || _b === void 0 ? void 0 : _b[1];
|
||||
if (url.includes("/archives/")) {
|
||||
redirectUrl = (_c = res.data.match(/<a\s+[^>]*href="(https:\/\/hubcloud\.[^\/]+\/[^"]+)"/i)) === null || _c === void 0 ? void 0 : _c[1];
|
||||
}
|
||||
if (!redirectUrl) {
|
||||
return yield providerContext.extractors.hubcloudExtracter(url, signal);
|
||||
}
|
||||
const res2 = yield providerContext.axios.get(redirectUrl, { headers });
|
||||
const data = res2.data;
|
||||
const $ = providerContext.cheerio.load(data);
|
||||
const hubcloudLink = $(".fa-file-download").parent().attr("href");
|
||||
return yield providerContext.extractors.hubcloudExtracter((hubcloudLink === null || hubcloudLink === void 0 ? void 0 : hubcloudLink.includes("https://hubcloud")) ? hubcloudLink : redirectUrl, signal);
|
||||
}
|
||||
catch (err) {
|
||||
console.error("Movies Drive err", err);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getStream = getStream;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,r,a){return new(r||(r=Promise))(function(o,n){function i(t){try{s(a.next(t))}catch(t){n(t)}}function c(t){try{s(a.throw(t))}catch(t){n(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r(function(t){t(e)})).then(i,c)}s((a=a.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,signal:r,providerContext:a}){var o,n;const i=a.commonHeaders;try{if("movie"===e){const e=(yield a.axios.get(t,{headers:i})).data,r=a.cheerio.load(e);t=r('a:contains("HubCloud")').attr("href")||t}const c=yield a.axios.get(t,{headers:i});let s=null===(o=c.data.match(/<meta\s+http-equiv="refresh"\s+content="[^"]*?;\s*url=([^"]+)"\s*\/?>/i))||void 0===o?void 0:o[1];if(t.includes("/archives/")&&(s=null===(n=c.data.match(/<a\s+[^>]*href="(https:\/\/hubcloud\.[^\/]+\/[^"]+)"/i))||void 0===n?void 0:n[1]),!s)return yield a.extractors.hubcloudExtracter(t,r);const d=(yield a.axios.get(s,{headers:i})).data,u=a.cheerio.load(d)(".fa-file-download").parent().attr("href");return yield a.extractors.hubcloudExtracter((null==u?void 0:u.includes("https://hubcloud"))?u:s,r)}catch(t){return[]}})};exports.getStream=getStream;
|
||||
19
dist/filmyfly/catalog.js
vendored
19
dist/filmyfly/catalog.js
vendored
@@ -1,18 +1 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.genres = exports.catalog = void 0;
|
||||
exports.catalog = [
|
||||
{
|
||||
title: "Home",
|
||||
filter: "",
|
||||
},
|
||||
{
|
||||
title: "Web Series",
|
||||
filter: "/page-cat/42/Web-Series.html",
|
||||
},
|
||||
{
|
||||
title: "Hollywood",
|
||||
filter: "/page-cat/9/New-Hollywood-Hindi-Dubbed-Movie-2016-2025.html",
|
||||
},
|
||||
];
|
||||
exports.genres = [];
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.genres=exports.catalog=void 0,exports.catalog=[{title:"Home",filter:""},{title:"Web Series",filter:"/page-cat/42/Web-Series.html"},{title:"Hollywood",filter:"/page-cat/9/New-Hollywood-Hindi-Dubbed-Movie-2016-2025.html"}],exports.genres=[];
|
||||
44
dist/filmyfly/episodes.js
vendored
44
dist/filmyfly/episodes.js
vendored
@@ -1,43 +1 @@
|
||||
"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.getEpisodes = void 0;
|
||||
const getEpisodes = function (_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ url, providerContext, }) {
|
||||
try {
|
||||
const headers = providerContext.commonHeaders;
|
||||
const { axios, cheerio } = providerContext;
|
||||
const res = yield axios.get(url, { headers });
|
||||
const data = res.data;
|
||||
const $ = cheerio.load(data);
|
||||
const episodeLinks = [];
|
||||
$(".dlink.dl").map((i, element) => {
|
||||
var _a, _b;
|
||||
const title = (_b = (_a = $(element)
|
||||
.find("a")
|
||||
.text()) === null || _a === void 0 ? void 0 : _a.replace("Download", "")) === null || _b === void 0 ? void 0 : _b.trim();
|
||||
const link = $(element).find("a").attr("href");
|
||||
if (title && link) {
|
||||
episodeLinks.push({
|
||||
title,
|
||||
link,
|
||||
});
|
||||
}
|
||||
});
|
||||
return episodeLinks;
|
||||
}
|
||||
catch (err) {
|
||||
console.error("cl episode links", err);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getEpisodes = getEpisodes;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))(function(i,r){function a(t){try{d(o.next(t))}catch(t){r(t)}}function s(t){try{d(o.throw(t))}catch(t){r(t)}}function d(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,s)}d((o=o.apply(t,e||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getEpisodes=void 0;const getEpisodes=function(t){return __awaiter(this,arguments,void 0,function*({url:t,providerContext:e}){try{const n=e.commonHeaders,{axios:o,cheerio:i}=e,r=(yield o.get(t,{headers:n})).data,a=i.load(r),s=[];return a(".dlink.dl").map((t,e)=>{var n,o;const i=null===(o=null===(n=a(e).find("a").text())||void 0===n?void 0:n.replace("Download",""))||void 0===o?void 0:o.trim(),r=a(e).find("a").attr("href");i&&r&&s.push({title:i,link:r})}),s}catch(t){return[]}})};exports.getEpisodes=getEpisodes;
|
||||
64
dist/filmyfly/meta.js
vendored
64
dist/filmyfly/meta.js
vendored
@@ -1,63 +1 @@
|
||||
"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, }) {
|
||||
try {
|
||||
const { axios, cheerio, commonHeaders: headers } = providerContext;
|
||||
const url = link;
|
||||
const res = yield axios.get(url, { headers });
|
||||
const data = res.data;
|
||||
const $ = cheerio.load(data);
|
||||
const type = url.includes("tvshows") ? "series" : "movie";
|
||||
const imdbId = "";
|
||||
const title = $('.fname:contains("Name")').find(".colora").text().trim();
|
||||
const image = $(".ss").find("img").attr("src") || "";
|
||||
const synopsis = $('.fname:contains("Description")')
|
||||
.find(".colorg")
|
||||
.text()
|
||||
.trim();
|
||||
const tags = $('.fname:contains("Genre")').find(".colorb").text().split(",") || [];
|
||||
const rating = "";
|
||||
const links = [];
|
||||
const downloadLink = $(".dlbtn").find("a").attr("href");
|
||||
if (downloadLink) {
|
||||
links.push({
|
||||
title: title,
|
||||
episodesLink: downloadLink,
|
||||
});
|
||||
}
|
||||
return {
|
||||
title,
|
||||
tags,
|
||||
rating,
|
||||
synopsis,
|
||||
image,
|
||||
imdbId,
|
||||
type,
|
||||
linkList: links,
|
||||
};
|
||||
}
|
||||
catch (err) {
|
||||
console.error(err);
|
||||
return {
|
||||
title: "",
|
||||
synopsis: "",
|
||||
image: "",
|
||||
imdbId: "",
|
||||
type: "movie",
|
||||
linkList: [],
|
||||
};
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getMeta = getMeta;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,i,n){return new(i||(i=Promise))(function(o,r){function a(t){try{c(n.next(t))}catch(t){r(t)}}function s(t){try{c(n.throw(t))}catch(t){r(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(a,s)}c((n=n.apply(t,e||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getMeta=void 0;const getMeta=function(t){return __awaiter(this,arguments,void 0,function*({link:t,providerContext:e}){try{const{axios:i,cheerio:n,commonHeaders:o}=e,r=t,a=(yield i.get(r,{headers:o})).data,s=n.load(a),c=r.includes("tvshows")?"series":"movie",d="",f=s('.fname:contains("Name")').find(".colora").text().trim(),l=s(".ss").find("img").attr("src")||"",u=s('.fname:contains("Description")').find(".colorg").text().trim(),m=s('.fname:contains("Genre")').find(".colorb").text().split(",")||[],p="",h=[],g=s(".dlbtn").find("a").attr("href");return g&&h.push({title:f,episodesLink:g}),{title:f,tags:m,rating:p,synopsis:u,image:l,imdbId:d,type:c,linkList:h}}catch(t){return{title:"",synopsis:"",image:"",imdbId:"",type:"movie",linkList:[]}}})};exports.getMeta=getMeta;
|
||||
62
dist/filmyfly/posts.js
vendored
62
dist/filmyfly/posts.js
vendored
@@ -1,61 +1 @@
|
||||
"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, page, signal, providerContext, }) {
|
||||
const { getBaseUrl } = providerContext;
|
||||
const baseUrl = yield getBaseUrl("filmyfly");
|
||||
const url = `${baseUrl + filter}/${page}`;
|
||||
return posts({ url, signal, baseUrl, providerContext });
|
||||
});
|
||||
};
|
||||
exports.getPosts = getPosts;
|
||||
const getSearchPosts = function (_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ searchQuery, page, signal, providerContext, }) {
|
||||
const { getBaseUrl } = providerContext;
|
||||
const baseUrl = yield getBaseUrl("filmyfly");
|
||||
const url = `${baseUrl}/site-1.html?to-search=${searchQuery}`;
|
||||
if (page > 1) {
|
||||
return [];
|
||||
}
|
||||
return posts({ url, signal, baseUrl, providerContext });
|
||||
});
|
||||
};
|
||||
exports.getSearchPosts = getSearchPosts;
|
||||
function posts(_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ url, signal, baseUrl, providerContext, }) {
|
||||
try {
|
||||
const { cheerio, commonHeaders: headers } = providerContext;
|
||||
const res = yield fetch(url, { headers, signal });
|
||||
const data = yield res.text();
|
||||
const $ = cheerio.load(data);
|
||||
const catalog = [];
|
||||
$(".A2,.A10,.fl").map((i, element) => {
|
||||
const title = $(element).find("a").eq(1).text() || $(element).find("b").text();
|
||||
const link = $(element).find("a").attr("href");
|
||||
const image = $(element).find("img").attr("src");
|
||||
if (title && link && image) {
|
||||
catalog.push({
|
||||
title: title,
|
||||
link: baseUrl + link,
|
||||
image: image,
|
||||
});
|
||||
}
|
||||
});
|
||||
return catalog;
|
||||
}
|
||||
catch (err) {
|
||||
console.error("ff error ", err);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
}
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))(function(s,o){function i(t){try{c(n.next(t))}catch(t){o(t)}}function a(t){try{c(n.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?s(t.value):(e=t.value,e instanceof r?e:new r(function(t){t(e)})).then(i,a)}c((n=n.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,page:e,signal:r,providerContext:n}){const{getBaseUrl:s}=n,o=yield s("filmyfly");return posts({url:`${o+t}/${e}`,signal:r,baseUrl:o,providerContext:n})})};exports.getPosts=getPosts;const getSearchPosts=function(t){return __awaiter(this,arguments,void 0,function*({searchQuery:t,page:e,signal:r,providerContext:n}){const{getBaseUrl:s}=n,o=yield s("filmyfly");return e>1?[]:posts({url:`${o}/site-1.html?to-search=${t}`,signal:r,baseUrl:o,providerContext:n})})};function posts(t){return __awaiter(this,arguments,void 0,function*({url:t,signal:e,baseUrl:r,providerContext:n}){try{const{cheerio:s,commonHeaders:o}=n,i=yield fetch(t,{headers:o,signal:e}),a=yield i.text(),c=s.load(a),l=[];return c(".A2,.A10,.fl").map((t,e)=>{const n=c(e).find("a").eq(1).text()||c(e).find("b").text(),s=c(e).find("a").attr("href"),o=c(e).find("img").attr("src");n&&s&&o&&l.push({title:n,link:r+s,image:o})}),l}catch(t){return[]}})}exports.getSearchPosts=getSearchPosts;
|
||||
52
dist/filmyfly/stream.js
vendored
52
dist/filmyfly/stream.js
vendored
@@ -1,51 +1 @@
|
||||
"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, signal, providerContext, }) {
|
||||
try {
|
||||
const res = yield providerContext.axios.get(link, { signal });
|
||||
const data = res.data;
|
||||
const $ = providerContext.cheerio.load(data);
|
||||
const streams = [];
|
||||
const elements = $(".button2,.button1,.button3,.button4,.button").toArray();
|
||||
const promises = elements.map((element) => __awaiter(this, void 0, void 0, function* () {
|
||||
const title = $(element).text();
|
||||
let link = $(element).attr("href");
|
||||
if (title.includes("GDFLIX") && link) {
|
||||
const gdLinks = yield providerContext.extractors.gdFlixExtracter(link, signal);
|
||||
streams.push(...gdLinks);
|
||||
}
|
||||
const alreadyAdded = streams.find((s) => s.link === link);
|
||||
if (title &&
|
||||
link &&
|
||||
!title.includes("Watch") &&
|
||||
!title.includes("Login") &&
|
||||
!title.includes("GoFile") &&
|
||||
!alreadyAdded) {
|
||||
streams.push({
|
||||
server: title,
|
||||
link: link,
|
||||
type: "mkv",
|
||||
});
|
||||
}
|
||||
}));
|
||||
yield Promise.all(promises);
|
||||
return streams;
|
||||
}
|
||||
catch (err) {
|
||||
console.error(err);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getStream = getStream;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,n,i){return new(n||(n=Promise))(function(r,o){function a(t){try{s(i.next(t))}catch(t){o(t)}}function c(t){try{s(i.throw(t))}catch(t){o(t)}}function s(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,c)}s((i=i.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,signal:e,providerContext:n}){try{const i=(yield n.axios.get(t,{signal:e})).data,r=n.cheerio.load(i),o=[],a=r(".button2,.button1,.button3,.button4,.button").toArray().map(t=>__awaiter(this,void 0,void 0,function*(){const i=r(t).text();let a=r(t).attr("href");if(i.includes("GDFLIX")&&a){const t=yield n.extractors.gdFlixExtracter(a,e);o.push(...t)}const c=o.find(t=>t.link===a);!i||!a||i.includes("Watch")||i.includes("Login")||i.includes("GoFile")||c||o.push({server:i,link:a,type:"mkv"})}));return yield Promise.all(a),o}catch(t){return[]}})};exports.getStream=getStream;
|
||||
19
dist/flixhq/catalog.js
vendored
19
dist/flixhq/catalog.js
vendored
@@ -1,18 +1 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.genres = exports.catalog = void 0;
|
||||
exports.catalog = [
|
||||
{
|
||||
title: "Trending",
|
||||
filter: "/trending",
|
||||
},
|
||||
{
|
||||
title: "Movies",
|
||||
filter: "/recent-movies",
|
||||
},
|
||||
{
|
||||
title: "TV Shows",
|
||||
filter: "/recent-shows",
|
||||
},
|
||||
];
|
||||
exports.genres = [];
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.genres=exports.catalog=void 0,exports.catalog=[{title:"Trending",filter:"/trending"},{title:"Movies",filter:"/recent-movies"},{title:"TV Shows",filter:"/recent-shows"}],exports.genres=[];
|
||||
65
dist/flixhq/meta.js
vendored
65
dist/flixhq/meta.js
vendored
@@ -1,64 +1 @@
|
||||
"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: id, providerContext, }) {
|
||||
try {
|
||||
const { axios, getBaseUrl } = providerContext;
|
||||
const baseUrl = yield getBaseUrl("consumet");
|
||||
const url = `${baseUrl}/movies/flixhq/info?id=` + id;
|
||||
const res = yield axios.get(url);
|
||||
const data = res.data;
|
||||
const meta = {
|
||||
title: data.title,
|
||||
synopsis: data.description.replace(/<[^>]*>?/gm, "").trim(),
|
||||
image: data.cover,
|
||||
cast: data.casts,
|
||||
rating: data.rating,
|
||||
tags: [data === null || data === void 0 ? void 0 : data.type, data === null || data === void 0 ? void 0 : data.duration, data.releaseDate.split("-")[0]],
|
||||
imdbId: "",
|
||||
type: data.episodes.length > 1 ? "series" : "movie",
|
||||
};
|
||||
const links = [];
|
||||
data.episodes.forEach((episode) => {
|
||||
const title = (episode === null || episode === void 0 ? void 0 : episode.number)
|
||||
? "Season-" + (episode === null || episode === void 0 ? void 0 : episode.season) + " Ep-" + episode.number
|
||||
: episode.title;
|
||||
const link = episode.id + "*" + data.id;
|
||||
if (link && title) {
|
||||
links.push({
|
||||
title,
|
||||
link,
|
||||
});
|
||||
}
|
||||
});
|
||||
return Object.assign(Object.assign({}, meta), { linkList: [
|
||||
{
|
||||
title: meta.title,
|
||||
directLinks: links,
|
||||
},
|
||||
] });
|
||||
}
|
||||
catch (err) {
|
||||
console.error(err);
|
||||
return {
|
||||
title: "",
|
||||
synopsis: "",
|
||||
image: "",
|
||||
imdbId: "",
|
||||
type: "movie",
|
||||
linkList: [],
|
||||
};
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getMeta = getMeta;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,i,n){return new(i||(i=Promise))(function(s,o){function a(t){try{l(n.next(t))}catch(t){o(t)}}function r(t){try{l(n.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(a,r)}l((n=n.apply(t,e||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getMeta=void 0;const getMeta=function(t){return __awaiter(this,arguments,void 0,function*({link:t,providerContext:e}){try{const{axios:i,getBaseUrl:n}=e,s=`${yield n("consumet")}/movies/flixhq/info?id=`+t,o=(yield i.get(s)).data,a={title:o.title,synopsis:o.description.replace(/<[^>]*>?/gm,"").trim(),image:o.cover,cast:o.casts,rating:o.rating,tags:[null==o?void 0:o.type,null==o?void 0:o.duration,o.releaseDate.split("-")[0]],imdbId:"",type:o.episodes.length>1?"series":"movie"},r=[];return o.episodes.forEach(t=>{const e=(null==t?void 0:t.number)?"Season-"+(null==t?void 0:t.season)+" Ep-"+t.number:t.title,i=t.id+"*"+o.id;i&&e&&r.push({title:e,link:i})}),Object.assign(Object.assign({},a),{linkList:[{title:a.title,directLinks:r}]})}catch(t){return{title:"",synopsis:"",image:"",imdbId:"",type:"movie",linkList:[]}}})};exports.getMeta=getMeta;
|
||||
61
dist/flixhq/posts.js
vendored
61
dist/flixhq/posts.js
vendored
@@ -1,60 +1 @@
|
||||
"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, }) {
|
||||
const { getBaseUrl } = providerContext;
|
||||
const urlRes = yield getBaseUrl("consumet");
|
||||
const baseUrl = urlRes + "/movies/flixhq";
|
||||
const url = `${baseUrl + filter}`;
|
||||
return posts({ url, signal, providerContext });
|
||||
});
|
||||
};
|
||||
exports.getPosts = getPosts;
|
||||
const getSearchPosts = function (_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ searchQuery, page, signal, providerContext, }) {
|
||||
const { getBaseUrl } = providerContext;
|
||||
const urlRes = yield getBaseUrl("consumet");
|
||||
const baseUrl = urlRes + "/movies/flixhq";
|
||||
const url = `${baseUrl}/${searchQuery}?page=${page}`;
|
||||
return posts({ url, signal, providerContext });
|
||||
});
|
||||
};
|
||||
exports.getSearchPosts = getSearchPosts;
|
||||
function posts(_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ url, signal, providerContext, }) {
|
||||
var _b;
|
||||
try {
|
||||
const { axios } = providerContext;
|
||||
const res = yield axios.get(url, { signal });
|
||||
const data = ((_b = res.data) === null || _b === void 0 ? void 0 : _b.results) || res.data;
|
||||
const catalog = [];
|
||||
data === null || data === void 0 ? void 0 : data.map((element) => {
|
||||
const title = element.title;
|
||||
const link = element.id;
|
||||
const image = element.image;
|
||||
if (title && link && image) {
|
||||
catalog.push({
|
||||
title: title,
|
||||
link: link,
|
||||
image: image,
|
||||
});
|
||||
}
|
||||
});
|
||||
return catalog;
|
||||
}
|
||||
catch (err) {
|
||||
console.error("flixhq error ", err);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
}
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))(function(r,s){function i(t){try{u(o.next(t))}catch(t){s(t)}}function a(t){try{u(o.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(i,a)}u((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}){const{getBaseUrl:o}=n;return posts({url:`${(yield o("consumet"))+"/movies/flixhq"+t}`,signal:e,providerContext:n})})};exports.getPosts=getPosts;const getSearchPosts=function(t){return __awaiter(this,arguments,void 0,function*({searchQuery:t,page:e,signal:n,providerContext:o}){const{getBaseUrl:r}=o;return posts({url:`${(yield r("consumet"))+"/movies/flixhq"}/${t}?page=${e}`,signal:n,providerContext:o})})};function posts(t){return __awaiter(this,arguments,void 0,function*({url:t,signal:e,providerContext:n}){var o;try{const{axios:r}=n,s=yield r.get(t,{signal:e}),i=(null===(o=s.data)||void 0===o?void 0:o.results)||s.data,a=[];return null==i||i.map(t=>{const e=t.title,n=t.id,o=t.image;e&&n&&o&&a.push({title:e,link:n,image:o})}),a}catch(t){return[]}})}exports.getSearchPosts=getSearchPosts;
|
||||
69
dist/flixhq/stream.js
vendored
69
dist/flixhq/stream.js
vendored
@@ -1,68 +1 @@
|
||||
"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, providerContext, }) {
|
||||
var _b;
|
||||
try {
|
||||
const { getBaseUrl } = providerContext;
|
||||
const episodeId = id.split("*")[0];
|
||||
const mediaId = id.split("*")[1];
|
||||
const baseUrl = yield getBaseUrl("consumet");
|
||||
const serverUrl = `${baseUrl}/movies/flixhq/servers?episodeId=${episodeId}&mediaId=${mediaId}`;
|
||||
const res = yield fetch(serverUrl);
|
||||
const servers = yield res.json();
|
||||
const streamLinks = [];
|
||||
for (const server of servers) {
|
||||
const streamUrl = `${baseUrl}/movies/flixhq/watch?server=` +
|
||||
server.name +
|
||||
"&episodeId=" +
|
||||
episodeId +
|
||||
"&mediaId=" +
|
||||
mediaId;
|
||||
const streamRes = yield fetch(streamUrl);
|
||||
const streamData = yield streamRes.json();
|
||||
const subtitles = [];
|
||||
if (((_b = streamData === null || streamData === void 0 ? void 0 : streamData.sources) === null || _b === void 0 ? void 0 : _b.length) > 0) {
|
||||
if (streamData.subtitles) {
|
||||
streamData.subtitles.forEach((sub) => {
|
||||
var _a;
|
||||
subtitles.push({
|
||||
language: (_a = sub === null || sub === void 0 ? void 0 : sub.lang) === null || _a === void 0 ? void 0 : _a.slice(0, 2),
|
||||
uri: sub === null || sub === void 0 ? void 0 : sub.url,
|
||||
type: "text/vtt",
|
||||
title: sub === null || sub === void 0 ? void 0 : sub.lang,
|
||||
});
|
||||
});
|
||||
}
|
||||
streamData.sources.forEach((source) => {
|
||||
var _a;
|
||||
streamLinks.push({
|
||||
server: (server === null || server === void 0 ? void 0 : server.name) +
|
||||
"-" +
|
||||
((_a = source === null || source === void 0 ? void 0 : source.quality) === null || _a === void 0 ? void 0 : _a.replace("auto", "MultiQuality")),
|
||||
link: source.url,
|
||||
type: source.isM3U8 ? "m3u8" : "mp4",
|
||||
subtitles: subtitles,
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
return streamLinks;
|
||||
}
|
||||
catch (err) {
|
||||
console.error(err);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getStream = getStream;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,l){function r(e){try{u(n.next(e))}catch(e){l(e)}}function s(e){try{u(n.throw(e))}catch(e){l(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(r,s)}u((n=n.apply(e,t||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getStream=void 0;const getStream=function(e){return __awaiter(this,arguments,void 0,function*({link:e,providerContext:t}){var i;try{const{getBaseUrl:n}=t,o=e.split("*")[0],l=e.split("*")[1],r=yield n("consumet"),s=`${r}/movies/flixhq/servers?episodeId=${o}&mediaId=${l}`,u=yield fetch(s),a=yield u.json(),c=[];for(const e of a){const t=`${r}/movies/flixhq/watch?server=`+e.name+"&episodeId="+o+"&mediaId="+l,n=yield fetch(t),s=yield n.json(),u=[];(null===(i=null==s?void 0:s.sources)||void 0===i?void 0:i.length)>0&&(s.subtitles&&s.subtitles.forEach(e=>{var t;u.push({language:null===(t=null==e?void 0:e.lang)||void 0===t?void 0:t.slice(0,2),uri:null==e?void 0:e.url,type:"text/vtt",title:null==e?void 0:e.lang})}),s.sources.forEach(t=>{var i;c.push({server:(null==e?void 0:e.name)+"-"+(null===(i=null==t?void 0:t.quality)||void 0===i?void 0:i.replace("auto","MultiQuality")),link:t.url,type:t.isM3U8?"m3u8":"mp4",subtitles:u})}))}return c}catch(e){return[]}})};exports.getStream=getStream;
|
||||
212
dist/gdflixExtractor.js
vendored
212
dist/gdflixExtractor.js
vendored
@@ -1,211 +1 @@
|
||||
"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;
|
||||
};
|
||||
})();
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.gdFlixExtracter = gdFlixExtracter;
|
||||
const axios_1 = __importDefault(require("axios"));
|
||||
const cheerio = __importStar(require("cheerio"));
|
||||
const headers_1 = require("./headers");
|
||||
function gdFlixExtracter(link, signal) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
var _a, _b, _c, _d, _e, _f, _g, _h;
|
||||
try {
|
||||
const streamLinks = [];
|
||||
const res = yield (0, axios_1.default)(`${link}`, { headers: headers_1.headers, signal });
|
||||
console.log('gdFlixExtracter', link);
|
||||
const data = res.data;
|
||||
let $drive = cheerio.load(data);
|
||||
// handle if redirected to another link
|
||||
if ((_a = $drive('body').attr('onload')) === null || _a === void 0 ? void 0 : _a.includes('location.replace')) {
|
||||
const newLink = (_d = (_c = (_b = $drive('body')
|
||||
.attr('onload')) === null || _b === void 0 ? void 0 : _b.split("location.replace('")) === null || _c === void 0 ? void 0 : _c[1].split("'")) === null || _d === void 0 ? void 0 : _d[0];
|
||||
console.log('newLink', newLink);
|
||||
if (newLink) {
|
||||
const newRes = yield axios_1.default.get(newLink, { headers: headers_1.headers, signal });
|
||||
$drive = cheerio.load(newRes.data);
|
||||
}
|
||||
}
|
||||
// try {
|
||||
// const resumeBot = $drive('.fab.fa-artstation').prev().attr('href') || '';
|
||||
// console.log('resumeBot', resumeBot);
|
||||
// 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);
|
||||
// streamLinks.push({
|
||||
// server: 'ResumeBot',
|
||||
// link: resumeBotDownloadData.url,
|
||||
// type: 'mkv',
|
||||
// });
|
||||
// } catch (err) {
|
||||
// console.log('ResumeBot link not found', err);
|
||||
// }
|
||||
/// resume cloud
|
||||
try {
|
||||
const baseUrl = link.split('/').slice(0, 3).join('/');
|
||||
const resumeDrive = $drive('.btn-secondary').attr('href') || '';
|
||||
console.log('resumeDrive', resumeDrive);
|
||||
if (resumeDrive.includes('indexbot')) {
|
||||
const resumeBotRes = yield axios_1.default.get(resumeDrive, { headers: headers_1.headers });
|
||||
const resumeBotToken = resumeBotRes.data.match(/formData\.append\('token', '([a-f0-9]+)'\)/)[1];
|
||||
const resumeBotBody = new FormData();
|
||||
resumeBotBody.append('token', resumeBotToken);
|
||||
const resumeBotPath = resumeBotRes.data.match(/fetch\('\/download\?id=([a-zA-Z0-9\/+]+)'/)[1];
|
||||
const resumeBotBaseUrl = resumeDrive.split('/download')[0];
|
||||
// console.log(
|
||||
// 'resumeBotPath',
|
||||
// resumeBotBaseUrl + '/download?id=' + resumeBotPath,
|
||||
// );
|
||||
// console.log('resumeBotBody', resumeBotToken);
|
||||
const resumeBotDownload = yield fetch(resumeBotBaseUrl + '/download?id=' + resumeBotPath, {
|
||||
method: 'POST',
|
||||
body: resumeBotBody,
|
||||
headers: {
|
||||
Referer: resumeDrive,
|
||||
Cookie: 'PHPSESSID=7e9658ce7c805dab5bbcea9046f7f308',
|
||||
},
|
||||
});
|
||||
const resumeBotDownloadData = yield resumeBotDownload.json();
|
||||
console.log('resumeBotDownloadData', resumeBotDownloadData.url);
|
||||
streamLinks.push({
|
||||
server: 'ResumeBot',
|
||||
link: resumeBotDownloadData.url,
|
||||
type: 'mkv',
|
||||
});
|
||||
}
|
||||
else {
|
||||
const url = baseUrl + resumeDrive;
|
||||
const resumeDriveRes = yield axios_1.default.get(url, { headers: headers_1.headers });
|
||||
const resumeDriveHtml = resumeDriveRes.data;
|
||||
const $resumeDrive = cheerio.load(resumeDriveHtml);
|
||||
const resumeLink = $resumeDrive('.btn-success').attr('href');
|
||||
// console.log('resumeLink', resumeLink);
|
||||
if (resumeLink) {
|
||||
streamLinks.push({
|
||||
server: 'ResumeCloud',
|
||||
link: resumeLink,
|
||||
type: 'mkv',
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
console.log('Resume link not found');
|
||||
}
|
||||
//instant link
|
||||
try {
|
||||
const seed = $drive('.btn-danger').attr('href') || '';
|
||||
console.log('seed', seed);
|
||||
if (!seed.includes('?url=')) {
|
||||
const newLinkRes = yield axios_1.default.head(seed, { headers: headers_1.headers, signal });
|
||||
console.log('newLinkRes', (_e = newLinkRes.request) === null || _e === void 0 ? void 0 : _e.responseURL);
|
||||
const newLink = ((_h = (_g = (_f = newLinkRes.request) === null || _f === void 0 ? void 0 : _f.responseURL) === null || _g === void 0 ? void 0 : _g.split('?url=')) === null || _h === void 0 ? void 0 : _h[1]) || seed;
|
||||
streamLinks.push({ server: 'G-Drive', link: newLink, type: 'mkv' });
|
||||
}
|
||||
else {
|
||||
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 = yield fetch(videoSeedUrl, {
|
||||
method: 'POST',
|
||||
body: InstantFromData,
|
||||
headers: {
|
||||
'x-token': videoSeedUrl,
|
||||
},
|
||||
});
|
||||
const instantLinkData = yield instantLinkRes.json();
|
||||
// console.log('instantLinkData', instantLinkData);
|
||||
if (instantLinkData.error === false) {
|
||||
const instantLink = instantLinkData.url;
|
||||
streamLinks.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 streamLinks;
|
||||
}
|
||||
catch (error) {
|
||||
console.log('gdflix error: ', error);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
}
|
||||
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,a)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar=this&&this.__importStar||function(){var e=function(t){return e=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(null!=t)for(var i=e(t),a=0;a<i.length;a++)"default"!==i[a]&&__createBinding(r,t,i[a]);return __setModuleDefault(r,t),r}}(),__awaiter=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))(function(a,n){function o(e){try{s(i.next(e))}catch(e){n(e)}}function d(e){try{s(i.throw(e))}catch(e){n(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(o,d)}s((i=i.apply(e,t||[])).next())})},__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.gdFlixExtracter=gdFlixExtracter;const axios_1=__importDefault(require("axios")),cheerio=__importStar(require("cheerio")),headers_1=require("./headers");function gdFlixExtracter(e,t){return __awaiter(this,void 0,void 0,function*(){var r,i,a,n,o,d,s;try{const l=[],c=(yield(0,axios_1.default)(`${e}`,{headers:headers_1.headers,signal:t})).data;let u=cheerio.load(c);if(null===(r=u("body").attr("onload"))||void 0===r?void 0:r.includes("location.replace")){const e=null===(n=null===(a=null===(i=u("body").attr("onload"))||void 0===i?void 0:i.split("location.replace('"))||void 0===a?void 0:a[1].split("'"))||void 0===n?void 0:n[0];if(e){const r=yield axios_1.default.get(e,{headers:headers_1.headers,signal:t});u=cheerio.load(r.data)}}try{const t=e.split("/").slice(0,3).join("/"),r=u(".btn-secondary").attr("href")||"";if(r.includes("indexbot")){const e=yield axios_1.default.get(r,{headers:headers_1.headers}),t=e.data.match(/formData\.append\('token', '([a-f0-9]+)'\)/)[1],i=new FormData;i.append("token",t);const a=e.data.match(/fetch\('\/download\?id=([a-zA-Z0-9\/+]+)'/)[1],n=r.split("/download")[0],o=yield fetch(n+"/download?id="+a,{method:"POST",body:i,headers:{Referer:r,Cookie:"PHPSESSID=7e9658ce7c805dab5bbcea9046f7f308"}}),d=yield o.json();l.push({server:"ResumeBot",link:d.url,type:"mkv"})}else{const e=t+r,i=(yield axios_1.default.get(e,{headers:headers_1.headers})).data,a=cheerio.load(i)(".btn-success").attr("href");a&&l.push({server:"ResumeCloud",link:a,type:"mkv"})}}catch(e){}try{const e=u(".btn-danger").attr("href")||"";if(e.includes("?url=")){const t=e.split("=")[1],r=new FormData;r.append("keys",t);const i=e.split("/").slice(0,3).join("/")+"/api",a=yield fetch(i,{method:"POST",body:r,headers:{"x-token":i}}),n=yield a.json();if(!1===n.error){const e=n.url;l.push({server:"Gdrive-Instant",link:e,type:"mkv"})}}else{const r=(null===(s=null===(d=null===(o=(yield axios_1.default.head(e,{headers:headers_1.headers,signal:t})).request)||void 0===o?void 0:o.responseURL)||void 0===d?void 0:d.split("?url="))||void 0===s?void 0:s[1])||e;l.push({server:"G-Drive",link:r,type:"mkv"})}}catch(e){}return l}catch(e){return[]}})}
|
||||
39
dist/getBaseUrl.js
vendored
39
dist/getBaseUrl.js
vendored
@@ -1,38 +1 @@
|
||||
"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.getBaseUrl = void 0;
|
||||
// 1 hour
|
||||
const expireTime = 60 * 60 * 1000;
|
||||
const getBaseUrl = (providerValue) => __awaiter(void 0, void 0, void 0, function* () {
|
||||
try {
|
||||
let baseUrl = "";
|
||||
const cacheKey = "CacheBaseUrl" + providerValue;
|
||||
const timeKey = "baseUrlTime" + providerValue;
|
||||
// const cachedUrl = cacheStorageService.getString(cacheKey);
|
||||
// const cachedTime = cacheStorageService.getObject<number>(timeKey);
|
||||
// if (cachedUrl && cachedTime && Date.now() - cachedTime < expireTime) {
|
||||
// baseUrl = cachedUrl;
|
||||
// } else {
|
||||
const baseUrlRes = yield fetch("https://himanshu8443.github.io/providers/modflix.json");
|
||||
const baseUrlData = yield baseUrlRes.json();
|
||||
baseUrl = baseUrlData[providerValue].url;
|
||||
// cacheStorageService.setString(cacheKey, baseUrl);
|
||||
// cacheStorageService.setObject(timeKey, Date.now());
|
||||
// }
|
||||
return baseUrl;
|
||||
}
|
||||
catch (error) {
|
||||
console.error(`Error fetching baseUrl: ${providerValue}`, error);
|
||||
return "";
|
||||
}
|
||||
});
|
||||
exports.getBaseUrl = getBaseUrl;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getBaseUrl=void 0;const expireTime=36e5,getBaseUrl=e=>__awaiter(void 0,void 0,void 0,function*(){try{let t="";const n=yield fetch("https://himanshu8443.github.io/providers/modflix.json");return t=(yield n.json())[e].url,t}catch(e){return""}});exports.getBaseUrl=getBaseUrl;
|
||||
49
dist/gofileExtracter.js
vendored
49
dist/gofileExtracter.js
vendored
@@ -1,48 +1 @@
|
||||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.gofileExtracter = gofileExtracter;
|
||||
const axios_1 = __importDefault(require("axios"));
|
||||
function gofileExtracter(id) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
try {
|
||||
const gofileRes = yield axios_1.default.get('https://gofile.io/d/' + id);
|
||||
const genAccountres = yield axios_1.default.post('https://api.gofile.io/accounts');
|
||||
const token = genAccountres.data.data.token;
|
||||
console.log('gofile token', token);
|
||||
const wtRes = yield axios_1.default.get('https://gofile.io/dist/js/global.js');
|
||||
const wt = wtRes.data.match(/appdata\.wt\s*=\s*["']([^"']+)["']/)[1];
|
||||
console.log('gofile wt', wt);
|
||||
const res = yield axios_1.default.get(`https://api.gofile.io/contents/${id}?wt=${wt}`, {
|
||||
headers: {
|
||||
Authorization: `Bearer ${token}`,
|
||||
},
|
||||
});
|
||||
const oId = Object.keys(res.data.data.children)[0];
|
||||
console.log('gofile extracter', res.data.data.children[oId].link);
|
||||
const link = res.data.data.children[oId].link;
|
||||
return {
|
||||
link,
|
||||
token,
|
||||
};
|
||||
}
|
||||
catch (e) {
|
||||
console.log('gofile extracter err', e);
|
||||
return {
|
||||
link: '',
|
||||
token: '',
|
||||
};
|
||||
}
|
||||
});
|
||||
}
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,a,i){return new(a||(a=Promise))(function(o,n){function r(t){try{l(i.next(t))}catch(t){n(t)}}function s(t){try{l(i.throw(t))}catch(t){n(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof a?e:new a(function(t){t(e)})).then(r,s)}l((i=i.apply(t,e||[])).next())})},__importDefault=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.gofileExtracter=gofileExtracter;const axios_1=__importDefault(require("axios"));function gofileExtracter(t){return __awaiter(this,void 0,void 0,function*(){try{yield axios_1.default.get("https://gofile.io/d/"+t);const e=(yield axios_1.default.post("https://api.gofile.io/accounts")).data.data.token,a=(yield axios_1.default.get("https://gofile.io/dist/js/global.js")).data.match(/appdata\.wt\s*=\s*["']([^"']+)["']/)[1],i=yield axios_1.default.get(`https://api.gofile.io/contents/${t}?wt=${a}`,{headers:{Authorization:`Bearer ${e}`}}),o=Object.keys(i.data.data.children)[0];return{link:i.data.data.children[o].link,token:e}}catch(t){return{link:"",token:""}}})}
|
||||
15
dist/guardahd/catalog.js
vendored
15
dist/guardahd/catalog.js
vendored
@@ -1,14 +1 @@
|
||||
"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 = [];
|
||||
"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=[];
|
||||
100
dist/guardahd/meta.js
vendored
100
dist/guardahd/meta.js
vendored
@@ -1,99 +1 @@
|
||||
"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;
|
||||
"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;
|
||||
80
dist/guardahd/posts.js
vendored
80
dist/guardahd/posts.js
vendored
@@ -1,79 +1 @@
|
||||
"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;
|
||||
"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;
|
||||
118
dist/guardahd/stream.js
vendored
118
dist/guardahd/stream.js
vendored
@@ -1,117 +1 @@
|
||||
"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;
|
||||
"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;
|
||||
64
dist/hdhub4u/catalog.js
vendored
64
dist/hdhub4u/catalog.js
vendored
@@ -1,63 +1 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.genres = exports.catalog = void 0;
|
||||
exports.catalog = [
|
||||
{
|
||||
title: "Latest",
|
||||
filter: "",
|
||||
},
|
||||
{
|
||||
title: "Web Series",
|
||||
filter: "/category/web-series",
|
||||
},
|
||||
{
|
||||
title: "Hollywood ",
|
||||
filter: "/category/hollywood-movies",
|
||||
},
|
||||
{
|
||||
title: "South Movies",
|
||||
filter: "/category/south-hindi-movies",
|
||||
},
|
||||
];
|
||||
exports.genres = [
|
||||
{
|
||||
title: "Action",
|
||||
filter: "/category/action",
|
||||
},
|
||||
{
|
||||
title: "Crime",
|
||||
filter: "/category/crime",
|
||||
},
|
||||
{
|
||||
title: "Comedy",
|
||||
filter: "/category/comedy",
|
||||
},
|
||||
{
|
||||
title: "Drama",
|
||||
filter: "/category/drama",
|
||||
},
|
||||
{
|
||||
title: "Horror",
|
||||
filter: "/category/horror",
|
||||
},
|
||||
{
|
||||
title: "Family",
|
||||
filter: "/category/family",
|
||||
},
|
||||
{
|
||||
title: "Sci-Fi",
|
||||
filter: "/category/sifi",
|
||||
},
|
||||
{
|
||||
title: "Thriller",
|
||||
filter: "/category/triller",
|
||||
},
|
||||
{
|
||||
title: "Romance",
|
||||
filter: "/category/romance",
|
||||
},
|
||||
{
|
||||
title: "Fight",
|
||||
filter: "/category/fight",
|
||||
},
|
||||
];
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.genres=exports.catalog=void 0,exports.catalog=[{title:"Latest",filter:""},{title:"Web Series",filter:"/category/web-series"},{title:"Hollywood ",filter:"/category/hollywood-movies"},{title:"South Movies",filter:"/category/south-hindi-movies"}],exports.genres=[{title:"Action",filter:"/category/action"},{title:"Crime",filter:"/category/crime"},{title:"Comedy",filter:"/category/comedy"},{title:"Drama",filter:"/category/drama"},{title:"Horror",filter:"/category/horror"},{title:"Family",filter:"/category/family"},{title:"Sci-Fi",filter:"/category/sifi"},{title:"Thriller",filter:"/category/triller"},{title:"Romance",filter:"/category/romance"},{title:"Fight",filter:"/category/fight"}];
|
||||
128
dist/hdhub4u/meta.js
vendored
128
dist/hdhub4u/meta.js
vendored
@@ -1,127 +1 @@
|
||||
"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 hdbHeaders = {
|
||||
Cookie: "xla=s4t",
|
||||
Referer: "https://google.com",
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0",
|
||||
};
|
||||
const getMeta = function (_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ link, providerContext, }) {
|
||||
var _b;
|
||||
try {
|
||||
const { axios, cheerio } = providerContext;
|
||||
const url = link;
|
||||
const res = yield axios.get(url, { headers: hdbHeaders });
|
||||
const data = res.data;
|
||||
const $ = cheerio.load(data);
|
||||
const container = $(".page-body");
|
||||
const imdbId = ((_b = container
|
||||
.find('a[href*="imdb.com/title/tt"]:not([href*="imdb.com/title/tt/"])')
|
||||
.attr("href")) === null || _b === void 0 ? void 0 : _b.split("/")[4]) || "";
|
||||
const title = container
|
||||
.find('h2[data-ved="2ahUKEwjL0NrBk4vnAhWlH7cAHRCeAlwQ3B0oATAfegQIFBAM"],h2[data-ved="2ahUKEwiP0pGdlermAhUFYVAKHV8tAmgQ3B0oATAZegQIDhAM"]')
|
||||
.text();
|
||||
const type = title.toLocaleLowerCase().includes("season")
|
||||
? "series"
|
||||
: "movie";
|
||||
const synopsis = container
|
||||
.find('strong:contains("DESCRIPTION")')
|
||||
.parent()
|
||||
.text()
|
||||
.replace("DESCRIPTION:", "");
|
||||
const image = container.find('img[decoding="async"]').attr("src") || "";
|
||||
// Links
|
||||
const links = [];
|
||||
const directLink = [];
|
||||
// direct link type
|
||||
$('strong:contains("EPiSODE")').map((i, element) => {
|
||||
const epTitle = $(element).parent().parent().text();
|
||||
const episodesLink = $(element)
|
||||
.parent()
|
||||
.parent()
|
||||
.parent()
|
||||
.next()
|
||||
.next()
|
||||
.find("a")
|
||||
.attr("href") ||
|
||||
$(element).parent().parent().parent().next().find("a").attr("href");
|
||||
if (episodesLink && episodesLink) {
|
||||
directLink.push({
|
||||
title: epTitle,
|
||||
link: episodesLink,
|
||||
});
|
||||
}
|
||||
});
|
||||
if (directLink.length === 0) {
|
||||
container.find('a:contains("EPiSODE")').map((i, element) => {
|
||||
const epTitle = $(element).text();
|
||||
const episodesLink = $(element).attr("href");
|
||||
if (episodesLink) {
|
||||
directLink.push({
|
||||
title: epTitle.toLocaleUpperCase(),
|
||||
link: episodesLink,
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
if (directLink.length > 0) {
|
||||
links.push({
|
||||
title: title,
|
||||
directLinks: directLink,
|
||||
});
|
||||
}
|
||||
if (directLink.length === 0) {
|
||||
container
|
||||
.find('a:contains("480"),a:contains("720"),a:contains("1080"),a:contains("2160"),a:contains("4K")')
|
||||
.map((i, element) => {
|
||||
var _a;
|
||||
const quality = ((_a = $(element)
|
||||
.text()
|
||||
.match(/\b(480p|720p|1080p|2160p)\b/i)) === null || _a === void 0 ? void 0 : _a[0]) || "";
|
||||
const movieLinks = $(element).attr("href");
|
||||
const title = $(element).text();
|
||||
if (movieLinks) {
|
||||
links.push({
|
||||
directLinks: [
|
||||
{ link: movieLinks, title: "Movie", type: "movie" },
|
||||
],
|
||||
quality: quality,
|
||||
title: title,
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
// console.log('drive meta', title, synopsis, image, imdbId, type, links);
|
||||
return {
|
||||
title,
|
||||
synopsis,
|
||||
image,
|
||||
imdbId,
|
||||
type,
|
||||
linkList: links,
|
||||
};
|
||||
}
|
||||
catch (err) {
|
||||
console.error(err);
|
||||
return {
|
||||
title: "",
|
||||
synopsis: "",
|
||||
image: "",
|
||||
imdbId: "",
|
||||
type: "movie",
|
||||
linkList: [],
|
||||
};
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getMeta = getMeta;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,n,i){return new(n||(n=Promise))(function(a,o){function r(t){try{c(i.next(t))}catch(t){o(t)}}function s(t){try{c(i.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?a(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(r,s)}c((i=i.apply(t,e||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getMeta=void 0;const hdbHeaders={Cookie:"xla=s4t",Referer:"https://google.com","User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0"},getMeta=function(t){return __awaiter(this,arguments,void 0,function*({link:t,providerContext:e}){var n;try{const{axios:i,cheerio:a}=e,o=t,r=(yield i.get(o,{headers:hdbHeaders})).data,s=a.load(r),c=s(".page-body"),d=(null===(n=c.find('a[href*="imdb.com/title/tt"]:not([href*="imdb.com/title/tt/"])').attr("href"))||void 0===n?void 0:n.split("/")[4])||"",l=c.find('h2[data-ved="2ahUKEwjL0NrBk4vnAhWlH7cAHRCeAlwQ3B0oATAfegQIFBAM"],h2[data-ved="2ahUKEwiP0pGdlermAhUFYVAKHV8tAmgQ3B0oATAZegQIDhAM"]').text(),p=l.toLocaleLowerCase().includes("season")?"series":"movie",h=c.find('strong:contains("DESCRIPTION")').parent().text().replace("DESCRIPTION:",""),f=c.find('img[decoding="async"]').attr("src")||"",u=[],g=[];return s('strong:contains("EPiSODE")').map((t,e)=>{const n=s(e).parent().parent().text(),i=s(e).parent().parent().parent().next().next().find("a").attr("href")||s(e).parent().parent().parent().next().find("a").attr("href");i&&i&&g.push({title:n,link:i})}),0===g.length&&c.find('a:contains("EPiSODE")').map((t,e)=>{const n=s(e).text(),i=s(e).attr("href");i&&g.push({title:n.toLocaleUpperCase(),link:i})}),g.length>0&&u.push({title:l,directLinks:g}),0===g.length&&c.find('a:contains("480"),a:contains("720"),a:contains("1080"),a:contains("2160"),a:contains("4K")').map((t,e)=>{var n;const i=(null===(n=s(e).text().match(/\b(480p|720p|1080p|2160p)\b/i))||void 0===n?void 0:n[0])||"",a=s(e).attr("href"),o=s(e).text();a&&u.push({directLinks:[{link:a,title:"Movie",type:"movie"}],quality:i,title:o})}),{title:l,synopsis:h,image:f,imdbId:d,type:p,linkList:u}}catch(t){return{title:"",synopsis:"",image:"",imdbId:"",type:"movie",linkList:[]}}})};exports.getMeta=getMeta;
|
||||
69
dist/hdhub4u/posts.js
vendored
69
dist/hdhub4u/posts.js
vendored
@@ -1,68 +1 @@
|
||||
"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 hdbHeaders = {
|
||||
Cookie: "xla=s4t",
|
||||
Referer: "https://google.com",
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0",
|
||||
};
|
||||
const getPosts = function (_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ filter, page, signal, providerContext, }) {
|
||||
const { getBaseUrl } = providerContext;
|
||||
const baseUrl = yield getBaseUrl("hdhub");
|
||||
const url = `${baseUrl + filter}/page/${page}/`;
|
||||
return posts({ url, signal, providerContext });
|
||||
});
|
||||
};
|
||||
exports.getPosts = getPosts;
|
||||
const getSearchPosts = function (_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ searchQuery, page, signal, providerContext, }) {
|
||||
const { getBaseUrl } = providerContext;
|
||||
const baseUrl = yield getBaseUrl("hdhub");
|
||||
const url = `${baseUrl}/page/${page}/?s=${searchQuery}`;
|
||||
return posts({ url, signal, providerContext });
|
||||
});
|
||||
};
|
||||
exports.getSearchPosts = getSearchPosts;
|
||||
function posts(_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ url, signal, providerContext, }) {
|
||||
const { cheerio } = providerContext;
|
||||
try {
|
||||
const res = yield fetch(url, {
|
||||
headers: hdbHeaders,
|
||||
signal,
|
||||
});
|
||||
const data = yield res.text();
|
||||
const $ = cheerio.load(data);
|
||||
const catalog = [];
|
||||
$(".recent-movies")
|
||||
.children()
|
||||
.map((i, element) => {
|
||||
const title = $(element).find("figure").find("img").attr("alt");
|
||||
const link = $(element).find("a").attr("href");
|
||||
const image = $(element).find("figure").find("img").attr("src");
|
||||
if (title && link && image) {
|
||||
catalog.push({
|
||||
title: title.replace("Download", "").trim(),
|
||||
link: link,
|
||||
image: image,
|
||||
});
|
||||
}
|
||||
});
|
||||
return catalog;
|
||||
}
|
||||
catch (err) {
|
||||
console.error("hdhubGetPosts error ", err);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
}
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))(function(i,o){function s(t){try{c(n.next(t))}catch(t){o(t)}}function a(t){try{c(n.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r(function(t){t(e)})).then(s,a)}c((n=n.apply(t,e||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getSearchPosts=exports.getPosts=void 0;const hdbHeaders={Cookie:"xla=s4t",Referer:"https://google.com","User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0"},getPosts=function(t){return __awaiter(this,arguments,void 0,function*({filter:t,page:e,signal:r,providerContext:n}){const{getBaseUrl:i}=n;return posts({url:`${(yield i("hdhub"))+t}/page/${e}/`,signal:r,providerContext:n})})};exports.getPosts=getPosts;const getSearchPosts=function(t){return __awaiter(this,arguments,void 0,function*({searchQuery:t,page:e,signal:r,providerContext:n}){const{getBaseUrl:i}=n;return posts({url:`${yield i("hdhub")}/page/${e}/?s=${t}`,signal:r,providerContext:n})})};function posts(t){return __awaiter(this,arguments,void 0,function*({url:t,signal:e,providerContext:r}){const{cheerio:n}=r;try{const r=yield fetch(t,{headers:hdbHeaders,signal:e}),i=yield r.text(),o=n.load(i),s=[];return o(".recent-movies").children().map((t,e)=>{const r=o(e).find("figure").find("img").attr("alt"),n=o(e).find("a").attr("href"),i=o(e).find("figure").find("img").attr("src");r&&n&&i&&s.push({title:r.replace("Download","").trim(),link:n,image:i})}),s}catch(t){return[]}})}exports.getSearchPosts=getSearchPosts;
|
||||
165
dist/hdhub4u/stream.js
vendored
165
dist/hdhub4u/stream.js
vendored
@@ -1,164 +1 @@
|
||||
"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 = getStream;
|
||||
exports.getRedirectLinks = getRedirectLinks;
|
||||
exports.decodeString = decodeString;
|
||||
function getStream(_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ link, signal, providerContext, }) {
|
||||
var _b, _c, _d, _e;
|
||||
const { axios, cheerio, extractors, commonHeaders: headers, } = providerContext;
|
||||
const { hubcloudExtracter } = extractors;
|
||||
let hubdriveLink = "";
|
||||
if (link.includes("hubdrive")) {
|
||||
const hubdriveRes = yield axios.get(link, { headers, signal });
|
||||
const hubdriveText = hubdriveRes.data;
|
||||
const $ = cheerio.load(hubdriveText);
|
||||
hubdriveLink =
|
||||
$(".btn.btn-primary.btn-user.btn-success1.m-1").attr("href") || link;
|
||||
}
|
||||
else {
|
||||
const res = yield axios.get(link, { headers, signal });
|
||||
const text = res.data;
|
||||
const encryptedString = (_d = (_c = (_b = text.split("s('o','")) === null || _b === void 0 ? void 0 : _b[1]) === null || _c === void 0 ? void 0 : _c.split("',180")) === null || _d === void 0 ? void 0 : _d[0];
|
||||
const decodedString = decodeString(encryptedString);
|
||||
link = atob(decodedString === null || decodedString === void 0 ? void 0 : decodedString.o);
|
||||
const redirectLink = yield getRedirectLinks(link, signal, headers);
|
||||
const redirectLinkRes = yield axios.get(redirectLink, { headers, signal });
|
||||
const redirectLinkText = redirectLinkRes.data;
|
||||
const $ = cheerio.load(redirectLinkText);
|
||||
hubdriveLink =
|
||||
$('h3:contains("1080p")').find("a").attr("href") ||
|
||||
redirectLinkText.match(/href="(https:\/\/hubcloud\.[^\/]+\/drive\/[^"]+)"/)[1];
|
||||
if (hubdriveLink.includes("hubdrive")) {
|
||||
const hubdriveRes = yield axios.get(hubdriveLink, { headers, signal });
|
||||
const hubdriveText = hubdriveRes.data;
|
||||
const $$ = cheerio.load(hubdriveText);
|
||||
hubdriveLink =
|
||||
$$(".btn.btn-primary.btn-user.btn-success1.m-1").attr("href") ||
|
||||
hubdriveLink;
|
||||
}
|
||||
}
|
||||
const hubdriveLinkRes = yield axios.get(hubdriveLink, { headers, signal });
|
||||
const hubcloudText = hubdriveLinkRes.data;
|
||||
const hubcloudLink = ((_e = hubcloudText.match(/<META HTTP-EQUIV="refresh" content="0; url=([^"]+)">/i)) === null || _e === void 0 ? void 0 : _e[1]) || hubdriveLink;
|
||||
try {
|
||||
return yield hubcloudExtracter(hubcloudLink, signal);
|
||||
}
|
||||
catch (error) {
|
||||
console.log("hd hub 4 getStream error: ", error);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
}
|
||||
const encode = function (value) {
|
||||
return btoa(value.toString());
|
||||
};
|
||||
const decode = function (value) {
|
||||
if (value === undefined) {
|
||||
return "";
|
||||
}
|
||||
return atob(value.toString());
|
||||
};
|
||||
const pen = function (value) {
|
||||
return value.replace(/[a-zA-Z]/g, function (_0x1a470e) {
|
||||
return String.fromCharCode((_0x1a470e <= "Z" ? 90 : 122) >=
|
||||
(_0x1a470e = _0x1a470e.charCodeAt(0) + 13)
|
||||
? _0x1a470e
|
||||
: _0x1a470e - 26);
|
||||
});
|
||||
};
|
||||
const abortableTimeout = (ms, { signal } = {}) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (signal && signal.aborted) {
|
||||
return reject(new Error("Aborted"));
|
||||
}
|
||||
const timer = setTimeout(resolve, ms);
|
||||
if (signal) {
|
||||
signal.addEventListener("abort", () => {
|
||||
clearTimeout(timer);
|
||||
reject(new Error("Aborted"));
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
function getRedirectLinks(link, signal, headers) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
try {
|
||||
const res = yield fetch(link, { headers, signal });
|
||||
const resText = yield res.text();
|
||||
var regex = /ck\('_wp_http_\d+','([^']+)'/g;
|
||||
var combinedString = "";
|
||||
var match;
|
||||
while ((match = regex.exec(resText)) !== null) {
|
||||
// console.log(match[1]);
|
||||
combinedString += match[1];
|
||||
}
|
||||
// console.log(decode(combinedString));
|
||||
const decodedString = decode(pen(decode(decode(combinedString))));
|
||||
// console.log(decodedString);
|
||||
const data = JSON.parse(decodedString);
|
||||
console.log(data);
|
||||
const token = encode(data === null || data === void 0 ? void 0 : data.data);
|
||||
const blogLink = (data === null || data === void 0 ? void 0 : data.wp_http1) + "?re=" + token;
|
||||
// abort timeout on signal
|
||||
let wait = abortableTimeout((Number(data === null || data === void 0 ? void 0 : data.total_time) + 3) * 1000, {
|
||||
signal,
|
||||
});
|
||||
yield wait;
|
||||
console.log("blogLink", blogLink);
|
||||
let vcloudLink = "Invalid Request";
|
||||
while (vcloudLink.includes("Invalid Request")) {
|
||||
const blogRes = yield fetch(blogLink, { headers, signal });
|
||||
const blogResText = (yield blogRes.text());
|
||||
if (blogResText.includes("Invalid Request")) {
|
||||
console.log(blogResText);
|
||||
}
|
||||
else {
|
||||
vcloudLink = blogResText.match(/var reurl = "([^"]+)"/) || "";
|
||||
break;
|
||||
}
|
||||
}
|
||||
// console.log('vcloudLink', vcloudLink?.[1]);
|
||||
return blogLink || link;
|
||||
}
|
||||
catch (err) {
|
||||
console.log("Error in getRedirectLinks", err);
|
||||
return link;
|
||||
}
|
||||
});
|
||||
}
|
||||
function rot13(str) {
|
||||
return str.replace(/[a-zA-Z]/g, function (char) {
|
||||
const charCode = char.charCodeAt(0);
|
||||
const isUpperCase = char <= "Z";
|
||||
const baseCharCode = isUpperCase ? 65 : 97;
|
||||
return String.fromCharCode(((charCode - baseCharCode + 13) % 26) + baseCharCode);
|
||||
});
|
||||
}
|
||||
function decodeString(encryptedString) {
|
||||
try {
|
||||
// First base64 decode
|
||||
let decoded = atob(encryptedString);
|
||||
// Second base64 decode
|
||||
decoded = atob(decoded);
|
||||
// ROT13 decode
|
||||
decoded = rot13(decoded);
|
||||
// Third base64 decode
|
||||
decoded = atob(decoded);
|
||||
// Parse JSON
|
||||
return JSON.parse(decoded);
|
||||
}
|
||||
catch (error) {
|
||||
console.error("Error decoding string:", error);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{c(n.next(e))}catch(e){o(e)}}function d(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,d)}c((n=n.apply(e,t||[])).next())})};function getStream(e){return __awaiter(this,arguments,void 0,function*({link:e,signal:t,providerContext:r}){var n,i,o,a;const{axios:d,cheerio:c,extractors:s,commonHeaders:l}=r,{hubcloudExtracter:u}=s;let h="";if(e.includes("hubdrive")){const r=(yield d.get(e,{headers:l,signal:t})).data;h=c.load(r)(".btn.btn-primary.btn-user.btn-success1.m-1").attr("href")||e}else{const r=decodeString(null===(o=null===(i=null===(n=(yield d.get(e,{headers:l,signal:t})).data.split("s('o','"))||void 0===n?void 0:n[1])||void 0===i?void 0:i.split("',180"))||void 0===o?void 0:o[0]);e=atob(null==r?void 0:r.o);const a=yield getRedirectLinks(e,t,l),s=(yield d.get(a,{headers:l,signal:t})).data;if(h=c.load(s)('h3:contains("1080p")').find("a").attr("href")||s.match(/href="(https:\/\/hubcloud\.[^\/]+\/drive\/[^"]+)"/)[1],h.includes("hubdrive")){const e=(yield d.get(h,{headers:l,signal:t})).data;h=c.load(e)(".btn.btn-primary.btn-user.btn-success1.m-1").attr("href")||h}}const f=(null===(a=(yield d.get(h,{headers:l,signal:t})).data.match(/<META HTTP-EQUIV="refresh" content="0; url=([^"]+)">/i))||void 0===a?void 0:a[1])||h;try{return yield u(f,t)}catch(e){return[]}})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.getStream=getStream,exports.getRedirectLinks=getRedirectLinks,exports.decodeString=decodeString;const encode=function(e){return btoa(e.toString())},decode=function(e){return void 0===e?"":atob(e.toString())},pen=function(e){return e.replace(/[a-zA-Z]/g,function(e){return String.fromCharCode((e<="Z"?90:122)>=(e=e.charCodeAt(0)+13)?e:e-26)})},abortableTimeout=(e,{signal:t}={})=>new Promise((r,n)=>{if(t&&t.aborted)return n(new Error("Aborted"));const i=setTimeout(r,e);t&&t.addEventListener("abort",()=>{clearTimeout(i),n(new Error("Aborted"))})});function getRedirectLinks(e,t,r){return __awaiter(this,void 0,void 0,function*(){try{const a=yield fetch(e,{headers:r,signal:t}),d=yield a.text();for(var n,i=/ck\('_wp_http_\d+','([^']+)'/g,o="";null!==(n=i.exec(d));)o+=n[1];const c=decode(pen(decode(decode(o)))),s=JSON.parse(c),l=encode(null==s?void 0:s.data),u=(null==s?void 0:s.wp_http1)+"?re="+l;let h=abortableTimeout(1e3*(Number(null==s?void 0:s.total_time)+3),{signal:t});yield h;let f="Invalid Request";for(;f.includes("Invalid Request");){const e=yield fetch(u,{headers:r,signal:t}),n=yield e.text();if(!n.includes("Invalid Request")){f=n.match(/var reurl = "([^"]+)"/)||"";break}}return u||e}catch(t){return e}})}function rot13(e){return e.replace(/[a-zA-Z]/g,function(e){const t=e.charCodeAt(0),r=e<="Z"?65:97;return String.fromCharCode((t-r+13)%26+r)})}function decodeString(e){try{let t=atob(e);return t=atob(t),t=rot13(t),t=atob(t),JSON.parse(t)}catch(e){return null}}
|
||||
12
dist/headers.js
vendored
12
dist/headers.js
vendored
@@ -1,11 +1 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.headers = void 0;
|
||||
exports.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',
|
||||
'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',
|
||||
};
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.headers=void 0,exports.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"',"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"};
|
||||
23
dist/hiAnime/catalog.js
vendored
23
dist/hiAnime/catalog.js
vendored
@@ -1,22 +1 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.genres = exports.catalog = void 0;
|
||||
exports.catalog = [
|
||||
{
|
||||
title: "Recent",
|
||||
filter: "/anime/zoro/recent-episodes",
|
||||
},
|
||||
{
|
||||
title: "Top Airing",
|
||||
filter: "/anime/zoro/top-airing",
|
||||
},
|
||||
{
|
||||
title: "Most Popular",
|
||||
filter: "/anime/zoro/most-popular",
|
||||
},
|
||||
{
|
||||
title: "Most Favorited",
|
||||
filter: "/anime/zoro/most-favorite",
|
||||
},
|
||||
];
|
||||
exports.genres = [];
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.genres=exports.catalog=void 0,exports.catalog=[{title:"Recent",filter:"/anime/zoro/recent-episodes"},{title:"Top Airing",filter:"/anime/zoro/top-airing"},{title:"Most Popular",filter:"/anime/zoro/most-popular"},{title:"Most Favorited",filter:"/anime/zoro/most-favorite"}],exports.genres=[];
|
||||
87
dist/hiAnime/meta.js
vendored
87
dist/hiAnime/meta.js
vendored
@@ -1,86 +1 @@
|
||||
"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, }) {
|
||||
try {
|
||||
const { getBaseUrl, axios } = providerContext;
|
||||
const baseUrl = yield getBaseUrl("consumet");
|
||||
const url = `${baseUrl}/anime/zoro/info?id=` + link;
|
||||
const res = yield axios.get(url);
|
||||
const data = res.data;
|
||||
const meta = {
|
||||
title: data.title,
|
||||
synopsis: data.description,
|
||||
image: data.image,
|
||||
tags: [
|
||||
data === null || data === void 0 ? void 0 : data.type,
|
||||
(data === null || data === void 0 ? void 0 : data.subOrDub) === "both" ? "Sub And Dub" : data === null || data === void 0 ? void 0 : data.subOrDub,
|
||||
],
|
||||
imdbId: "",
|
||||
type: data.episodes.length > 0 ? "series" : "movie",
|
||||
};
|
||||
const linkList = [];
|
||||
const subLinks = [];
|
||||
data.episodes.forEach((episode) => {
|
||||
if (!(episode === null || episode === void 0 ? void 0 : episode.isSubbed)) {
|
||||
return;
|
||||
}
|
||||
const title = "Episode " + episode.number + ((episode === null || episode === void 0 ? void 0 : episode.isFiller) ? " (Filler)" : "");
|
||||
const link = episode.id + "$sub";
|
||||
if (link && title) {
|
||||
subLinks.push({
|
||||
title,
|
||||
link,
|
||||
});
|
||||
}
|
||||
});
|
||||
linkList.push({
|
||||
title: meta.title + " (Sub)",
|
||||
directLinks: subLinks,
|
||||
});
|
||||
if ((data === null || data === void 0 ? void 0 : data.subOrDub) === "both") {
|
||||
const dubLinks = [];
|
||||
data.episodes.forEach((episode) => {
|
||||
if (!(episode === null || episode === void 0 ? void 0 : episode.isDubbed)) {
|
||||
return;
|
||||
}
|
||||
const title = "Episode " + episode.number + ((episode === null || episode === void 0 ? void 0 : episode.isFiller) ? " (Filler)" : "");
|
||||
const link = episode.id + "$dub";
|
||||
if (link && title) {
|
||||
dubLinks.push({
|
||||
title,
|
||||
link,
|
||||
});
|
||||
}
|
||||
});
|
||||
linkList.push({
|
||||
title: meta.title + " (Dub)",
|
||||
directLinks: dubLinks,
|
||||
});
|
||||
}
|
||||
return Object.assign(Object.assign({}, meta), { linkList: linkList });
|
||||
}
|
||||
catch (err) {
|
||||
console.error(err);
|
||||
return {
|
||||
title: "",
|
||||
synopsis: "",
|
||||
image: "",
|
||||
imdbId: "",
|
||||
type: "movie",
|
||||
linkList: [],
|
||||
};
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getMeta = getMeta;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,i,n){return new(i||(i=Promise))(function(s,o){function u(t){try{r(n.next(t))}catch(t){o(t)}}function l(t){try{r(n.throw(t))}catch(t){o(t)}}function r(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(u,l)}r((n=n.apply(t,e||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getMeta=void 0;const getMeta=function(t){return __awaiter(this,arguments,void 0,function*({link:t,providerContext:e}){try{const{getBaseUrl:i,axios:n}=e,s=`${yield i("consumet")}/anime/zoro/info?id=`+t,o=(yield n.get(s)).data,u={title:o.title,synopsis:o.description,image:o.image,tags:[null==o?void 0:o.type,"both"===(null==o?void 0:o.subOrDub)?"Sub And Dub":null==o?void 0:o.subOrDub],imdbId:"",type:o.episodes.length>0?"series":"movie"},l=[],r=[];if(o.episodes.forEach(t=>{if(!(null==t?void 0:t.isSubbed))return;const e="Episode "+t.number+((null==t?void 0:t.isFiller)?" (Filler)":""),i=t.id+"$sub";i&&e&&r.push({title:e,link:i})}),l.push({title:u.title+" (Sub)",directLinks:r}),"both"===(null==o?void 0:o.subOrDub)){const t=[];o.episodes.forEach(e=>{if(!(null==e?void 0:e.isDubbed))return;const i="Episode "+e.number+((null==e?void 0:e.isFiller)?" (Filler)":""),n=e.id+"$dub";n&&i&&t.push({title:i,link:n})}),l.push({title:u.title+" (Dub)",directLinks:t})}return Object.assign(Object.assign({},u),{linkList:l})}catch(t){return{title:"",synopsis:"",image:"",imdbId:"",type:"movie",linkList:[]}}})};exports.getMeta=getMeta;
|
||||
58
dist/hiAnime/posts.js
vendored
58
dist/hiAnime/posts.js
vendored
@@ -1,57 +1 @@
|
||||
"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, page, signal, providerContext, }) {
|
||||
const { getBaseUrl, axios } = providerContext;
|
||||
const baseUrl = yield getBaseUrl("consumet");
|
||||
const url = `${baseUrl + filter}?page=${page}`;
|
||||
return posts({ url, signal, axios });
|
||||
});
|
||||
};
|
||||
exports.getPosts = getPosts;
|
||||
const getSearchPosts = function (_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ searchQuery, page, signal, providerContext, }) {
|
||||
const { getBaseUrl, axios } = providerContext;
|
||||
const baseUrl = yield getBaseUrl("consumet");
|
||||
const url = `${baseUrl}/anime/zoro/${searchQuery}?page=${page}`;
|
||||
return posts({ url, signal, axios });
|
||||
});
|
||||
};
|
||||
exports.getSearchPosts = getSearchPosts;
|
||||
function posts(_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ url, signal, axios, }) {
|
||||
var _b;
|
||||
try {
|
||||
const res = yield axios.get(url, { signal });
|
||||
const data = (_b = res.data) === null || _b === void 0 ? void 0 : _b.results;
|
||||
const catalog = [];
|
||||
data === null || data === void 0 ? void 0 : data.map((element) => {
|
||||
const title = element.title;
|
||||
const link = element.id;
|
||||
const image = element.image;
|
||||
if (title && link && image) {
|
||||
catalog.push({
|
||||
title: title,
|
||||
link: link,
|
||||
image: image,
|
||||
});
|
||||
}
|
||||
});
|
||||
return catalog;
|
||||
}
|
||||
catch (err) {
|
||||
console.error("zoro error ", err);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
}
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,s,n){return new(s||(s=Promise))(function(o,i){function r(t){try{u(n.next(t))}catch(t){i(t)}}function a(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof s?e:new s(function(t){t(e)})).then(r,a)}u((n=n.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,page:e,signal:s,providerContext:n}){const{getBaseUrl:o,axios:i}=n;return posts({url:`${(yield o("consumet"))+t}?page=${e}`,signal:s,axios:i})})};exports.getPosts=getPosts;const getSearchPosts=function(t){return __awaiter(this,arguments,void 0,function*({searchQuery:t,page:e,signal:s,providerContext:n}){const{getBaseUrl:o,axios:i}=n;return posts({url:`${yield o("consumet")}/anime/zoro/${t}?page=${e}`,signal:s,axios:i})})};function posts(t){return __awaiter(this,arguments,void 0,function*({url:t,signal:e,axios:s}){var n;try{const o=null===(n=(yield s.get(t,{signal:e})).data)||void 0===n?void 0:n.results,i=[];return null==o||o.map(t=>{const e=t.title,s=t.id,n=t.image;e&&s&&n&&i.push({title:e,link:s,image:n})}),i}catch(t){return[]}})}exports.getSearchPosts=getSearchPosts;
|
||||
67
dist/hiAnime/stream.js
vendored
67
dist/hiAnime/stream.js
vendored
@@ -1,66 +1 @@
|
||||
"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, providerContext, }) {
|
||||
try {
|
||||
const { getBaseUrl, axios } = providerContext;
|
||||
const baseUrl = yield getBaseUrl("consumet");
|
||||
const servers = ["vidcloud", "vidstreaming"];
|
||||
const url = `${baseUrl}/anime/zoro/watch?episodeId=${id}&server=`;
|
||||
const streamLinks = [];
|
||||
yield Promise.all(servers.map((server) => __awaiter(this, void 0, void 0, function* () {
|
||||
var _a, _b;
|
||||
try {
|
||||
const res = yield axios.get(url + server);
|
||||
if (res.data) {
|
||||
const subtitles = [];
|
||||
(_a = res.data) === null || _a === void 0 ? void 0 : _a.subtitles.forEach((sub) => {
|
||||
var _a, _b;
|
||||
if ((sub === null || sub === void 0 ? void 0 : sub.lang) === "Thumbnails")
|
||||
return;
|
||||
subtitles.push({
|
||||
language: ((_a = sub === null || sub === void 0 ? void 0 : sub.lang) === null || _a === void 0 ? void 0 : _a.slice(0, 2)) || "Und",
|
||||
uri: sub === null || sub === void 0 ? void 0 : sub.url,
|
||||
title: (sub === null || sub === void 0 ? void 0 : sub.lang) || "Undefined",
|
||||
type: ((_b = sub === null || sub === void 0 ? void 0 : sub.url) === null || _b === void 0 ? void 0 : _b.endsWith(".vtt"))
|
||||
? "text/vtt"
|
||||
: "application/x-subrip",
|
||||
});
|
||||
});
|
||||
(_b = res.data) === null || _b === void 0 ? void 0 : _b.sources.forEach((source) => {
|
||||
streamLinks.push({
|
||||
server: server,
|
||||
link: source === null || source === void 0 ? void 0 : source.url,
|
||||
type: (source === null || source === void 0 ? void 0 : source.isM3U8) ? "m3u8" : "mp4",
|
||||
headers: {
|
||||
Referer: "https://megacloud.club/",
|
||||
Origin: "https://megacloud.club",
|
||||
},
|
||||
subtitles: subtitles,
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
})));
|
||||
return streamLinks;
|
||||
}
|
||||
catch (err) {
|
||||
console.error(err);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getStream = getStream;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,i,n){return new(i||(i=Promise))(function(o,r){function l(t){try{u(n.next(t))}catch(t){r(t)}}function a(t){try{u(n.throw(t))}catch(t){r(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(l,a)}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,providerContext:e}){try{const{getBaseUrl:i,axios:n}=e,o=yield i("consumet"),r=["vidcloud","vidstreaming"],l=`${o}/anime/zoro/watch?episodeId=${t}&server=`,a=[];return yield Promise.all(r.map(t=>__awaiter(this,void 0,void 0,function*(){var e,i;try{const o=yield n.get(l+t);if(o.data){const n=[];null===(e=o.data)||void 0===e||e.subtitles.forEach(t=>{var e,i;"Thumbnails"!==(null==t?void 0:t.lang)&&n.push({language:(null===(e=null==t?void 0:t.lang)||void 0===e?void 0:e.slice(0,2))||"Und",uri:null==t?void 0:t.url,title:(null==t?void 0:t.lang)||"Undefined",type:(null===(i=null==t?void 0:t.url)||void 0===i?void 0:i.endsWith(".vtt"))?"text/vtt":"application/x-subrip"})}),null===(i=o.data)||void 0===i||i.sources.forEach(e=>{a.push({server:t,link:null==e?void 0:e.url,type:(null==e?void 0:e.isM3U8)?"m3u8":"mp4",headers:{Referer:"https://megacloud.club/",Origin:"https://megacloud.club"},subtitles:n})})}}catch(t){}}))),a}catch(t){return[]}})};exports.getStream=getStream;
|
||||
133
dist/hubcloudExtractor.js
vendored
133
dist/hubcloudExtractor.js
vendored
@@ -1,132 +1 @@
|
||||
"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;
|
||||
};
|
||||
})();
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.hubcloudExtracter = hubcloudExtracter;
|
||||
const axios_1 = __importDefault(require("axios"));
|
||||
const cheerio = __importStar(require("cheerio"));
|
||||
const headers_1 = require("./headers");
|
||||
const decode = function (value) {
|
||||
if (value === undefined) {
|
||||
return '';
|
||||
}
|
||||
return atob(value.toString());
|
||||
};
|
||||
function hubcloudExtracter(link, signal) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
var _a, _b, _c, _d, _e;
|
||||
try {
|
||||
console.log('hubcloudExtracter', link);
|
||||
const baseUrl = link.split('/').slice(0, 3).join('/');
|
||||
const streamLinks = [];
|
||||
const vLinkRes = yield (0, axios_1.default)(`${link}`, { headers: headers_1.headers, signal });
|
||||
const vLinkText = vLinkRes.data;
|
||||
const $vLink = cheerio.load(vLinkText);
|
||||
const vLinkRedirect = vLinkText.match(/var\s+url\s*=\s*'([^']+)';/) || [];
|
||||
let vcloudLink = decode((_b = (_a = vLinkRedirect[1]) === null || _a === void 0 ? void 0 : _a.split('r=')) === null || _b === void 0 ? void 0 : _b[1]) ||
|
||||
vLinkRedirect[1] ||
|
||||
$vLink('.fa-file-download.fa-lg').parent().attr('href') ||
|
||||
link;
|
||||
console.log('vcloudLink', vcloudLink);
|
||||
if (vcloudLink === null || vcloudLink === void 0 ? void 0 : vcloudLink.startsWith('/')) {
|
||||
vcloudLink = `${baseUrl}${vcloudLink}`;
|
||||
console.log('New vcloudLink', vcloudLink);
|
||||
}
|
||||
const vcloudRes = yield fetch(vcloudLink, {
|
||||
headers: headers_1.headers,
|
||||
signal,
|
||||
redirect: 'follow',
|
||||
});
|
||||
const $ = cheerio.load(yield vcloudRes.text());
|
||||
// console.log('vcloudRes', $.text());
|
||||
const linkClass = $('.btn-success.btn-lg.h6,.btn-danger,.btn-secondary');
|
||||
for (const element of linkClass) {
|
||||
const itm = $(element);
|
||||
let link = itm.attr('href') || '';
|
||||
if ((link === null || link === void 0 ? void 0 : link.includes('.dev')) && !(link === null || link === void 0 ? void 0 : link.includes('/?id='))) {
|
||||
streamLinks.push({ server: 'Cf Worker', link: link, type: 'mkv' });
|
||||
}
|
||||
if (link === null || link === void 0 ? void 0 : link.includes('pixeld')) {
|
||||
if (!(link === null || link === void 0 ? void 0 : link.includes('api'))) {
|
||||
const token = link.split('/').pop();
|
||||
const baseUrl = link.split('/').slice(0, -2).join('/');
|
||||
link = `${baseUrl}/api/file/${token}?download`;
|
||||
}
|
||||
streamLinks.push({ server: 'Pixeldrain', link: link, type: 'mkv' });
|
||||
}
|
||||
if ((link === null || link === void 0 ? void 0 : link.includes('hubcloud')) || (link === null || link === void 0 ? void 0 : link.includes('/?id='))) {
|
||||
try {
|
||||
const newLinkRes = yield axios_1.default.head(link, { headers: headers_1.headers, signal });
|
||||
const newLink = ((_e = (_d = (_c = newLinkRes.request) === null || _c === void 0 ? void 0 : _c.responseURL) === null || _d === void 0 ? void 0 : _d.split('link=')) === null || _e === void 0 ? void 0 : _e[1]) || link;
|
||||
streamLinks.push({ server: 'hubcloud', link: newLink, type: 'mkv' });
|
||||
}
|
||||
catch (error) {
|
||||
console.log('hubcloudExtracter error in hubcloud link: ', error);
|
||||
}
|
||||
}
|
||||
if (link === null || link === void 0 ? void 0 : link.includes('cloudflarestorage')) {
|
||||
streamLinks.push({ server: 'CfStorage', link: link, type: 'mkv' });
|
||||
}
|
||||
if (link === null || link === void 0 ? void 0 : link.includes('fastdl')) {
|
||||
streamLinks.push({ server: 'FastDl', link: link, type: 'mkv' });
|
||||
}
|
||||
if (link.includes('hubcdn')) {
|
||||
streamLinks.push({
|
||||
server: 'HubCdn',
|
||||
link: link,
|
||||
type: 'mkv',
|
||||
});
|
||||
}
|
||||
}
|
||||
console.log('streamLinks', streamLinks);
|
||||
return streamLinks;
|
||||
}
|
||||
catch (error) {
|
||||
console.log('hubcloudExtracter error: ', error);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
}
|
||||
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar=this&&this.__importStar||function(){var e=function(t){return e=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(null!=t)for(var i=e(t),n=0;n<i.length;n++)"default"!==i[n]&&__createBinding(r,t,i[n]);return __setModuleDefault(r,t),r}}(),__awaiter=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))(function(n,l){function o(e){try{a(i.next(e))}catch(e){l(e)}}function u(e){try{a(i.throw(e))}catch(e){l(e)}}function a(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(o,u)}a((i=i.apply(e,t||[])).next())})},__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.hubcloudExtracter=hubcloudExtracter;const axios_1=__importDefault(require("axios")),cheerio=__importStar(require("cheerio")),headers_1=require("./headers"),decode=function(e){return void 0===e?"":atob(e.toString())};function hubcloudExtracter(e,t){return __awaiter(this,void 0,void 0,function*(){var r,i,n,l,o;try{const u=e.split("/").slice(0,3).join("/"),a=[],d=(yield(0,axios_1.default)(`${e}`,{headers:headers_1.headers,signal:t})).data,s=cheerio.load(d),c=d.match(/var\s+url\s*=\s*'([^']+)';/)||[];let f=decode(null===(i=null===(r=c[1])||void 0===r?void 0:r.split("r="))||void 0===i?void 0:i[1])||c[1]||s(".fa-file-download.fa-lg").parent().attr("href")||e;(null==f?void 0:f.startsWith("/"))&&(f=`${u}${f}`);const h=yield fetch(f,{headers:headers_1.headers,signal:t,redirect:"follow"}),v=cheerio.load(yield h.text()),_=v(".btn-success.btn-lg.h6,.btn-danger,.btn-secondary");for(const e of _){let r=v(e).attr("href")||"";if((null==r?void 0:r.includes(".dev"))&&!(null==r?void 0:r.includes("/?id="))&&a.push({server:"Cf Worker",link:r,type:"mkv"}),null==r?void 0:r.includes("pixeld")){if(!(null==r?void 0:r.includes("api"))){const e=r.split("/").pop(),t=r.split("/").slice(0,-2).join("/");r=`${t}/api/file/${e}?download`}a.push({server:"Pixeldrain",link:r,type:"mkv"})}if((null==r?void 0:r.includes("hubcloud"))||(null==r?void 0:r.includes("/?id=")))try{const e=(null===(o=null===(l=null===(n=(yield axios_1.default.head(r,{headers:headers_1.headers,signal:t})).request)||void 0===n?void 0:n.responseURL)||void 0===l?void 0:l.split("link="))||void 0===o?void 0:o[1])||r;a.push({server:"hubcloud",link:e,type:"mkv"})}catch(e){}(null==r?void 0:r.includes("cloudflarestorage"))&&a.push({server:"CfStorage",link:r,type:"mkv"}),(null==r?void 0:r.includes("fastdl"))&&a.push({server:"FastDl",link:r,type:"mkv"}),r.includes("hubcdn")&&a.push({server:"HubCdn",link:r,type:"mkv"})}return a}catch(e){return[]}})}
|
||||
64
dist/katmovies/catalog.js
vendored
64
dist/katmovies/catalog.js
vendored
@@ -1,63 +1 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.genres = exports.catalog = void 0;
|
||||
exports.catalog = [
|
||||
{
|
||||
title: "Latest",
|
||||
filter: "",
|
||||
},
|
||||
{
|
||||
title: "Netflix",
|
||||
filter: "/category/netflix",
|
||||
},
|
||||
{
|
||||
title: "Animated",
|
||||
filter: "/category/animated",
|
||||
},
|
||||
{
|
||||
title: "Amazon Prime",
|
||||
filter: "/category/amazon-prime",
|
||||
},
|
||||
];
|
||||
exports.genres = [
|
||||
{
|
||||
title: "Action",
|
||||
filter: "/category/action",
|
||||
},
|
||||
{
|
||||
title: "Crime",
|
||||
filter: "/category/crime",
|
||||
},
|
||||
{
|
||||
title: "Comedy",
|
||||
filter: "/category/comedy",
|
||||
},
|
||||
{
|
||||
title: "Drama",
|
||||
filter: "/category/drama",
|
||||
},
|
||||
{
|
||||
title: "Horror",
|
||||
filter: "/category/horror",
|
||||
},
|
||||
{
|
||||
title: "Family",
|
||||
filter: "/category/family",
|
||||
},
|
||||
{
|
||||
title: "Sci-Fi",
|
||||
filter: "/category/sifi",
|
||||
},
|
||||
{
|
||||
title: "Thriller",
|
||||
filter: "/category/triller",
|
||||
},
|
||||
{
|
||||
title: "Romance",
|
||||
filter: "/category/romance",
|
||||
},
|
||||
{
|
||||
title: "Fight",
|
||||
filter: "/category/fight",
|
||||
},
|
||||
];
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.genres=exports.catalog=void 0,exports.catalog=[{title:"Latest",filter:""},{title:"Netflix",filter:"/category/netflix"},{title:"Animated",filter:"/category/animated"},{title:"Amazon Prime",filter:"/category/amazon-prime"}],exports.genres=[{title:"Action",filter:"/category/action"},{title:"Crime",filter:"/category/crime"},{title:"Comedy",filter:"/category/comedy"},{title:"Drama",filter:"/category/drama"},{title:"Horror",filter:"/category/horror"},{title:"Family",filter:"/category/family"},{title:"Sci-Fi",filter:"/category/sifi"},{title:"Thriller",filter:"/category/triller"},{title:"Romance",filter:"/category/romance"},{title:"Fight",filter:"/category/fight"}];
|
||||
87
dist/katmovies/episodes.js
vendored
87
dist/katmovies/episodes.js
vendored
@@ -1,86 +1 @@
|
||||
"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.getEpisodes = void 0;
|
||||
exports.extractKmhdLink = extractKmhdLink;
|
||||
const getEpisodes = function (_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ url, providerContext, }) {
|
||||
var _b;
|
||||
const { axios, cheerio } = providerContext;
|
||||
const episodesLink = [];
|
||||
try {
|
||||
if (url.includes("gdflix")) {
|
||||
const baseUrl = (_b = url.split("/pack")) === null || _b === void 0 ? void 0 : _b[0];
|
||||
const res = yield axios.get(url);
|
||||
const data = res.data;
|
||||
const $ = cheerio.load(data);
|
||||
const links = $(".list-group-item");
|
||||
links === null || links === void 0 ? void 0 : links.map((i, link) => {
|
||||
episodesLink.push({
|
||||
title: $(link).text() || "",
|
||||
link: baseUrl + $(link).find("a").attr("href") || "",
|
||||
});
|
||||
});
|
||||
if (episodesLink.length > 0) {
|
||||
return episodesLink;
|
||||
}
|
||||
}
|
||||
if (url.includes("/pack")) {
|
||||
const epIds = yield extractKmhdEpisodes(url, providerContext);
|
||||
epIds === null || epIds === void 0 ? void 0 : epIds.forEach((id, index) => {
|
||||
episodesLink.push({
|
||||
title: `Episode ${index + 1}`,
|
||||
link: url.split("/pack")[0] + "/file/" + id,
|
||||
});
|
||||
});
|
||||
}
|
||||
const res = yield axios.get(url, {
|
||||
headers: {
|
||||
Cookie: "_ga_GNR438JY8N=GS1.1.1722240350.5.0.1722240350.0.0.0; _ga=GA1.1.372196696.1722150754; unlocked=true",
|
||||
},
|
||||
});
|
||||
const episodeData = res.data;
|
||||
const $ = cheerio.load(episodeData);
|
||||
const links = $(".autohyperlink");
|
||||
links === null || links === void 0 ? void 0 : links.map((i, link) => {
|
||||
episodesLink.push({
|
||||
title: $(link).parent().children().remove().end().text() || "",
|
||||
link: $(link).attr("href") || "",
|
||||
});
|
||||
});
|
||||
return episodesLink;
|
||||
}
|
||||
catch (err) {
|
||||
console.error(err);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getEpisodes = getEpisodes;
|
||||
function extractKmhdLink(katlink, providerContext) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const { axios } = providerContext;
|
||||
const res = yield axios.get(katlink);
|
||||
const data = res.data;
|
||||
const hubDriveRes = data.match(/hubdrive_res:\s*"([^"]+)"/)[1];
|
||||
const hubDriveLink = data.match(/hubdrive_res\s*:\s*{[^}]*?link\s*:\s*"([^"]+)"/)[1];
|
||||
return hubDriveLink + hubDriveRes;
|
||||
});
|
||||
}
|
||||
function extractKmhdEpisodes(katlink, providerContext) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const { axios } = providerContext;
|
||||
const res = yield axios.get(katlink);
|
||||
const data = res.data;
|
||||
const ids = data.match(/[\w]+_[a-f0-9]{8}/g);
|
||||
return ids;
|
||||
});
|
||||
}
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,i,n){return new(i||(i=Promise))(function(r,o){function a(t){try{c(n.next(t))}catch(t){o(t)}}function s(t){try{c(n.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(a,s)}c((n=n.apply(t,e||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getEpisodes=void 0,exports.extractKmhdLink=extractKmhdLink;const getEpisodes=function(t){return __awaiter(this,arguments,void 0,function*({url:t,providerContext:e}){var i;const{axios:n,cheerio:r}=e,o=[];try{if(t.includes("gdflix")){const e=null===(i=t.split("/pack"))||void 0===i?void 0:i[0],a=(yield n.get(t)).data,s=r.load(a),c=s(".list-group-item");if(null==c||c.map((t,i)=>{o.push({title:s(i).text()||"",link:e+s(i).find("a").attr("href")||""})}),o.length>0)return o}if(t.includes("/pack")){const i=yield extractKmhdEpisodes(t,e);null==i||i.forEach((e,i)=>{o.push({title:`Episode ${i+1}`,link:t.split("/pack")[0]+"/file/"+e})})}const a=(yield n.get(t,{headers:{Cookie:"_ga_GNR438JY8N=GS1.1.1722240350.5.0.1722240350.0.0.0; _ga=GA1.1.372196696.1722150754; unlocked=true"}})).data,s=r.load(a),c=s(".autohyperlink");return null==c||c.map((t,e)=>{o.push({title:s(e).parent().children().remove().end().text()||"",link:s(e).attr("href")||""})}),o}catch(t){return[]}})};function extractKmhdLink(t,e){return __awaiter(this,void 0,void 0,function*(){const{axios:i}=e,n=(yield i.get(t)).data,r=n.match(/hubdrive_res:\s*"([^"]+)"/)[1];return n.match(/hubdrive_res\s*:\s*{[^}]*?link\s*:\s*"([^"]+)"/)[1]+r})}function extractKmhdEpisodes(t,e){return __awaiter(this,void 0,void 0,function*(){const{axios:i}=e;return(yield i.get(t)).data.match(/[\w]+_[a-f0-9]{8}/g)})}exports.getEpisodes=getEpisodes;
|
||||
129
dist/katmovies/meta.js
vendored
129
dist/katmovies/meta.js
vendored
@@ -1,128 +1 @@
|
||||
"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;
|
||||
try {
|
||||
const { axios, cheerio } = providerContext;
|
||||
const url = link;
|
||||
const res = yield axios.get(url);
|
||||
const data = res.data;
|
||||
const $ = cheerio.load(data);
|
||||
const container = $(".yQ8hqd.ksSzJd.LoQAYe").html()
|
||||
? $(".yQ8hqd.ksSzJd.LoQAYe")
|
||||
: $(".FxvUNb");
|
||||
const imdbId = ((_b = container
|
||||
.find('a[href*="imdb.com/title/tt"]:not([href*="imdb.com/title/tt/"])')
|
||||
.attr("href")) === null || _b === void 0 ? void 0 : _b.split("/")[4]) || "";
|
||||
const title = container
|
||||
.find('li:contains("Name")')
|
||||
.children()
|
||||
.remove()
|
||||
.end()
|
||||
.text();
|
||||
const type = $(".yQ8hqd.ksSzJd.LoQAYe").html() ? "series" : "movie";
|
||||
const synopsis = container.find('li:contains("Stars")').text();
|
||||
const image = $('h4:contains("SCREENSHOTS")').next().find("img").attr("src") || "";
|
||||
console.log("katGetInfo", title, synopsis, image, imdbId, type);
|
||||
// Links
|
||||
const links = [];
|
||||
const directLink = [];
|
||||
// direct links
|
||||
$(".entry-content")
|
||||
.find('p:contains("Episode")')
|
||||
.each((i, element) => {
|
||||
const dlLink = $(element)
|
||||
.nextAll("h3,h2")
|
||||
.first()
|
||||
.find('a:contains("1080"),a:contains("720"),a:contains("480")')
|
||||
.attr("href") || "";
|
||||
const dlTitle = $(element).find("span").text();
|
||||
if (link.trim().length > 0 && dlTitle.includes("Episode ")) {
|
||||
directLink.push({
|
||||
title: dlTitle,
|
||||
link: dlLink,
|
||||
});
|
||||
}
|
||||
});
|
||||
if (directLink.length > 0) {
|
||||
links.push({
|
||||
quality: "",
|
||||
title: title,
|
||||
directLinks: directLink,
|
||||
});
|
||||
}
|
||||
$(".entry-content")
|
||||
.find("pre")
|
||||
.nextUntil("div")
|
||||
.filter("h2")
|
||||
.each((i, element) => {
|
||||
var _a;
|
||||
const link = $(element).find("a").attr("href");
|
||||
const quality = ((_a = $(element)
|
||||
.text()
|
||||
.match(/\b(480p|720p|1080p|2160p)\b/i)) === null || _a === void 0 ? void 0 : _a[0]) || "";
|
||||
const title = $(element).text();
|
||||
if (link && title.includes("")) {
|
||||
links.push({
|
||||
quality,
|
||||
title,
|
||||
episodesLink: link,
|
||||
});
|
||||
}
|
||||
});
|
||||
if (links.length === 0 && type === "movie") {
|
||||
$(".entry-content")
|
||||
.find('h2:contains("DOWNLOAD"),h3:contains("DOWNLOAD")')
|
||||
.nextUntil("pre,div")
|
||||
.filter("h2")
|
||||
.each((i, element) => {
|
||||
var _a;
|
||||
const link = $(element).find("a").attr("href");
|
||||
const quality = ((_a = $(element)
|
||||
.text()
|
||||
.match(/\b(480p|720p|1080p|2160p)\b/i)) === null || _a === void 0 ? void 0 : _a[0]) || "";
|
||||
const title = $(element).text();
|
||||
if (link && !title.includes("Online")) {
|
||||
links.push({
|
||||
quality,
|
||||
title,
|
||||
directLinks: [{ link, title, type: "movie" }],
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
// console.log('drive meta', title, synopsis, image, imdbId, type, links);
|
||||
return {
|
||||
title,
|
||||
synopsis,
|
||||
image,
|
||||
imdbId,
|
||||
type,
|
||||
linkList: links,
|
||||
};
|
||||
}
|
||||
catch (err) {
|
||||
console.error(err);
|
||||
return {
|
||||
title: "",
|
||||
synopsis: "",
|
||||
image: "",
|
||||
imdbId: "",
|
||||
type: "movie",
|
||||
linkList: [],
|
||||
};
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getMeta = getMeta;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,i,n){return new(i||(i=Promise))(function(o,a){function r(t){try{d(n.next(t))}catch(t){a(t)}}function s(t){try{d(n.throw(t))}catch(t){a(t)}}function d(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(r,s)}d((n=n.apply(t,e||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getMeta=void 0;const getMeta=function(t){return __awaiter(this,arguments,void 0,function*({link:t,providerContext:e}){var i;try{const{axios:n,cheerio:o}=e,a=t,r=(yield n.get(a)).data,s=o.load(r),d=s(".yQ8hqd.ksSzJd.LoQAYe").html()?s(".yQ8hqd.ksSzJd.LoQAYe"):s(".FxvUNb"),c=(null===(i=d.find('a[href*="imdb.com/title/tt"]:not([href*="imdb.com/title/tt/"])').attr("href"))||void 0===i?void 0:i.split("/")[4])||"",l=d.find('li:contains("Name")').children().remove().end().text(),h=s(".yQ8hqd.ksSzJd.LoQAYe").html()?"series":"movie",p=d.find('li:contains("Stars")').text(),f=s('h4:contains("SCREENSHOTS")').next().find("img").attr("src")||"",u=[],v=[];return s(".entry-content").find('p:contains("Episode")').each((e,i)=>{const n=s(i).nextAll("h3,h2").first().find('a:contains("1080"),a:contains("720"),a:contains("480")').attr("href")||"",o=s(i).find("span").text();t.trim().length>0&&o.includes("Episode ")&&v.push({title:o,link:n})}),v.length>0&&u.push({quality:"",title:l,directLinks:v}),s(".entry-content").find("pre").nextUntil("div").filter("h2").each((t,e)=>{var i;const n=s(e).find("a").attr("href"),o=(null===(i=s(e).text().match(/\b(480p|720p|1080p|2160p)\b/i))||void 0===i?void 0:i[0])||"",a=s(e).text();n&&a.includes("")&&u.push({quality:o,title:a,episodesLink:n})}),0===u.length&&"movie"===h&&s(".entry-content").find('h2:contains("DOWNLOAD"),h3:contains("DOWNLOAD")').nextUntil("pre,div").filter("h2").each((t,e)=>{var i;const n=s(e).find("a").attr("href"),o=(null===(i=s(e).text().match(/\b(480p|720p|1080p|2160p)\b/i))||void 0===i?void 0:i[0])||"",a=s(e).text();n&&!a.includes("Online")&&u.push({quality:o,title:a,directLinks:[{link:n,title:a,type:"movie"}]})}),{title:l,synopsis:p,image:f,imdbId:c,type:h,linkList:u}}catch(t){return{title:"",synopsis:"",image:"",imdbId:"",type:"movie",linkList:[]}}})};exports.getMeta=getMeta;
|
||||
60
dist/katmovies/posts.js
vendored
60
dist/katmovies/posts.js
vendored
@@ -1,59 +1 @@
|
||||
"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, page, signal, providerContext, }) {
|
||||
const { getBaseUrl, cheerio } = providerContext;
|
||||
const baseUrl = yield getBaseUrl("kat");
|
||||
const url = `${baseUrl + filter}/page/${page}/`;
|
||||
return posts({ url, signal, cheerio });
|
||||
});
|
||||
};
|
||||
exports.getPosts = getPosts;
|
||||
const getSearchPosts = function (_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ searchQuery, page, signal, providerContext, }) {
|
||||
const { getBaseUrl, cheerio } = providerContext;
|
||||
const baseUrl = yield getBaseUrl("kat");
|
||||
const url = `${baseUrl}/page/${page}/?s=${searchQuery}`;
|
||||
return posts({ url, signal, cheerio });
|
||||
});
|
||||
};
|
||||
exports.getSearchPosts = getSearchPosts;
|
||||
function posts(_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ url, signal, cheerio, }) {
|
||||
try {
|
||||
const res = yield fetch(url, { signal });
|
||||
const data = yield res.text();
|
||||
const $ = cheerio.load(data);
|
||||
const catalog = [];
|
||||
$(".recent-posts")
|
||||
.children()
|
||||
.map((i, element) => {
|
||||
const title = $(element).find("img").attr("alt");
|
||||
const link = $(element).find("a").attr("href");
|
||||
const image = $(element).find("img").attr("src");
|
||||
if (title && link && image) {
|
||||
catalog.push({
|
||||
title: title.replace("Download", "").trim(),
|
||||
link: link,
|
||||
image: image,
|
||||
});
|
||||
}
|
||||
});
|
||||
return catalog;
|
||||
}
|
||||
catch (err) {
|
||||
console.error("katmovies error ", err);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
}
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))(function(i,o){function s(t){try{c(n.next(t))}catch(t){o(t)}}function a(t){try{c(n.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r(function(t){t(e)})).then(s,a)}c((n=n.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,page:e,signal:r,providerContext:n}){const{getBaseUrl:i,cheerio:o}=n;return posts({url:`${(yield i("kat"))+t}/page/${e}/`,signal:r,cheerio:o})})};exports.getPosts=getPosts;const getSearchPosts=function(t){return __awaiter(this,arguments,void 0,function*({searchQuery:t,page:e,signal:r,providerContext:n}){const{getBaseUrl:i,cheerio:o}=n;return posts({url:`${yield i("kat")}/page/${e}/?s=${t}`,signal:r,cheerio:o})})};function posts(t){return __awaiter(this,arguments,void 0,function*({url:t,signal:e,cheerio:r}){try{const n=yield fetch(t,{signal:e}),i=yield n.text(),o=r.load(i),s=[];return o(".recent-posts").children().map((t,e)=>{const r=o(e).find("img").attr("alt"),n=o(e).find("a").attr("href"),i=o(e).find("img").attr("src");r&&n&&i&&s.push({title:r.replace("Download","").trim(),link:n,image:i})}),s}catch(t){return[]}})}exports.getSearchPosts=getSearchPosts;
|
||||
105
dist/katmovies/stream.js
vendored
105
dist/katmovies/stream.js
vendored
@@ -1,104 +1 @@
|
||||
"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;
|
||||
function extractKmhdLink(katlink, providerContext) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const { axios } = providerContext;
|
||||
const res = yield axios.get(katlink);
|
||||
const data = res.data;
|
||||
const hubDriveRes = data.match(/hubdrive_res:\s*"([^"]+)"/)[1];
|
||||
const hubDriveLink = data.match(/hubdrive_res\s*:\s*{[^}]*?link\s*:\s*"([^"]+)"/)[1];
|
||||
return hubDriveLink + hubDriveRes;
|
||||
});
|
||||
}
|
||||
const getStream = function (_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ link, signal, providerContext, }) {
|
||||
const { axios, cheerio, extractors } = providerContext;
|
||||
const { hubcloudExtracter, gdFlixExtracter } = extractors;
|
||||
const streamLinks = [];
|
||||
console.log("katGetStream", link);
|
||||
try {
|
||||
if (link.includes("gdflix")) {
|
||||
return yield gdFlixExtracter(link, signal);
|
||||
}
|
||||
if (link.includes("kmhd")) {
|
||||
const hubcloudLink = yield extractKmhdLink(link, providerContext);
|
||||
return yield hubcloudExtracter(hubcloudLink, signal);
|
||||
}
|
||||
if (link.includes("gdflix")) {
|
||||
// resume link
|
||||
try {
|
||||
const resumeDrive = link.replace("/file", "/zfile");
|
||||
// console.log('resumeDrive', resumeDrive);
|
||||
const resumeDriveRes = yield axios.get(resumeDrive);
|
||||
const resumeDriveHtml = resumeDriveRes.data;
|
||||
const $resumeDrive = cheerio.load(resumeDriveHtml);
|
||||
const resumeLink = $resumeDrive(".btn-success").attr("href");
|
||||
console.log("resumeLink", resumeLink);
|
||||
if (resumeLink) {
|
||||
streamLinks.push({
|
||||
server: "ResumeCloud",
|
||||
link: resumeLink,
|
||||
type: "mkv",
|
||||
});
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
console.log("Resume link not found");
|
||||
}
|
||||
//instant link
|
||||
try {
|
||||
const driveres = yield axios.get(link, { timeout: 10000 });
|
||||
const $drive = cheerio.load(driveres.data);
|
||||
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 = yield fetch(videoSeedUrl, {
|
||||
method: "POST",
|
||||
body: InstantFromData,
|
||||
headers: {
|
||||
"x-token": videoSeedUrl,
|
||||
},
|
||||
});
|
||||
const instantLinkData = yield instantLinkRes.json();
|
||||
console.log("instantLinkData", instantLinkData);
|
||||
if (instantLinkData.error === false) {
|
||||
const instantLink = instantLinkData.url;
|
||||
streamLinks.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 streamLinks;
|
||||
}
|
||||
const stereams = yield hubcloudExtracter(link, signal);
|
||||
return stereams;
|
||||
}
|
||||
catch (error) {
|
||||
console.log("katgetStream error: ", error);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getStream = getStream;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,r,i){return new(r||(r=Promise))(function(n,a){function o(t){try{c(i.next(t))}catch(t){a(t)}}function s(t){try{c(i.throw(t))}catch(t){a(t)}}function c(t){var e;t.done?n(t.value):(e=t.value,e instanceof r?e:new r(function(t){t(e)})).then(o,s)}c((i=i.apply(t,e||[])).next())})};function extractKmhdLink(t,e){return __awaiter(this,void 0,void 0,function*(){const{axios:r}=e,i=(yield r.get(t)).data,n=i.match(/hubdrive_res:\s*"([^"]+)"/)[1];return i.match(/hubdrive_res\s*:\s*{[^}]*?link\s*:\s*"([^"]+)"/)[1]+n})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.getStream=void 0;const getStream=function(t){return __awaiter(this,arguments,void 0,function*({link:t,signal:e,providerContext:r}){const{axios:i,cheerio:n,extractors:a}=r,{hubcloudExtracter:o,gdFlixExtracter:s}=a,c=[];try{if(t.includes("gdflix"))return yield s(t,e);if(t.includes("kmhd")){const i=yield extractKmhdLink(t,r);return yield o(i,e)}if(t.includes("gdflix")){try{const e=t.replace("/file","/zfile"),r=(yield i.get(e)).data,a=n.load(r)(".btn-success").attr("href");a&&c.push({server:"ResumeCloud",link:a,type:"mkv"})}catch(t){}try{const e=yield i.get(t,{timeout:1e4}),r=n.load(e.data)(".btn-danger").attr("href")||"",a=r.split("=")[1],o=new FormData;o.append("keys",a);const s=r.split("/").slice(0,3).join("/")+"/api",d=yield fetch(s,{method:"POST",body:o,headers:{"x-token":s}}),u=yield d.json();if(!1===u.error){const t=u.url;c.push({server:"Gdrive-Instant",link:t,type:"mkv"})}}catch(t){}return c}return yield o(t,e)}catch(t){return[]}})};exports.getStream=getStream;
|
||||
23
dist/kissKh/catalog.js
vendored
23
dist/kissKh/catalog.js
vendored
@@ -1,22 +1 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.genres = exports.catalog = void 0;
|
||||
exports.catalog = [
|
||||
{
|
||||
title: "Latest",
|
||||
filter: "/api/DramaList/List?type=0&sub=0&country=0&status=0&order=2",
|
||||
},
|
||||
{
|
||||
title: "Hollywood",
|
||||
filter: "/api/DramaList/List?type=4&sub=0&country=0&status=0&order=2",
|
||||
},
|
||||
{
|
||||
title: "Anime",
|
||||
filter: "/api/DramaList/List?type=3&sub=0&country=0&status=0&order=2",
|
||||
},
|
||||
{
|
||||
title: "K Drama",
|
||||
filter: "/api/DramaList/List?type=0&sub=0&country=0&status=0&order=2",
|
||||
},
|
||||
];
|
||||
exports.genres = [];
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.genres=exports.catalog=void 0,exports.catalog=[{title:"Latest",filter:"/api/DramaList/List?type=0&sub=0&country=0&status=0&order=2"},{title:"Hollywood",filter:"/api/DramaList/List?type=4&sub=0&country=0&status=0&order=2"},{title:"Anime",filter:"/api/DramaList/List?type=3&sub=0&country=0&status=0&order=2"},{title:"K Drama",filter:"/api/DramaList/List?type=0&sub=0&country=0&status=0&order=2"}],exports.genres=[];
|
||||
61
dist/kissKh/meta.js
vendored
61
dist/kissKh/meta.js
vendored
@@ -1,60 +1 @@
|
||||
"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;
|
||||
try {
|
||||
const { axios } = providerContext;
|
||||
const res = yield axios.get(link);
|
||||
const data = res.data;
|
||||
const meta = {
|
||||
title: data.title,
|
||||
synopsis: data.description,
|
||||
image: data.thumbnail,
|
||||
tags: [(_b = data === null || data === void 0 ? void 0 : data.releaseDate) === null || _b === void 0 ? void 0 : _b.split("-")[0], data === null || data === void 0 ? void 0 : data.status, data === null || data === void 0 ? void 0 : data.type],
|
||||
imdbId: "",
|
||||
type: data.episodesCount > 1 ? "series" : "movie",
|
||||
};
|
||||
const linkList = [];
|
||||
const subLinks = [];
|
||||
(_c = data === null || data === void 0 ? void 0 : data.episodes) === null || _c === void 0 ? void 0 : _c.reverse().map((episode) => {
|
||||
var _a;
|
||||
const title = "Episode " + (episode === null || episode === void 0 ? void 0 : episode.number);
|
||||
const link = (_a = episode === null || episode === void 0 ? void 0 : episode.id) === null || _a === void 0 ? void 0 : _a.toString();
|
||||
if (link && title) {
|
||||
subLinks.push({
|
||||
title,
|
||||
link,
|
||||
});
|
||||
}
|
||||
});
|
||||
linkList.push({
|
||||
title: meta.title,
|
||||
directLinks: subLinks,
|
||||
});
|
||||
return Object.assign(Object.assign({}, meta), { linkList: linkList });
|
||||
}
|
||||
catch (err) {
|
||||
console.error(err);
|
||||
return {
|
||||
title: "",
|
||||
synopsis: "",
|
||||
image: "",
|
||||
imdbId: "",
|
||||
type: "movie",
|
||||
linkList: [],
|
||||
};
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getMeta = getMeta;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,i,n){return new(i||(i=Promise))(function(o,s){function l(t){try{a(n.next(t))}catch(t){s(t)}}function r(t){try{a(n.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(l,r)}a((n=n.apply(t,e||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getMeta=void 0;const getMeta=function(t){return __awaiter(this,arguments,void 0,function*({link:t,providerContext:e}){var i,n;try{const{axios:o}=e,s=(yield o.get(t)).data,l={title:s.title,synopsis:s.description,image:s.thumbnail,tags:[null===(i=null==s?void 0:s.releaseDate)||void 0===i?void 0:i.split("-")[0],null==s?void 0:s.status,null==s?void 0:s.type],imdbId:"",type:s.episodesCount>1?"series":"movie"},r=[],a=[];return null===(n=null==s?void 0:s.episodes)||void 0===n||n.reverse().map(t=>{var e;const i="Episode "+(null==t?void 0:t.number),n=null===(e=null==t?void 0:t.id)||void 0===e?void 0:e.toString();n&&i&&a.push({title:i,link:n})}),r.push({title:l.title,directLinks:a}),Object.assign(Object.assign({},l),{linkList:r})}catch(t){return{title:"",synopsis:"",image:"",imdbId:"",type:"movie",linkList:[]}}})};exports.getMeta=getMeta;
|
||||
74
dist/kissKh/posts.js
vendored
74
dist/kissKh/posts.js
vendored
@@ -1,73 +1 @@
|
||||
"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, }) {
|
||||
var _b;
|
||||
const { getBaseUrl, axios } = providerContext;
|
||||
const baseUrl = yield getBaseUrl("kissKh");
|
||||
const url = `${baseUrl + filter}&type=0`;
|
||||
try {
|
||||
const res = yield axios.get(url, { signal });
|
||||
const data = (_b = res.data) === null || _b === void 0 ? void 0 : _b.data;
|
||||
const catalog = [];
|
||||
data === null || data === void 0 ? void 0 : data.map((element) => {
|
||||
const title = element.title;
|
||||
const link = baseUrl + `/api/DramaList/Drama/${element === null || element === void 0 ? void 0 : element.id}?isq=false`;
|
||||
const image = element.thumbnail;
|
||||
if (title && link && image) {
|
||||
catalog.push({
|
||||
title: title,
|
||||
link: link,
|
||||
image: image,
|
||||
});
|
||||
}
|
||||
});
|
||||
return catalog;
|
||||
}
|
||||
catch (err) {
|
||||
console.error("kiss error ", err);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getPosts = getPosts;
|
||||
const getSearchPosts = function (_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ searchQuery, signal, providerContext, }) {
|
||||
const { getBaseUrl, axios } = providerContext;
|
||||
const baseUrl = yield getBaseUrl("kissKh");
|
||||
const url = `${baseUrl}/api/DramaList/Search?q=${searchQuery}&type=0`;
|
||||
try {
|
||||
const res = yield axios.get(url, { signal });
|
||||
const data = res.data;
|
||||
const catalog = [];
|
||||
data === null || data === void 0 ? void 0 : data.map((element) => {
|
||||
const title = element.title;
|
||||
const link = baseUrl + `/api/DramaList/Drama/${element === null || element === void 0 ? void 0 : element.id}?isq=false`;
|
||||
const image = element.thumbnail;
|
||||
if (title && link && image) {
|
||||
catalog.push({
|
||||
title: title,
|
||||
link: link,
|
||||
image: image,
|
||||
});
|
||||
}
|
||||
});
|
||||
return catalog;
|
||||
}
|
||||
catch (err) {
|
||||
console.error("kiss error ", err);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getSearchPosts = getSearchPosts;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,i,a){return new(i||(i=Promise))(function(s,n){function r(t){try{l(a.next(t))}catch(t){n(t)}}function o(t){try{l(a.throw(t))}catch(t){n(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(r,o)}l((a=a.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:i}){var a;const{getBaseUrl:s,axios:n}=i,r=yield s("kissKh"),o=`${r+t}&type=0`;try{const t=null===(a=(yield n.get(o,{signal:e})).data)||void 0===a?void 0:a.data,i=[];return null==t||t.map(t=>{const e=t.title,a=r+`/api/DramaList/Drama/${null==t?void 0:t.id}?isq=false`,s=t.thumbnail;e&&a&&s&&i.push({title:e,link:a,image:s})}),i}catch(t){return[]}})};exports.getPosts=getPosts;const getSearchPosts=function(t){return __awaiter(this,arguments,void 0,function*({searchQuery:t,signal:e,providerContext:i}){const{getBaseUrl:a,axios:s}=i,n=yield a("kissKh"),r=`${n}/api/DramaList/Search?q=${t}&type=0`;try{const t=(yield s.get(r,{signal:e})).data,i=[];return null==t||t.map(t=>{const e=t.title,a=n+`/api/DramaList/Drama/${null==t?void 0:t.id}?isq=false`,s=t.thumbnail;e&&a&&s&&i.push({title:e,link:a,image:s})}),i}catch(t){return[]}})};exports.getSearchPosts=getSearchPosts;
|
||||
53
dist/kissKh/stream.js
vendored
53
dist/kissKh/stream.js
vendored
@@ -1,52 +1 @@
|
||||
"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, providerContext, }) {
|
||||
var _b, _c, _d;
|
||||
try {
|
||||
const { axios, getBaseUrl } = providerContext;
|
||||
const streamLinks = [];
|
||||
const subtitles = [];
|
||||
const baseUrl = yield getBaseUrl("kissKh");
|
||||
const streamUrl = "https://adorable-salamander-ecbb21.netlify.app/api/kisskh/video?id=" +
|
||||
id;
|
||||
const res = yield axios.get(streamUrl);
|
||||
const stream = (_c = (_b = res.data) === null || _b === void 0 ? void 0 : _b.source) === null || _c === void 0 ? void 0 : _c.Video;
|
||||
const subData = (_d = res.data) === null || _d === void 0 ? void 0 : _d.subtitles;
|
||||
subData === null || subData === void 0 ? void 0 : subData.map((sub) => {
|
||||
var _a;
|
||||
subtitles.push({
|
||||
title: sub === null || sub === void 0 ? void 0 : sub.label,
|
||||
language: sub === null || sub === void 0 ? void 0 : sub.land,
|
||||
type: ((_a = sub === null || sub === void 0 ? void 0 : sub.src) === null || _a === void 0 ? void 0 : _a.includes(".vtt")) ? "text/vtt" : "application/x-subrip",
|
||||
uri: sub === null || sub === void 0 ? void 0 : sub.src,
|
||||
});
|
||||
});
|
||||
streamLinks.push({
|
||||
server: "kissKh",
|
||||
link: stream,
|
||||
type: "m3u8",
|
||||
subtitles,
|
||||
headers: {
|
||||
referer: baseUrl,
|
||||
},
|
||||
});
|
||||
return streamLinks;
|
||||
}
|
||||
catch (err) {
|
||||
console.error(err);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getStream = getStream;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,i,n){return new(i||(i=Promise))(function(r,a){function o(t){try{s(n.next(t))}catch(t){a(t)}}function l(t){try{s(n.throw(t))}catch(t){a(t)}}function s(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(o,l)}s((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,providerContext:e}){var i,n,r;try{const{axios:a,getBaseUrl:o}=e,l=[],s=[],u=yield o("kissKh"),d="https://adorable-salamander-ecbb21.netlify.app/api/kisskh/video?id="+t,v=yield a.get(d),c=null===(n=null===(i=v.data)||void 0===i?void 0:i.source)||void 0===n?void 0:n.Video,p=null===(r=v.data)||void 0===r?void 0:r.subtitles;return null==p||p.map(t=>{var e;s.push({title:null==t?void 0:t.label,language:null==t?void 0:t.land,type:(null===(e=null==t?void 0:t.src)||void 0===e?void 0:e.includes(".vtt"))?"text/vtt":"application/x-subrip",uri:null==t?void 0:t.src})}),l.push({server:"kissKh",link:c,type:"m3u8",subtitles:s,headers:{referer:u}}),l}catch(t){return[]}})};exports.getStream=getStream;
|
||||
104
dist/luxMovies/catalog.js
vendored
104
dist/luxMovies/catalog.js
vendored
@@ -1,103 +1 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.genres = exports.catalog = void 0;
|
||||
exports.catalog = [
|
||||
{
|
||||
title: "New",
|
||||
filter: "",
|
||||
},
|
||||
{
|
||||
title: "Netflix",
|
||||
filter: "category/web-series/netflix",
|
||||
},
|
||||
{
|
||||
title: "Amazon Prime",
|
||||
filter: "category/web-series/amazon-prime-video",
|
||||
},
|
||||
{
|
||||
title: "4K Movies",
|
||||
filter: "category/movies-by-quality/2160p",
|
||||
},
|
||||
];
|
||||
exports.genres = [
|
||||
{
|
||||
title: "Action",
|
||||
filter: "category/movies-by-genres/action/",
|
||||
},
|
||||
{
|
||||
title: "Adventure",
|
||||
filter: "category/movies-by-genres/adventure/",
|
||||
},
|
||||
{
|
||||
title: "Animation",
|
||||
filter: "category/movies-by-genres/animation/",
|
||||
},
|
||||
{
|
||||
title: "Biography",
|
||||
filter: "category/movies-by-genres/biography/",
|
||||
},
|
||||
{
|
||||
title: "Comedy",
|
||||
filter: "category/movies-by-genres/comedy/",
|
||||
},
|
||||
{
|
||||
title: "Crime",
|
||||
filter: "category/movies-by-genres/crime/",
|
||||
},
|
||||
{
|
||||
title: "Documentary",
|
||||
filter: "category/movies-by-genres/documentary/",
|
||||
},
|
||||
{
|
||||
title: "Drama",
|
||||
filter: "category/movies-by-genres/drama/",
|
||||
},
|
||||
{
|
||||
title: "Family",
|
||||
filter: "category/movies-by-genres/family/",
|
||||
},
|
||||
{
|
||||
title: "Fantasy",
|
||||
filter: "category/movies-by-genres/fantasy/",
|
||||
},
|
||||
{
|
||||
title: "History",
|
||||
filter: "category/movies-by-genres/history/",
|
||||
},
|
||||
{
|
||||
title: "Horror",
|
||||
filter: "category/movies-by-genres/horror/",
|
||||
},
|
||||
{
|
||||
title: "Music",
|
||||
filter: "category/movies-by-genres/music/",
|
||||
},
|
||||
{
|
||||
title: "Mystery",
|
||||
filter: "category/movies-by-genres/mystery/",
|
||||
},
|
||||
{
|
||||
title: "Romance",
|
||||
filter: "category/movies-by-genres/romance/",
|
||||
},
|
||||
{
|
||||
title: "Sci-Fi",
|
||||
filter: "category/movies-by-genres/sci-fi/",
|
||||
},
|
||||
{
|
||||
title: "Sport",
|
||||
filter: "category/movies-by-genres/sport/",
|
||||
},
|
||||
{
|
||||
title: "Thriller",
|
||||
filter: "category/movies-by-genres/thriller/",
|
||||
},
|
||||
{
|
||||
title: "War",
|
||||
filter: "category/movies-by-genres/war/",
|
||||
},
|
||||
{
|
||||
title: "Western",
|
||||
filter: "category/movies-by-genres/western/",
|
||||
},
|
||||
];
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.genres=exports.catalog=void 0,exports.catalog=[{title:"New",filter:""},{title:"Netflix",filter:"category/web-series/netflix"},{title:"Amazon Prime",filter:"category/web-series/amazon-prime-video"},{title:"4K Movies",filter:"category/movies-by-quality/2160p"}],exports.genres=[{title:"Action",filter:"category/movies-by-genres/action/"},{title:"Adventure",filter:"category/movies-by-genres/adventure/"},{title:"Animation",filter:"category/movies-by-genres/animation/"},{title:"Biography",filter:"category/movies-by-genres/biography/"},{title:"Comedy",filter:"category/movies-by-genres/comedy/"},{title:"Crime",filter:"category/movies-by-genres/crime/"},{title:"Documentary",filter:"category/movies-by-genres/documentary/"},{title:"Drama",filter:"category/movies-by-genres/drama/"},{title:"Family",filter:"category/movies-by-genres/family/"},{title:"Fantasy",filter:"category/movies-by-genres/fantasy/"},{title:"History",filter:"category/movies-by-genres/history/"},{title:"Horror",filter:"category/movies-by-genres/horror/"},{title:"Music",filter:"category/movies-by-genres/music/"},{title:"Mystery",filter:"category/movies-by-genres/mystery/"},{title:"Romance",filter:"category/movies-by-genres/romance/"},{title:"Sci-Fi",filter:"category/movies-by-genres/sci-fi/"},{title:"Sport",filter:"category/movies-by-genres/sport/"},{title:"Thriller",filter:"category/movies-by-genres/thriller/"},{title:"War",filter:"category/movies-by-genres/war/"},{title:"Western",filter:"category/movies-by-genres/western/"}];
|
||||
46
dist/luxMovies/episodes.js
vendored
46
dist/luxMovies/episodes.js
vendored
@@ -1,45 +1 @@
|
||||
"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.getEpisodes = void 0;
|
||||
const getEpisodes = function (_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ url, providerContext, }) {
|
||||
const { axios, cheerio, commonHeaders: headers } = providerContext;
|
||||
console.log("getEpisodeLinks", url);
|
||||
try {
|
||||
const res = yield 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().replace(/-/g, "").replace(/:/g, "");
|
||||
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;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(r,i){function c(e){try{s(o.next(e))}catch(e){i(e)}}function a(e){try{s(o.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(c,a)}s((o=o.apply(e,t||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getEpisodes=void 0;const getEpisodes=function(e){return __awaiter(this,arguments,void 0,function*({url:e,providerContext:t}){const{axios:n,cheerio:o,commonHeaders:r}=t;try{const t=yield n.get(e,{headers:r}),i=o.load(t.data),c=i(".entry-content,.entry-inner");i(".unili-content,.code-block-1").remove();const a=[];return c.find("h4").each((e,t)=>{const n=i(t),o=n.text().replace(/-/g,"").replace(/:/g,""),r=n.next("p").find('.btn-outline[style="background:linear-gradient(135deg,#ed0b0b,#f2d152); color: white;"]').parent().attr("href");o&&r&&a.push({title:o,link:r})}),a}catch(e){return[]}})};exports.getEpisodes=getEpisodes;
|
||||
128
dist/luxMovies/meta.js
vendored
128
dist/luxMovies/meta.js
vendored
@@ -1,127 +1 @@
|
||||
"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 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 = (_a) => __awaiter(void 0, [_a], void 0, function* ({ link, providerContext, }) {
|
||||
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
||||
try {
|
||||
const { axios, cheerio } = providerContext;
|
||||
const url = link;
|
||||
console.log("url", url);
|
||||
const baseUrl = url.split("/").slice(0, 3).join("/");
|
||||
const response = yield axios.get(url, {
|
||||
headers: Object.assign(Object.assign({}, headers), { Referer: baseUrl }),
|
||||
});
|
||||
const $ = cheerio.load(response.data);
|
||||
const infoContainer = $(".entry-content,.post-inner");
|
||||
const heading = infoContainer === null || infoContainer === void 0 ? void 0 : infoContainer.find("h3");
|
||||
const imdbId =
|
||||
//@ts-ignore
|
||||
((_g = (_f = (_e = (_d = (_c = (_b = heading === null || heading === void 0 ? void 0 : heading.next("p")) === null || _b === void 0 ? void 0 : _b.find("a")) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.attribs) === null || _e === void 0 ? void 0 : _e.href) === null || _f === void 0 ? void 0 : _f.match(/tt\d+/g)) === null || _g === void 0 ? void 0 : _g[0]) ||
|
||||
((_h = infoContainer.text().match(/tt\d+/g)) === null || _h === void 0 ? void 0 : _h[0]) ||
|
||||
"";
|
||||
// console.log(imdbId)
|
||||
const type = ((_k = (_j = heading === null || heading === void 0 ? void 0 : heading.next("p")) === null || _j === void 0 ? void 0 : _j.text()) === null || _k === void 0 ? void 0 : _k.includes("Series Name"))
|
||||
? "series"
|
||||
: "movie";
|
||||
// console.log(type);
|
||||
// title
|
||||
const titleRegex = /Name: (.+)/;
|
||||
const title = ((_o = (_m = (_l = heading === null || heading === void 0 ? void 0 : heading.next("p")) === null || _l === void 0 ? void 0 : _l.text()) === null || _m === void 0 ? void 0 : _m.match(titleRegex)) === null || _o === void 0 ? void 0 : _o[1]) || "";
|
||||
// console.log(title);
|
||||
// synopsis
|
||||
const synopsisNode = //@ts-ignore
|
||||
(_t = (_s = (_r = (_q = (_p = infoContainer === null || infoContainer === void 0 ? void 0 : infoContainer.find("p")) === null || _p === void 0 ? void 0 : _p.next("h3,h4")) === null || _q === void 0 ? void 0 : _q.next("p")) === null || _r === void 0 ? void 0 : _r[0]) === null || _s === void 0 ? void 0 : _s.children) === null || _t === void 0 ? void 0 : _t[0];
|
||||
const synopsis = synopsisNode && "data" in synopsisNode ? synopsisNode.data : "";
|
||||
// console.log(synopsis);
|
||||
// image
|
||||
let image = ((_u = infoContainer === null || infoContainer === void 0 ? void 0 : infoContainer.find("img[data-lazy-src]")) === null || _u === void 0 ? void 0 : _u.attr("data-lazy-src")) || "";
|
||||
if (image.startsWith("//")) {
|
||||
image = "https:" + image;
|
||||
}
|
||||
// console.log(image);
|
||||
// console.log({title, synopsis, image, imdbId, type});
|
||||
/// Links
|
||||
const hr = (_v = infoContainer === null || infoContainer === void 0 ? void 0 : infoContainer.first()) === null || _v === void 0 ? void 0 : _v.find("hr");
|
||||
const list = hr === null || hr === void 0 ? void 0 : hr.nextUntil("hr");
|
||||
const links = [];
|
||||
list.each((index, element) => {
|
||||
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
||||
element = $(element);
|
||||
// title
|
||||
const title = (element === null || element === void 0 ? void 0 : element.text()) || "";
|
||||
const quality = ((_a = element === null || element === void 0 ? void 0 : element.text().match(/\d+p\b/)) === null || _a === void 0 ? void 0 : _a[0]) || "";
|
||||
// console.log(title);
|
||||
// movieLinks
|
||||
const movieLinks = (element === null || element === void 0 ? void 0 : element.next().find(".dwd-button").text().toLowerCase().includes("download"))
|
||||
? (_c = (_b = element === null || element === void 0 ? void 0 : element.next().find(".dwd-button")) === null || _b === void 0 ? void 0 : _b.parent()) === null || _c === void 0 ? void 0 : _c.attr("href")
|
||||
: "";
|
||||
// episode links
|
||||
const vcloudLinks = (_e = (_d = element === null || element === void 0 ? void 0 : element.next().find(".btn-outline[style='background:linear-gradient(135deg,#ed0b0b,#f2d152); color: white;'],.btn-outline[style='background:linear-gradient(135deg,#ed0b0b,#f2d152); color: #fdf8f2;']")) === null || _d === void 0 ? void 0 : _d.parent()) === null || _e === void 0 ? void 0 : _e.attr("href");
|
||||
console.log(title);
|
||||
const episodesLink = (vcloudLinks
|
||||
? vcloudLinks
|
||||
: (element === null || element === void 0 ? void 0 : element.next().find(".dwd-button").text().toLowerCase().includes("episode"))
|
||||
? (_g = (_f = element === null || element === void 0 ? void 0 : element.next().find(".dwd-button")) === null || _f === void 0 ? void 0 : _f.parent()) === null || _g === void 0 ? void 0 : _g.attr("href")
|
||||
: "") ||
|
||||
((_j = (_h = element === null || element === void 0 ? void 0 : element.next().find(".btn-outline[style='background:linear-gradient(135deg,#0ebac3,#09d261); color: white;']")) === null || _h === void 0 ? void 0 : _h.parent()) === null || _j === void 0 ? void 0 : _j.attr("href"));
|
||||
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;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,l){function d(e){try{v(n.next(e))}catch(e){l(e)}}function a(e){try{v(n.throw(e))}catch(e){l(e)}}function v(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(d,a)}v((n=n.apply(e,t||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),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"},getMeta=e=>__awaiter(void 0,[e],void 0,function*({link:e,providerContext:t}){var i,n,o,l,d,a,v,r,c,u,s,f,p,h,b,g,x,m,w;try{const{axios:_,cheerio:y}=t,k=e,L=k.split("/").slice(0,3).join("/"),A=yield _.get(k,{headers:Object.assign(Object.assign({},headers),{Referer:L})}),I=y.load(A.data),K=I(".entry-content,.post-inner"),M=null==K?void 0:K.find("h3"),S=(null===(a=null===(d=null===(l=null===(o=null===(n=null===(i=null==M?void 0:M.next("p"))||void 0===i?void 0:i.find("a"))||void 0===n?void 0:n[0])||void 0===o?void 0:o.attribs)||void 0===l?void 0:l.href)||void 0===d?void 0:d.match(/tt\d+/g))||void 0===a?void 0:a[0])||(null===(v=K.text().match(/tt\d+/g))||void 0===v?void 0:v[0])||"",U=(null===(c=null===(r=null==M?void 0:M.next("p"))||void 0===r?void 0:r.text())||void 0===c?void 0:c.includes("Series Name"))?"series":"movie",q=/Name: (.+)/,B=(null===(f=null===(s=null===(u=null==M?void 0:M.next("p"))||void 0===u?void 0:u.text())||void 0===s?void 0:s.match(q))||void 0===f?void 0:f[1])||"",F=null===(x=null===(g=null===(b=null===(h=null===(p=null==K?void 0:K.find("p"))||void 0===p?void 0:p.next("h3,h4"))||void 0===h?void 0:h.next("p"))||void 0===b?void 0:b[0])||void 0===g?void 0:g.children)||void 0===x?void 0:x[0],G=F&&"data"in F?F.data:"";let T=(null===(m=null==K?void 0:K.find("img[data-lazy-src]"))||void 0===m?void 0:m.attr("data-lazy-src"))||"";T.startsWith("//")&&(T="https:"+T);const j=null===(w=null==K?void 0:K.first())||void 0===w?void 0:w.find("hr"),H=null==j?void 0:j.nextUntil("hr"),N=[];return H.each((e,t)=>{var i,n,o,l,d,a,v,r,c;const u=(null==(t=I(t))?void 0:t.text())||"",s=(null===(i=null==t?void 0:t.text().match(/\d+p\b/))||void 0===i?void 0:i[0])||"",f=(null==t?void 0:t.next().find(".dwd-button").text().toLowerCase().includes("download"))?null===(o=null===(n=null==t?void 0:t.next().find(".dwd-button"))||void 0===n?void 0:n.parent())||void 0===o?void 0:o.attr("href"):"",p=null===(d=null===(l=null==t?void 0:t.next().find(".btn-outline[style='background:linear-gradient(135deg,#ed0b0b,#f2d152); color: white;'],.btn-outline[style='background:linear-gradient(135deg,#ed0b0b,#f2d152); color: #fdf8f2;']"))||void 0===l?void 0:l.parent())||void 0===d?void 0:d.attr("href"),h=p||((null==t?void 0:t.next().find(".dwd-button").text().toLowerCase().includes("episode"))?null===(v=null===(a=null==t?void 0:t.next().find(".dwd-button"))||void 0===a?void 0:a.parent())||void 0===v?void 0:v.attr("href"):"")||(null===(c=null===(r=null==t?void 0:t.next().find(".btn-outline[style='background:linear-gradient(135deg,#0ebac3,#09d261); color: white;']"))||void 0===r?void 0:r.parent())||void 0===c?void 0:c.attr("href"));(f||h)&&N.push({title:u,directLinks:f?[{title:"Movie",link:f,type:"movie"}]:[],episodesLink:h,quality:s})}),{title:B,synopsis:G,image:T,imdbId:S,type:U,linkList:N}}catch(e){return{title:"",synopsis:"",image:"",imdbId:"",type:"",linkList:[]}}});exports.getMeta=getMeta;
|
||||
86
dist/luxMovies/posts.js
vendored
86
dist/luxMovies/posts.js
vendored
@@ -1,85 +1 @@
|
||||
"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 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",
|
||||
Cookie: "ext_name=ojplmecpdpgccookcobabopnaifgidhf; cf_clearance=lDWFqLsHL5LZ.VpfxQRtHY2_mpXRuq3OFTbVDKNIZGw-1752051595-1.2.1.1-VZ2S8yUrcCuOMLUgWfNv9a1LrtuhUKEd.uPN1Au_9tuTFYLra7ugoFBYKfsunvzrBOlYSYM0q8J7vpw.JhGZH0RO6MlaVBKH5olmoryhd6s11LXg7ZF1Ld_NedYoA7uKk_SBhbb1CCsj11S52U9VUve7twrLEjILmw3MEURU1eGqOOi3YGxtGgpQBNYgfnkJCoRkLB_6vQESw4RcIvO1j1BHMuyMVEkbn7sBtLEX52w",
|
||||
"Upgrade-Insecure-Requests": "1",
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36 Edg/138.0.0.0",
|
||||
};
|
||||
const getPosts = (_a) => __awaiter(void 0, [_a], void 0, function* ({ filter, page, providerValue, signal, providerContext, }) {
|
||||
const { getBaseUrl } = providerContext;
|
||||
const baseUrl = yield getBaseUrl("lux");
|
||||
console.log("vegaGetPosts baseUrl:", providerValue, baseUrl);
|
||||
const url = `${baseUrl}/${filter}/page/${page}/`;
|
||||
console.log("lux url:", url);
|
||||
return posts(url, signal, providerContext);
|
||||
});
|
||||
exports.getPosts = getPosts;
|
||||
const getSearchPosts = (_a) => __awaiter(void 0, [_a], void 0, function* ({ searchQuery, page, providerValue, signal, providerContext, }) {
|
||||
const { getBaseUrl } = providerContext;
|
||||
const baseUrl = yield getBaseUrl("lux");
|
||||
console.log("vegaGetPosts baseUrl:", providerValue, baseUrl);
|
||||
const url = page === 1
|
||||
? `${baseUrl}/?s=${searchQuery}`
|
||||
: `${baseUrl}/page/${page}/?s=${searchQuery}`;
|
||||
console.log("lux url:", url);
|
||||
return posts(url, signal, providerContext);
|
||||
});
|
||||
exports.getSearchPosts = getSearchPosts;
|
||||
function posts(url, signal, providerContext) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
var _a, _b;
|
||||
try {
|
||||
const { axios, cheerio } = providerContext;
|
||||
const urlRes = yield axios.get(url, {
|
||||
headers: Object.assign(Object.assign({}, headers), { Referer: url }),
|
||||
signal,
|
||||
});
|
||||
const $ = cheerio.load(urlRes.data);
|
||||
const posts = [];
|
||||
(_b = (_a = $(".blog-items")) === null || _a === void 0 ? void 0 : _a.children("article")) === null || _b === void 0 ? void 0 : _b.each((index, element) => {
|
||||
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
||||
const post = {
|
||||
title: ((_e = (_d = (_c = (_b = (_a = $(element)) === null || _a === void 0 ? void 0 : _a.find("a")) === null || _b === void 0 ? void 0 : _b.attr("title")) === null || _c === void 0 ? void 0 : _c.replace("Download", "")) === null || _d === void 0 ? void 0 : _d.match(/^(.*?)\s*\((\d{4})\)|^(.*?)\s*\((Season \d+)\)/)) === null || _e === void 0 ? void 0 : _e[0]) ||
|
||||
((_h = (_g = (_f = $(element)) === null || _f === void 0 ? void 0 : _f.find("a")) === null || _g === void 0 ? void 0 : _g.attr("title")) === null || _h === void 0 ? void 0 : _h.replace("Download", "")) ||
|
||||
"",
|
||||
link: ((_k = (_j = $(element)) === null || _j === void 0 ? void 0 : _j.find("a")) === null || _k === void 0 ? void 0 : _k.attr("href")) || "",
|
||||
image: $(element).find("a").find("img").attr("data-lazy-src") ||
|
||||
$(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 [];
|
||||
}
|
||||
});
|
||||
}
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))(function(a,n){function r(e){try{c(o.next(e))}catch(e){n(e)}}function s(e){try{c(o.throw(e))}catch(e){n(e)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(r,s)}c((o=o.apply(e,t||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),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",Cookie:"ext_name=ojplmecpdpgccookcobabopnaifgidhf; cf_clearance=lDWFqLsHL5LZ.VpfxQRtHY2_mpXRuq3OFTbVDKNIZGw-1752051595-1.2.1.1-VZ2S8yUrcCuOMLUgWfNv9a1LrtuhUKEd.uPN1Au_9tuTFYLra7ugoFBYKfsunvzrBOlYSYM0q8J7vpw.JhGZH0RO6MlaVBKH5olmoryhd6s11LXg7ZF1Ld_NedYoA7uKk_SBhbb1CCsj11S52U9VUve7twrLEjILmw3MEURU1eGqOOi3YGxtGgpQBNYgfnkJCoRkLB_6vQESw4RcIvO1j1BHMuyMVEkbn7sBtLEX52w","Upgrade-Insecure-Requests":"1","User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36 Edg/138.0.0.0"},getPosts=e=>__awaiter(void 0,[e],void 0,function*({filter:e,page:t,providerValue:i,signal:o,providerContext:a}){const{getBaseUrl:n}=a;return posts(`${yield n("lux")}/${e}/page/${t}/`,o,a)});exports.getPosts=getPosts;const getSearchPosts=e=>__awaiter(void 0,[e],void 0,function*({searchQuery:e,page:t,providerValue:i,signal:o,providerContext:a}){const{getBaseUrl:n}=a,r=yield n("lux");return posts(1===t?`${r}/?s=${e}`:`${r}/page/${t}/?s=${e}`,o,a)});function posts(e,t,i){return __awaiter(this,void 0,void 0,function*(){var o,a;try{const{axios:n,cheerio:r}=i,s=yield n.get(e,{headers:Object.assign(Object.assign({},headers),{Referer:e}),signal:t}),c=r.load(s.data),d=[];return null===(a=null===(o=c(".blog-items"))||void 0===o?void 0:o.children("article"))||void 0===a||a.each((e,t)=>{var i,o,a,n,r,s,l,u,v,g;const p={title:(null===(r=null===(n=null===(a=null===(o=null===(i=c(t))||void 0===i?void 0:i.find("a"))||void 0===o?void 0:o.attr("title"))||void 0===a?void 0:a.replace("Download",""))||void 0===n?void 0:n.match(/^(.*?)\s*\((\d{4})\)|^(.*?)\s*\((Season \d+)\)/))||void 0===r?void 0:r[0])||(null===(u=null===(l=null===(s=c(t))||void 0===s?void 0:s.find("a"))||void 0===l?void 0:l.attr("title"))||void 0===u?void 0:u.replace("Download",""))||"",link:(null===(g=null===(v=c(t))||void 0===v?void 0:v.find("a"))||void 0===g?void 0:g.attr("href"))||"",image:c(t).find("a").find("img").attr("data-lazy-src")||c(t).find("a").find("img").attr("data-src")||c(t).find("a").find("img").attr("src")||""};p.image.startsWith("//")&&(p.image="https:"+p.image),d.push(p)}),d}catch(e){return[]}})}exports.getSearchPosts=getSearchPosts;
|
||||
104
dist/luxMovies/stream.js
vendored
104
dist/luxMovies/stream.js
vendored
@@ -1,103 +1 @@
|
||||
"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 = 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",
|
||||
};
|
||||
function getStream(_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ link, type, signal, providerContext, }) {
|
||||
var _b, _c, _d, _e;
|
||||
const { axios, cheerio, extractors } = providerContext;
|
||||
const { hubcloudExtracter } = extractors;
|
||||
try {
|
||||
const streamLinks = [];
|
||||
console.log("dotlink", link);
|
||||
if (type === "movie") {
|
||||
// vlink
|
||||
const dotlinkRes = yield axios(`${link}`, { headers });
|
||||
const dotlinkText = dotlinkRes.data;
|
||||
// console.log('dotlinkText', dotlinkText);
|
||||
const vlink = dotlinkText.match(/<a\s+href="([^"]*cloud\.[^"]*)"/i) || [];
|
||||
// console.log('vLink', vlink[1]);
|
||||
link = vlink[1];
|
||||
// filepress link
|
||||
try {
|
||||
const $ = cheerio.load(dotlinkText);
|
||||
const filepressLink = $('.btn.btn-sm.btn-outline[style="background:linear-gradient(135deg,rgb(252,185,0) 0%,rgb(0,0,0)); color: #fdf8f2;"]')
|
||||
.parent()
|
||||
.attr("href");
|
||||
// console.log('filepressLink', filepressLink);
|
||||
const filepressID = filepressLink === null || filepressLink === void 0 ? void 0 : filepressLink.split("/").pop();
|
||||
const filepressBaseUrl = filepressLink === null || filepressLink === void 0 ? void 0 : filepressLink.split("/").slice(0, -2).join("/");
|
||||
// console.log('filepressID', filepressID);
|
||||
// console.log('filepressBaseUrl', filepressBaseUrl);
|
||||
const filepressTokenRes = yield axios.post(filepressBaseUrl + "/api/file/downlaod/", {
|
||||
id: filepressID,
|
||||
method: "indexDownlaod",
|
||||
captchaValue: null,
|
||||
}, {
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
Referer: filepressBaseUrl,
|
||||
},
|
||||
});
|
||||
// console.log('filepressTokenRes', filepressTokenRes.data);
|
||||
if ((_b = filepressTokenRes.data) === null || _b === void 0 ? void 0 : _b.status) {
|
||||
const filepressToken = (_c = filepressTokenRes.data) === null || _c === void 0 ? void 0 : _c.data;
|
||||
const filepressStreamLink = yield axios.post(filepressBaseUrl + "/api/file/downlaod2/", {
|
||||
id: filepressToken,
|
||||
method: "indexDownlaod",
|
||||
captchaValue: null,
|
||||
}, {
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
Referer: filepressBaseUrl,
|
||||
},
|
||||
});
|
||||
// console.log('filepressStreamLink', filepressStreamLink.data);
|
||||
streamLinks.push({
|
||||
server: "filepress",
|
||||
link: (_e = (_d = filepressStreamLink.data) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e[0],
|
||||
type: "mkv",
|
||||
});
|
||||
}
|
||||
}
|
||||
catch (error) {
|
||||
console.log("filepress error: ");
|
||||
// console.error(error);
|
||||
}
|
||||
}
|
||||
return yield hubcloudExtracter(link, signal);
|
||||
}
|
||||
catch (error) {
|
||||
console.log("getStream error: ", error);
|
||||
if (error.message.includes("Aborted")) {
|
||||
}
|
||||
else {
|
||||
}
|
||||
return [];
|
||||
}
|
||||
});
|
||||
}
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(e,t,a,n){return new(a||(a=Promise))(function(o,i){function c(e){try{r(n.next(e))}catch(e){i(e)}}function l(e){try{r(n.throw(e))}catch(e){i(e)}}function r(e){var t;e.done?o(e.value):(t=e.value,t instanceof a?t:new a(function(e){e(t)})).then(c,l)}r((n=n.apply(e,t||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),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"};function getStream(e){return __awaiter(this,arguments,void 0,function*({link:e,type:t,signal:a,providerContext:n}){var o,i,c,l;const{axios:r,cheerio:d,extractors:s}=n,{hubcloudExtracter:p}=s;try{const n=[];if("movie"===t){const t=(yield r(`${e}`,{headers:headers})).data;e=(t.match(/<a\s+href="([^"]*cloud\.[^"]*)"/i)||[])[1];try{const e=d.load(t)('.btn.btn-sm.btn-outline[style="background:linear-gradient(135deg,rgb(252,185,0) 0%,rgb(0,0,0)); color: #fdf8f2;"]').parent().attr("href"),a=null==e?void 0:e.split("/").pop(),s=null==e?void 0:e.split("/").slice(0,-2).join("/"),p=yield r.post(s+"/api/file/downlaod/",{id:a,method:"indexDownlaod",captchaValue:null},{headers:{"Content-Type":"application/json",Referer:s}});if(null===(o=p.data)||void 0===o?void 0:o.status){const e=null===(i=p.data)||void 0===i?void 0:i.data,t=yield r.post(s+"/api/file/downlaod2/",{id:e,method:"indexDownlaod",captchaValue:null},{headers:{"Content-Type":"application/json",Referer:s}});n.push({server:"filepress",link:null===(l=null===(c=t.data)||void 0===c?void 0:c.data)||void 0===l?void 0:l[0],type:"mkv"})}}catch(e){}}return yield p(e,a)}catch(e){return e.message.includes("Aborted"),[]}})}
|
||||
88
dist/mod/catalog.js
vendored
88
dist/mod/catalog.js
vendored
@@ -1,87 +1 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.genres = exports.catalog = void 0;
|
||||
exports.catalog = [
|
||||
{
|
||||
title: "Latest",
|
||||
filter: "",
|
||||
},
|
||||
{
|
||||
title: "Netflix",
|
||||
filter: "/ott/netflix",
|
||||
},
|
||||
{
|
||||
title: "HBO Max",
|
||||
filter: "/ott/hbo-max",
|
||||
},
|
||||
{
|
||||
title: "Amazon Prime",
|
||||
filter: "/ott/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/",
|
||||
},
|
||||
];
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.genres=exports.catalog=void 0,exports.catalog=[{title:"Latest",filter:""},{title:"Netflix",filter:"/ott/netflix"},{title:"HBO Max",filter:"/ott/hbo-max"},{title:"Amazon Prime",filter:"/ott/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/"}];
|
||||
61
dist/mod/episodes.js
vendored
61
dist/mod/episodes.js
vendored
@@ -1,60 +1 @@
|
||||
"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.getEpisodes = void 0;
|
||||
const getEpisodes = function (_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ url, providerContext, }) {
|
||||
var _b;
|
||||
const { axios, cheerio } = providerContext;
|
||||
try {
|
||||
if (url.includes("url=")) {
|
||||
url = atob(url.split("url=")[1]);
|
||||
}
|
||||
const res = yield axios.get(url);
|
||||
const html = res.data;
|
||||
let $ = cheerio.load(html);
|
||||
if (url.includes("url=")) {
|
||||
const newUrl = (_b = $("meta[http-equiv='refresh']")
|
||||
.attr("content")) === null || _b === void 0 ? void 0 : _b.split("url=")[1];
|
||||
const res2 = yield 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;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,n,i){return new(n||(n=Promise))(function(o,r){function a(t){try{u(i.next(t))}catch(t){r(t)}}function s(t){try{u(i.throw(t))}catch(t){r(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,s)}u((i=i.apply(t,e||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getEpisodes=void 0;const getEpisodes=function(t){return __awaiter(this,arguments,void 0,function*({url:t,providerContext:e}){var n;const{axios:i,cheerio:o}=e;try{t.includes("url=")&&(t=atob(t.split("url=")[1]));const e=(yield i.get(t)).data;let r=o.load(e);if(t.includes("url=")){const e=null===(n=r("meta[http-equiv='refresh']").attr("content"))||void 0===n?void 0:n.split("url=")[1],a=(yield i.get(e||t)).data;r=o.load(a)}const a=[];return r("h3,h4").map((t,e)=>{const n=r(e).text(),i=r(e).find("a").attr("href");i&&"#"!==i&&a.push({title:n.trim()||"No title found",link:i||""})}),r("a.maxbutton").map((t,e)=>{const n=r(e).children("span").text(),i=r(e).attr("href");i&&"#"!==i&&a.push({title:n.trim()||"No title found",link:i||""})}),a}catch(t){return[]}})};exports.getEpisodes=getEpisodes;
|
||||
76
dist/mod/meta.js
vendored
76
dist/mod/meta.js
vendored
@@ -1,75 +1 @@
|
||||
"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;
|
||||
try {
|
||||
const { axios, cheerio } = providerContext;
|
||||
const url = link;
|
||||
const res = yield 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: ((_b = $(".imdbwp__link").attr("href")) === null || _b === void 0 ? void 0 : _b.split("/")[4]) || "",
|
||||
type: $(".thecontent").text().toLocaleLowerCase().includes("season")
|
||||
? "series"
|
||||
: "movie",
|
||||
};
|
||||
const links = [];
|
||||
$("h3,h4").map((i, element) => {
|
||||
var _a;
|
||||
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: ((_a = seriesTitle === null || seriesTitle === void 0 ? void 0 : seriesTitle.match(/\d+p\b/)) === null || _a === void 0 ? void 0 : _a[0]) || "",
|
||||
});
|
||||
}
|
||||
});
|
||||
// console.log('mod meta', links);
|
||||
return Object.assign(Object.assign({}, meta), { linkList: links });
|
||||
}
|
||||
catch (err) {
|
||||
console.error(err);
|
||||
return {
|
||||
title: "",
|
||||
synopsis: "",
|
||||
image: "",
|
||||
imdbId: "",
|
||||
type: "movie",
|
||||
linkList: [],
|
||||
};
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getMeta = getMeta;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,i,n){return new(i||(i=Promise))(function(o,a){function r(t){try{d(n.next(t))}catch(t){a(t)}}function s(t){try{d(n.throw(t))}catch(t){a(t)}}function d(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(r,s)}d((n=n.apply(t,e||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getMeta=void 0;const getMeta=function(t){return __awaiter(this,arguments,void 0,function*({link:t,providerContext:e}){var i;try{const{axios:n,cheerio:o}=e,a=t,r=(yield n.get(a)).data,s=o.load(r),d={title:s(".imdbwp__title").text(),synopsis:s(".imdbwp__teaser").text(),image:s(".imdbwp__thumb").find("img").attr("src")||"",imdbId:(null===(i=s(".imdbwp__link").attr("href"))||void 0===i?void 0:i.split("/")[4])||"",type:s(".thecontent").text().toLocaleLowerCase().includes("season")?"series":"movie"},l=[];return s("h3,h4").map((t,e)=>{var i;const n=s(e).text(),o=s(e).next("p").find(".maxbutton-episode-links,.maxbutton-g-drive,.maxbutton-af-download").attr("href"),a=s(e).next("p").find(".maxbutton-download-links").attr("href");(a||o&&"javascript:void(0);"!==o)&&l.push({title:n.replace("Download ","").trim()||"Download",episodesLink:o||"",directLinks:a?[{link:a,title:"Movie",type:"movie"}]:[],quality:(null===(i=null==n?void 0:n.match(/\d+p\b/))||void 0===i?void 0:i[0])||""})}),Object.assign(Object.assign({},d),{linkList:l})}catch(t){return{title:"",synopsis:"",image:"",imdbId:"",type:"movie",linkList:[]}}})};exports.getMeta=getMeta;
|
||||
60
dist/mod/posts.js
vendored
60
dist/mod/posts.js
vendored
@@ -1,59 +1 @@
|
||||
"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, page, signal, providerContext, }) {
|
||||
const { getBaseUrl, axios, cheerio } = providerContext;
|
||||
const baseUrl = yield getBaseUrl("Moviesmod");
|
||||
const url = `${baseUrl + filter}/page/${page}/`;
|
||||
return posts({ url, signal, axios, cheerio });
|
||||
});
|
||||
};
|
||||
exports.getPosts = getPosts;
|
||||
const getSearchPosts = function (_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ searchQuery, page, signal, providerContext, }) {
|
||||
const { getBaseUrl, axios, cheerio } = providerContext;
|
||||
const baseUrl = yield getBaseUrl("Moviesmod");
|
||||
const url = `${baseUrl}/search/${searchQuery}/page/${page}/`;
|
||||
return posts({ url, signal, axios, cheerio });
|
||||
});
|
||||
};
|
||||
exports.getSearchPosts = getSearchPosts;
|
||||
function posts(_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ url, signal, axios, cheerio, }) {
|
||||
try {
|
||||
const res = yield axios.get(url, { 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("src");
|
||||
if (title && link && image) {
|
||||
catalog.push({
|
||||
title: title,
|
||||
link: link,
|
||||
image: image,
|
||||
});
|
||||
}
|
||||
});
|
||||
return catalog;
|
||||
}
|
||||
catch (err) {
|
||||
console.error("modGetPosts error ", err);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
}
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,r,i){return new(r||(r=Promise))(function(o,s){function n(t){try{c(i.next(t))}catch(t){s(t)}}function a(t){try{c(i.throw(t))}catch(t){s(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r(function(t){t(e)})).then(n,a)}c((i=i.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,page:e,signal:r,providerContext:i}){const{getBaseUrl:o,axios:s,cheerio:n}=i;return posts({url:`${(yield o("Moviesmod"))+t}/page/${e}/`,signal:r,axios:s,cheerio:n})})};exports.getPosts=getPosts;const getSearchPosts=function(t){return __awaiter(this,arguments,void 0,function*({searchQuery:t,page:e,signal:r,providerContext:i}){const{getBaseUrl:o,axios:s,cheerio:n}=i;return posts({url:`${yield o("Moviesmod")}/search/${t}/page/${e}/`,signal:r,axios:s,cheerio:n})})};function posts(t){return __awaiter(this,arguments,void 0,function*({url:t,signal:e,axios:r,cheerio:i}){try{const o=(yield r.get(t,{signal:e})).data,s=i.load(o),n=[];return s(".post-cards").find("article").map((t,e)=>{const r=s(e).find("a").attr("title"),i=s(e).find("a").attr("href"),o=s(e).find("img").attr("src");r&&i&&o&&n.push({title:r,link:i,image:o})}),n}catch(t){return[]}})}exports.getSearchPosts=getSearchPosts;
|
||||
275
dist/mod/stream.js
vendored
275
dist/mod/stream.js
vendored
@@ -1,274 +1 @@
|
||||
"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 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 = function (_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ link: url, type, providerContext, }) {
|
||||
var _b, _c;
|
||||
const { axios, cheerio } = providerContext;
|
||||
try {
|
||||
const modGetEpisodeLinks = function (_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ url, providerContext, }) {
|
||||
var _b;
|
||||
const { axios, cheerio } = providerContext;
|
||||
try {
|
||||
if (url.includes("url=")) {
|
||||
url = atob(url.split("url=")[1]);
|
||||
}
|
||||
const res = yield axios.get(url);
|
||||
const html = res.data;
|
||||
let $ = cheerio.load(html);
|
||||
if (url.includes("url=")) {
|
||||
const newUrl = (_b = $("meta[http-equiv='refresh']")
|
||||
.attr("content")) === null || _b === void 0 ? void 0 : _b.split("url=")[1];
|
||||
const res2 = yield 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 = yield modGetEpisodeLinks({ url, providerContext });
|
||||
url = servers[0].link || url;
|
||||
}
|
||||
let downloadLink = yield modExtractor(url, providerContext);
|
||||
// console.log(downloadLink.data);
|
||||
const ddl = ((_c = (_b = downloadLink === null || downloadLink === void 0 ? void 0 : downloadLink.data) === null || _b === void 0 ? void 0 : _b.match(/content="0;url=(.*?)"/)) === null || _c === void 0 ? void 0 : _c[1]) || url;
|
||||
// console.log('ddl', url);
|
||||
// console.log(ddl);
|
||||
// console.log(ddl);
|
||||
const servers = [];
|
||||
const driveLink = yield isDriveLink(ddl);
|
||||
const driveRes = yield axios.get(driveLink, { headers });
|
||||
const driveHtml = driveRes.data;
|
||||
const $drive = cheerio.load(driveHtml);
|
||||
try {
|
||||
const resumeBot = $drive(".btn.btn-light").attr("href") || "";
|
||||
const resumeBotRes = yield 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 = yield fetch(resumeBotBaseUrl + "/download?id=" + resumeBotPath, {
|
||||
method: "POST",
|
||||
body: resumeBotBody,
|
||||
headers: {
|
||||
Referer: resumeBot,
|
||||
Cookie: "PHPSESSID=7e9658ce7c805dab5bbcea9046f7f308",
|
||||
},
|
||||
});
|
||||
const resumeBotDownloadData = yield 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 = yield axios.get(cfWorkersLink, { headers });
|
||||
const cfWorkersHtml = cfWorkersRes.data;
|
||||
const $cfWorkers = cheerio.load(cfWorkersHtml);
|
||||
const cfWorkersStream = $cfWorkers(".btn-success");
|
||||
cfWorkersStream.each((i, el) => {
|
||||
var _a;
|
||||
const link = (_a = el.attribs) === null || _a === void 0 ? void 0 : _a.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 = yield axios.get(cfWorkersLink, { headers });
|
||||
const cfWorkersHtml = cfWorkersRes.data;
|
||||
const $cfWorkers = cheerio.load(cfWorkersHtml);
|
||||
const cfWorkersStream = $cfWorkers(".btn-success");
|
||||
cfWorkersStream.each((i, el) => {
|
||||
var _a;
|
||||
const link = (_a = el.attribs) === null || _a === void 0 ? void 0 : _a.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 = yield fetch(videoSeedUrl, {
|
||||
method: "POST",
|
||||
body: InstantFromData,
|
||||
headers: {
|
||||
"x-token": videoSeedUrl,
|
||||
},
|
||||
});
|
||||
const instantLinkData = yield 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 = (ddl) => __awaiter(void 0, void 0, void 0, function* () {
|
||||
if (ddl.includes("drive")) {
|
||||
const driveLeach = yield fetch(ddl);
|
||||
const driveLeachData = yield driveLeach.text();
|
||||
const pathMatch = driveLeachData.match(/window\.location\.replace\("([^"]+)"\)/);
|
||||
const path = pathMatch === null || pathMatch === void 0 ? void 0 : pathMatch[1];
|
||||
const mainUrl = ddl.split("/")[2];
|
||||
console.log(`driveUrl = https://${mainUrl}${path}`);
|
||||
return `https://${mainUrl}${path}`;
|
||||
}
|
||||
else {
|
||||
return ddl;
|
||||
}
|
||||
});
|
||||
function modExtractor(url, providerContext) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const { axios, cheerio } = providerContext;
|
||||
try {
|
||||
const wpHttp = url.split("sid=")[1];
|
||||
var bodyFormData0 = new FormData();
|
||||
bodyFormData0.append("_wp_http", wpHttp);
|
||||
const res = yield fetch(url.split("?")[0], {
|
||||
method: "POST",
|
||||
body: bodyFormData0,
|
||||
});
|
||||
const data = yield 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 = yield fetch(formUrl, {
|
||||
method: "POST",
|
||||
body: bodyFormData,
|
||||
});
|
||||
const html2 = yield res2.text();
|
||||
const link = html2.match(/setAttribute\("href",\s*"(.*?)"/)[1];
|
||||
console.log(link);
|
||||
const cookie = link.split("=")[1];
|
||||
console.log("cookie", cookie);
|
||||
const downloadLink = yield axios.get(link, {
|
||||
headers: {
|
||||
Referer: formUrl,
|
||||
Cookie: `${cookie}=${wpHttp2}`,
|
||||
},
|
||||
});
|
||||
return downloadLink;
|
||||
}
|
||||
catch (err) {
|
||||
console.log("modGetStream error", err);
|
||||
}
|
||||
});
|
||||
}
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(e,t,a,i){return new(a||(a=Promise))(function(o,r){function n(e){try{d(i.next(e))}catch(e){r(e)}}function c(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){var t;e.done?o(e.value):(t=e.value,t instanceof a?t:new a(function(e){e(t)})).then(n,c)}d((i=i.apply(e,t||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),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"},getStream=function(e){return __awaiter(this,arguments,void 0,function*({link:e,type:t,providerContext:a}){var i,o;const{axios:r,cheerio:n}=a;try{const c=function(e){return __awaiter(this,arguments,void 0,function*({url:e,providerContext:t}){var a;const{axios:i,cheerio:o}=t;try{e.includes("url=")&&(e=atob(e.split("url=")[1]));const t=(yield i.get(e)).data;let r=o.load(t);if(e.includes("url=")){const t=null===(a=r("meta[http-equiv='refresh']").attr("content"))||void 0===a?void 0:a.split("url=")[1],n=(yield i.get(t||e)).data;r=o.load(n)}const n=[];return r("h3,h4").map((e,t)=>{const a=r(t).text(),i=r(t).find("a").attr("href");i&&"#"!==i&&n.push({title:a.trim()||"No title found",link:i||""})}),r("a.maxbutton").map((e,t)=>{const a=r(t).children("span").text(),i=r(t).attr("href");i&&"#"!==i&&n.push({title:a.trim()||"No title found",link:i||""})}),n}catch(e){return[]}})};if("movie"===t){e=(yield c({url:e,providerContext:a}))[0].link||e}let d=yield modExtractor(e,a);const s=(null===(o=null===(i=null==d?void 0:d.data)||void 0===i?void 0:i.match(/content="0;url=(.*?)"/))||void 0===o?void 0:o[1])||e,l=[],h=yield isDriveLink(s),p=(yield r.get(h,{headers:headers})).data,u=n.load(p);try{const e=u(".btn.btn-light").attr("href")||"",t=yield r.get(e,{headers:headers}),a=t.data.match(/formData\.append\('token', '([a-f0-9]+)'\)/)[1],i=new FormData;i.append("token",a);const o=t.data.match(/fetch\('\/download\?id=([a-zA-Z0-9\/+]+)'/)[1],n=e.split("/download")[0],c=yield fetch(n+"/download?id="+o,{method:"POST",body:i,headers:{Referer:e,Cookie:"PHPSESSID=7e9658ce7c805dab5bbcea9046f7f308"}}),d=yield c.json();l.push({server:"ResumeBot",link:d.url,type:"mkv"})}catch(e){}try{const e=h.replace("/file","/wfile")+"?type=1",t=(yield r.get(e,{headers:headers})).data,a=n.load(t);a(".btn-success").each((e,t)=>{var a;const i=null===(a=t.attribs)||void 0===a?void 0:a.href;i&&l.push({server:"Cf Worker 1."+e,link:i,type:"mkv"})})}catch(e){}try{const e=h.replace("/file","/wfile")+"?type=2",t=(yield r.get(e,{headers:headers})).data,a=n.load(t);a(".btn-success").each((e,t)=>{var a;const i=null===(a=t.attribs)||void 0===a?void 0:a.href;i&&l.push({server:"Cf Worker 2."+e,link:i,type:"mkv"})})}catch(e){}try{const e=u(".btn-danger").attr("href")||"",t=e.split("=")[1],a=new FormData;a.append("keys",t);const i=e.split("/").slice(0,3).join("/")+"/api",o=yield fetch(i,{method:"POST",body:a,headers:{"x-token":i}}),r=yield o.json();if(!1===r.error){const e=r.url;l.push({server:"Gdrive-Instant",link:e,type:"mkv"})}}catch(e){}return l}catch(e){return[]}})};exports.getStream=getStream;const isDriveLink=e=>__awaiter(void 0,void 0,void 0,function*(){if(e.includes("drive")){const t=yield fetch(e),a=(yield t.text()).match(/window\.location\.replace\("([^"]+)"\)/),i=null==a?void 0:a[1];return`https://${e.split("/")[2]}${i}`}return e});function modExtractor(e,t){return __awaiter(this,void 0,void 0,function*(){const{axios:a,cheerio:i}=t;try{const t=e.split("sid=")[1];var o=new FormData;o.append("_wp_http",t);const n=yield fetch(e.split("?")[0],{method:"POST",body:o}),c=yield n.text(),d=i.load(c),s=d("input").attr("name","_wp_http2").val();var r=new FormData;r.append("_wp_http2",s);const l=d("form").attr("action")||e.split("?")[0],h=yield fetch(l,{method:"POST",body:r}),p=(yield h.text()).match(/setAttribute\("href",\s*"(.*?)"/)[1],u=p.split("=")[1];return yield a.get(p,{headers:{Referer:l,Cookie:`${u}=${s}`}})}catch(e){}})}
|
||||
98
dist/moviesApi/stream.js
vendored
98
dist/moviesApi/stream.js
vendored
@@ -1,97 +1 @@
|
||||
"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.mpGetStream = void 0;
|
||||
const mpGetStream = function (_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ link: id, type, providerContext, }) {
|
||||
var _b, _c;
|
||||
try {
|
||||
const { getBaseUrl, cheerio } = providerContext;
|
||||
const streams = [];
|
||||
const { season, episode, tmdbId } = JSON.parse(id);
|
||||
const baseUrl = yield getBaseUrl("moviesapi");
|
||||
const link = type === "movie"
|
||||
? `${baseUrl}/movie/${tmdbId}`
|
||||
: `${baseUrl}/tv/${tmdbId}-${season}-${episode}`;
|
||||
const res = yield fetch(link, {
|
||||
headers: {
|
||||
referer: baseUrl,
|
||||
},
|
||||
});
|
||||
const baseData = yield res.text();
|
||||
const $ = cheerio.load(baseData);
|
||||
const embededUrl = $("iframe").attr("src") || "";
|
||||
const response = yield fetch(embededUrl, {
|
||||
credentials: "omit",
|
||||
headers: {
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0",
|
||||
Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8",
|
||||
"Accept-Language": "en-US,en;q=0.5",
|
||||
"Alt-Used": "w1.moviesapi.club",
|
||||
"Upgrade-Insecure-Requests": "1",
|
||||
"Sec-Fetch-Dest": "document",
|
||||
"Sec-Fetch-Mode": "navigate",
|
||||
"Sec-Fetch-Site": "none",
|
||||
"Sec-Fetch-User": "?1",
|
||||
Pragma: "no-cache",
|
||||
"Cache-Control": "no-cache",
|
||||
referer: baseUrl,
|
||||
},
|
||||
referrer: baseUrl,
|
||||
method: "GET",
|
||||
mode: "cors",
|
||||
});
|
||||
const data2 = yield response.text();
|
||||
// Extract the encrypted content
|
||||
const contents = ((_b = data2.match(/const\s+Encrypted\s*=\s*['"]({.*})['"]/)) === null || _b === void 0 ? void 0 : _b[1]) || "";
|
||||
if (embededUrl) {
|
||||
const res2 = yield fetch("https://ext.8man.me/api/decrypt?passphrase==JV[t}{trEV=Ilh5", {
|
||||
method: "POST",
|
||||
body: contents,
|
||||
});
|
||||
const finalData = yield res2.json();
|
||||
const subtitle = (_c = finalData === null || finalData === void 0 ? void 0 : finalData.subtitles) === null || _c === void 0 ? void 0 : _c.map((sub) => {
|
||||
var _a;
|
||||
return ({
|
||||
title: (sub === null || sub === void 0 ? void 0 : sub.label) || "Unknown",
|
||||
language: sub === null || sub === void 0 ? void 0 : sub.label,
|
||||
type: ((_a = sub === null || sub === void 0 ? void 0 : sub.file) === null || _a === void 0 ? void 0 : _a.includes(".vtt")) ? "text/vtt" : "application/x-subrip",
|
||||
uri: sub === null || sub === void 0 ? void 0 : sub.file,
|
||||
});
|
||||
});
|
||||
streams.push({
|
||||
server: "vidstreaming ",
|
||||
type: "m3u8",
|
||||
subtitles: subtitle,
|
||||
link: finalData === null || finalData === void 0 ? void 0 : finalData.videoUrl,
|
||||
headers: {
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0",
|
||||
Referer: baseUrl,
|
||||
Origin: baseUrl,
|
||||
Accept: "*/*",
|
||||
"Accept-Language": "en-US,en;q=0.5",
|
||||
"Sec-Fetch-Dest": "empty",
|
||||
"Sec-Fetch-Mode": "cors",
|
||||
"Sec-Fetch-Site": "cross-site",
|
||||
Pragma: "no-cache",
|
||||
"Cache-Control": "no-cache",
|
||||
},
|
||||
});
|
||||
}
|
||||
return streams;
|
||||
}
|
||||
catch (err) {
|
||||
console.error(err);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.mpGetStream = mpGetStream;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(r,o){function c(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(c,a)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.mpGetStream=void 0;const mpGetStream=function(e){return __awaiter(this,arguments,void 0,function*({link:e,type:t,providerContext:i}){var n,r;try{const{getBaseUrl:o,cheerio:c}=i,a=[],{season:l,episode:s,tmdbId:d}=JSON.parse(e),u=yield o("moviesapi"),p="movie"===t?`${u}/movie/${d}`:`${u}/tv/${d}-${l}-${s}`,h=yield fetch(p,{headers:{referer:u}}),v=yield h.text(),m=c.load(v)("iframe").attr("src")||"",f=yield fetch(m,{credentials:"omit",headers:{"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0",Accept:"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8","Accept-Language":"en-US,en;q=0.5","Alt-Used":"w1.moviesapi.club","Upgrade-Insecure-Requests":"1","Sec-Fetch-Dest":"document","Sec-Fetch-Mode":"navigate","Sec-Fetch-Site":"none","Sec-Fetch-User":"?1",Pragma:"no-cache","Cache-Control":"no-cache",referer:u},referrer:u,method:"GET",mode:"cors"}),x=(null===(n=(yield f.text()).match(/const\s+Encrypted\s*=\s*['"]({.*})['"]/))||void 0===n?void 0:n[1])||"";if(m){const e=yield fetch("https://ext.8man.me/api/decrypt?passphrase==JV[t}{trEV=Ilh5",{method:"POST",body:x}),t=yield e.json(),i=null===(r=null==t?void 0:t.subtitles)||void 0===r?void 0:r.map(e=>{var t;return{title:(null==e?void 0:e.label)||"Unknown",language:null==e?void 0:e.label,type:(null===(t=null==e?void 0:e.file)||void 0===t?void 0:t.includes(".vtt"))?"text/vtt":"application/x-subrip",uri:null==e?void 0:e.file}});a.push({server:"vidstreaming ",type:"m3u8",subtitles:i,link:null==t?void 0:t.videoUrl,headers:{"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0",Referer:u,Origin:u,Accept:"*/*","Accept-Language":"en-US,en;q=0.5","Sec-Fetch-Dest":"empty","Sec-Fetch-Mode":"cors","Sec-Fetch-Site":"cross-site",Pragma:"no-cache","Cache-Control":"no-cache"}})}return a}catch(e){return[]}})};exports.mpGetStream=mpGetStream;
|
||||
23
dist/moviezwap/catalog.js
vendored
23
dist/moviezwap/catalog.js
vendored
@@ -1,22 +1 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.genres = exports.catalog = void 0;
|
||||
exports.catalog = [
|
||||
{
|
||||
title: "Telugu Movies",
|
||||
filter: "/category/Telugu-(2025)-Movies.html",
|
||||
},
|
||||
{
|
||||
title: "Tamil Movies",
|
||||
filter: "/category/Tamil-(2025)-Movies.html",
|
||||
},
|
||||
{
|
||||
title: "Hollywood Telugu Dubbed",
|
||||
filter: "/category/Telugu-Dubbed-Hollywood-Movies-Complete-Set.html",
|
||||
},
|
||||
{
|
||||
title: "Web Series",
|
||||
filter: "/category/Telugu-Web-Series.html",
|
||||
},
|
||||
];
|
||||
exports.genres = [];
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.genres=exports.catalog=void 0,exports.catalog=[{title:"Telugu Movies",filter:"/category/Telugu-(2025)-Movies.html"},{title:"Tamil Movies",filter:"/category/Tamil-(2025)-Movies.html"},{title:"Hollywood Telugu Dubbed",filter:"/category/Telugu-Dubbed-Hollywood-Movies-Complete-Set.html"},{title:"Web Series",filter:"/category/Telugu-Web-Series.html"}],exports.genres=[];
|
||||
47
dist/moviezwap/episodes.js
vendored
47
dist/moviezwap/episodes.js
vendored
@@ -1,46 +1 @@
|
||||
"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.getEpisodes = void 0;
|
||||
const getEpisodes = function (_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ url, providerContext, }) {
|
||||
const { axios, cheerio, getBaseUrl } = providerContext;
|
||||
try {
|
||||
const res = yield axios.get(url);
|
||||
const baseUrl = yield getBaseUrl("moviezwap");
|
||||
const html = res.data;
|
||||
const $ = cheerio.load(html);
|
||||
const episodeLinks = [];
|
||||
$('a[href*="download.php?file="], a[href*="dwload.php?file="]').each((i, el) => {
|
||||
var _a;
|
||||
const downloadPage = ((_a = $(el).attr("href")) === null || _a === void 0 ? void 0 : _a.replace("dwload.php", "download.php")) || "";
|
||||
let text = $(el).text().trim();
|
||||
if (text.includes("Download page")) {
|
||||
// Remove "Download" from the text
|
||||
text = "Play";
|
||||
}
|
||||
if (downloadPage && text) {
|
||||
// Only add links with quality in text
|
||||
episodeLinks.push({
|
||||
title: text,
|
||||
link: baseUrl + downloadPage,
|
||||
});
|
||||
}
|
||||
});
|
||||
return episodeLinks;
|
||||
}
|
||||
catch (err) {
|
||||
console.error(err);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getEpisodes = getEpisodes;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(e,t,o,n){return new(o||(o=Promise))(function(i,r){function a(e){try{d(n.next(e))}catch(e){r(e)}}function s(e){try{d(n.throw(e))}catch(e){r(e)}}function d(e){var t;e.done?i(e.value):(t=e.value,t instanceof o?t:new o(function(e){e(t)})).then(a,s)}d((n=n.apply(e,t||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getEpisodes=void 0;const getEpisodes=function(e){return __awaiter(this,arguments,void 0,function*({url:e,providerContext:t}){const{axios:o,cheerio:n,getBaseUrl:i}=t;try{const t=yield o.get(e),r=yield i("moviezwap"),a=t.data,s=n.load(a),d=[];return s('a[href*="download.php?file="], a[href*="dwload.php?file="]').each((e,t)=>{var o;const n=(null===(o=s(t).attr("href"))||void 0===o?void 0:o.replace("dwload.php","download.php"))||"";let i=s(t).text().trim();i.includes("Download page")&&(i="Play"),n&&i&&d.push({title:i,link:r+n})}),d}catch(e){return[]}})};exports.getEpisodes=getEpisodes;
|
||||
107
dist/moviezwap/meta.js
vendored
107
dist/moviezwap/meta.js
vendored
@@ -1,106 +1 @@
|
||||
"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, }) {
|
||||
try {
|
||||
const { axios, cheerio, getBaseUrl } = providerContext;
|
||||
const baseUrl = yield getBaseUrl("moviezwap");
|
||||
const url = link.startsWith("http") ? link : `${baseUrl}${link}`;
|
||||
const res = yield axios.get(url);
|
||||
const data = res.data;
|
||||
const $ = cheerio.load(data);
|
||||
// 1. Poster image find image with width 260
|
||||
let image = $('img[width="260"]').attr("src") || "";
|
||||
if (image && !image.startsWith("http")) {
|
||||
image = baseUrl + image;
|
||||
}
|
||||
const tags = $("font[color='steelblue']")
|
||||
.map((i, el) => $(el).text().trim())
|
||||
.get()
|
||||
.slice(0, 2);
|
||||
// 2. Title
|
||||
const title = $("title").text().replace(" - MoviezWap", "").trim() || "";
|
||||
// 3. Info table
|
||||
let synopsis = "";
|
||||
let imdbId = "";
|
||||
let type = "movie";
|
||||
let infoRows = [];
|
||||
$("td:contains('Movie Information')")
|
||||
.parent()
|
||||
.nextAll("tr")
|
||||
.each((i, el) => {
|
||||
const tds = $(el).find("td");
|
||||
if (tds.length === 2) {
|
||||
const key = tds.eq(0).text().trim();
|
||||
const value = tds.eq(1).text().trim();
|
||||
infoRows.push(`${key}: ${value}`);
|
||||
if (key.toLowerCase().includes("plot"))
|
||||
synopsis = value;
|
||||
if (key.toLowerCase().includes("imdb"))
|
||||
imdbId = value;
|
||||
}
|
||||
});
|
||||
if (!synopsis) {
|
||||
// fallback: try to find a <p> with plot
|
||||
synopsis = $("p:contains('plot')").text().trim();
|
||||
}
|
||||
// 4. Download links (multiple qualities)
|
||||
const links = [];
|
||||
$('a[href*="download.php?file="], a[href*="dwload.php?file="]').each((i, el) => {
|
||||
var _a;
|
||||
const downloadPage = ((_a = $(el).attr("href")) === null || _a === void 0 ? void 0 : _a.replace("dwload.php", "download.php")) || "";
|
||||
const text = $(el).text().trim();
|
||||
if (downloadPage && /\d+p/i.test(text)) {
|
||||
// Only add links with quality in text
|
||||
links.push({
|
||||
title: text,
|
||||
directLinks: [{ title: "Movie", link: baseUrl + downloadPage }],
|
||||
});
|
||||
}
|
||||
});
|
||||
$("img[src*='/images/play.png']").each((i, el) => {
|
||||
const downloadPage = $(el).siblings("a").attr("href");
|
||||
const text = $(el).siblings("a").text().trim();
|
||||
console.log("Found link:🔥🔥", text, downloadPage);
|
||||
if (downloadPage && text) {
|
||||
links.push({
|
||||
title: text,
|
||||
episodesLink: baseUrl + downloadPage,
|
||||
});
|
||||
}
|
||||
});
|
||||
return {
|
||||
title,
|
||||
synopsis,
|
||||
image,
|
||||
imdbId,
|
||||
tags,
|
||||
type,
|
||||
linkList: links,
|
||||
//info: infoRows.join("\n"),
|
||||
};
|
||||
}
|
||||
catch (err) {
|
||||
console.error(err);
|
||||
return {
|
||||
title: "",
|
||||
synopsis: "",
|
||||
image: "",
|
||||
imdbId: "",
|
||||
type: "movie",
|
||||
linkList: [],
|
||||
};
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getMeta = getMeta;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,i,n){return new(i||(i=Promise))(function(o,a){function r(t){try{l(n.next(t))}catch(t){a(t)}}function s(t){try{l(n.throw(t))}catch(t){a(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(r,s)}l((n=n.apply(t,e||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getMeta=void 0;const getMeta=function(t){return __awaiter(this,arguments,void 0,function*({link:t,providerContext:e}){try{const{axios:i,cheerio:n,getBaseUrl:o}=e,a=yield o("moviezwap"),r=t.startsWith("http")?t:`${a}${t}`,s=(yield i.get(r)).data,l=n.load(s);let c=l('img[width="260"]').attr("src")||"";c&&!c.startsWith("http")&&(c=a+c);const p=l("font[color='steelblue']").map((t,e)=>l(e).text().trim()).get().slice(0,2),d=l("title").text().replace(" - MoviezWap","").trim()||"";let h="",u="",m="movie",f=[];l("td:contains('Movie Information')").parent().nextAll("tr").each((t,e)=>{const i=l(e).find("td");if(2===i.length){const t=i.eq(0).text().trim(),e=i.eq(1).text().trim();f.push(`${t}: ${e}`),t.toLowerCase().includes("plot")&&(h=e),t.toLowerCase().includes("imdb")&&(u=e)}}),h||(h=l("p:contains('plot')").text().trim());const g=[];return l('a[href*="download.php?file="], a[href*="dwload.php?file="]').each((t,e)=>{var i;const n=(null===(i=l(e).attr("href"))||void 0===i?void 0:i.replace("dwload.php","download.php"))||"",o=l(e).text().trim();n&&/\d+p/i.test(o)&&g.push({title:o,directLinks:[{title:"Movie",link:a+n}]})}),l("img[src*='/images/play.png']").each((t,e)=>{const i=l(e).siblings("a").attr("href"),n=l(e).siblings("a").text().trim();i&&n&&g.push({title:n,episodesLink:a+i})}),{title:d,synopsis:h,image:c,imdbId:u,tags:p,type:m,linkList:g}}catch(t){return{title:"",synopsis:"",image:"",imdbId:"",type:"movie",linkList:[]}}})};exports.getMeta=getMeta;
|
||||
58
dist/moviezwap/posts.js
vendored
58
dist/moviezwap/posts.js
vendored
@@ -1,57 +1 @@
|
||||
"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, page, signal, providerContext, }) {
|
||||
const { getBaseUrl, cheerio } = providerContext;
|
||||
const baseUrl = yield getBaseUrl("moviezwap");
|
||||
const url = `${baseUrl}${filter}`;
|
||||
return posts({ url, signal, cheerio });
|
||||
});
|
||||
};
|
||||
exports.getPosts = getPosts;
|
||||
const getSearchPosts = function (_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ searchQuery, page, signal, providerContext, }) {
|
||||
const { getBaseUrl, cheerio } = providerContext;
|
||||
const baseUrl = yield getBaseUrl("moviezwap");
|
||||
const url = `${baseUrl}/search.php?q=${encodeURIComponent(searchQuery)}`;
|
||||
return posts({ url, signal, cheerio });
|
||||
});
|
||||
};
|
||||
exports.getSearchPosts = getSearchPosts;
|
||||
function posts(_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ url, signal, cheerio, }) {
|
||||
try {
|
||||
const res = yield fetch(url, { signal });
|
||||
const data = yield res.text();
|
||||
const $ = cheerio.load(data);
|
||||
const catalog = [];
|
||||
$('a[href^="/movie/"]').each((i, el) => {
|
||||
const title = $(el).text().trim();
|
||||
const link = $(el).attr("href");
|
||||
const image = "";
|
||||
if (title && link) {
|
||||
catalog.push({
|
||||
title: title,
|
||||
link: link,
|
||||
image: image,
|
||||
});
|
||||
}
|
||||
});
|
||||
return catalog;
|
||||
}
|
||||
catch (err) {
|
||||
console.error("moviezwapGetPosts error ", err);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
}
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,r,o){return new(r||(r=Promise))(function(n,i){function s(t){try{c(o.next(t))}catch(t){i(t)}}function a(t){try{c(o.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?n(t.value):(e=t.value,e instanceof r?e:new r(function(t){t(e)})).then(s,a)}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,page:e,signal:r,providerContext:o}){const{getBaseUrl:n,cheerio:i}=o;return posts({url:`${yield n("moviezwap")}${t}`,signal:r,cheerio:i})})};exports.getPosts=getPosts;const getSearchPosts=function(t){return __awaiter(this,arguments,void 0,function*({searchQuery:t,page:e,signal:r,providerContext:o}){const{getBaseUrl:n,cheerio:i}=o;return posts({url:`${yield n("moviezwap")}/search.php?q=${encodeURIComponent(t)}`,signal:r,cheerio:i})})};function posts(t){return __awaiter(this,arguments,void 0,function*({url:t,signal:e,cheerio:r}){try{const o=yield fetch(t,{signal:e}),n=yield o.text(),i=r.load(n),s=[];return i('a[href^="/movie/"]').each((t,e)=>{const r=i(e).text().trim(),o=i(e).attr("href");r&&o&&s.push({title:r,link:o,image:""})}),s}catch(t){return[]}})}exports.getSearchPosts=getSearchPosts;
|
||||
36
dist/moviezwap/stream.js
vendored
36
dist/moviezwap/stream.js
vendored
@@ -1,35 +1 @@
|
||||
"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 = getStream;
|
||||
function getStream(_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ link, signal, providerContext, }) {
|
||||
const { axios, cheerio, commonHeaders: headers } = providerContext;
|
||||
const res = yield axios.get(link, { headers, signal });
|
||||
const html = res.data;
|
||||
const $ = cheerio.load(html);
|
||||
const Streams = [];
|
||||
// Find the actual .mp4 download link
|
||||
let downloadLink = null;
|
||||
$('a:contains("Fast Download Server")').each((i, el) => {
|
||||
const href = $(el).attr("href");
|
||||
if (href && href.toLocaleLowerCase().includes(".mp4")) {
|
||||
Streams.push({
|
||||
link: href,
|
||||
type: "mp4",
|
||||
server: "Fast Download",
|
||||
headers: headers,
|
||||
});
|
||||
}
|
||||
});
|
||||
return Streams;
|
||||
});
|
||||
}
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))(function(r,o){function i(e){try{c(a.next(e))}catch(e){o(e)}}function s(e){try{c(a.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(i,s)}c((a=a.apply(e,t||[])).next())})};function getStream(e){return __awaiter(this,arguments,void 0,function*({link:e,signal:t,providerContext:n}){const{axios:a,cheerio:r,commonHeaders:o}=n,i=(yield a.get(e,{headers:o,signal:t})).data,s=r.load(i),c=[];return s('a:contains("Fast Download Server")').each((e,t)=>{const n=s(t).attr("href");n&&n.toLocaleLowerCase().includes(".mp4")&&c.push({link:n,type:"mp4",server:"Fast Download",headers:o})}),c})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.getStream=getStream;
|
||||
80
dist/multi/catalog.js
vendored
80
dist/multi/catalog.js
vendored
@@ -1,79 +1 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.genres = exports.catalog = void 0;
|
||||
exports.catalog = [
|
||||
{
|
||||
title: "Trending",
|
||||
filter: "/trending/",
|
||||
},
|
||||
{
|
||||
title: "Netflix",
|
||||
filter: "/genre/netflix/",
|
||||
},
|
||||
{
|
||||
title: "Amazon Prime",
|
||||
filter: "/genre/amazon-prime/",
|
||||
},
|
||||
{
|
||||
title: "Disney Hotstar",
|
||||
filter: "/genre/disney-hotstar/",
|
||||
},
|
||||
];
|
||||
exports.genres = [
|
||||
{
|
||||
title: "Action",
|
||||
filter: "/genre/action/",
|
||||
},
|
||||
{
|
||||
title: "Adventure",
|
||||
filter: "/genre/adventure/",
|
||||
},
|
||||
{
|
||||
title: "Animation",
|
||||
filter: "/genre/animation/",
|
||||
},
|
||||
{
|
||||
title: "Comedy",
|
||||
filter: "/genre/comedy/",
|
||||
},
|
||||
{
|
||||
title: "Crime",
|
||||
filter: "/genre/crime/",
|
||||
},
|
||||
{
|
||||
title: "Drama",
|
||||
filter: "/genre/drama/",
|
||||
},
|
||||
{
|
||||
title: "Family",
|
||||
filter: "/genre/family/",
|
||||
},
|
||||
{
|
||||
title: "Fantasy",
|
||||
filter: "/genre/fantasy/",
|
||||
},
|
||||
{
|
||||
title: "History",
|
||||
filter: "/genre/history/",
|
||||
},
|
||||
{
|
||||
title: "Horror",
|
||||
filter: "/genre/horror/",
|
||||
},
|
||||
{
|
||||
title: "Mystery",
|
||||
filter: "/genre/mystery/",
|
||||
},
|
||||
{
|
||||
title: "Romance",
|
||||
filter: "/genre/romance/",
|
||||
},
|
||||
{
|
||||
title: "Science Fiction",
|
||||
filter: "/genre/science-fiction/",
|
||||
},
|
||||
{
|
||||
title: "Thriller",
|
||||
filter: "/genre/thriller/",
|
||||
},
|
||||
];
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.genres=exports.catalog=void 0,exports.catalog=[{title:"Trending",filter:"/trending/"},{title:"Netflix",filter:"/genre/netflix/"},{title:"Amazon Prime",filter:"/genre/amazon-prime/"},{title:"Disney Hotstar",filter:"/genre/disney-hotstar/"}],exports.genres=[{title:"Action",filter:"/genre/action/"},{title:"Adventure",filter:"/genre/adventure/"},{title:"Animation",filter:"/genre/animation/"},{title:"Comedy",filter:"/genre/comedy/"},{title:"Crime",filter:"/genre/crime/"},{title:"Drama",filter:"/genre/drama/"},{title:"Family",filter:"/genre/family/"},{title:"Fantasy",filter:"/genre/fantasy/"},{title:"History",filter:"/genre/history/"},{title:"Horror",filter:"/genre/horror/"},{title:"Mystery",filter:"/genre/mystery/"},{title:"Romance",filter:"/genre/romance/"},{title:"Science Fiction",filter:"/genre/science-fiction/"},{title:"Thriller",filter:"/genre/thriller/"}];
|
||||
88
dist/multi/meta.js
vendored
88
dist/multi/meta.js
vendored
@@ -1,87 +1 @@
|
||||
"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, }) {
|
||||
try {
|
||||
const { axios, cheerio } = providerContext;
|
||||
const url = link;
|
||||
const res = yield axios.get(url);
|
||||
const data = res.data;
|
||||
const $ = cheerio.load(data);
|
||||
const type = url.includes("tvshows") ? "series" : "movie";
|
||||
const imdbId = "";
|
||||
const title = url.split("/")[4].replace(/-/g, " ");
|
||||
const image = $(".g-item").find("a").attr("href") || "";
|
||||
const synopsis = $(".wp-content").find("p").text() || "";
|
||||
// Links
|
||||
const links = [];
|
||||
if (type === "series") {
|
||||
$("#seasons")
|
||||
.children()
|
||||
.map((i, element) => {
|
||||
const title = $(element)
|
||||
.find(".title")
|
||||
.children()
|
||||
.remove()
|
||||
.end()
|
||||
.text();
|
||||
let episodesList = [];
|
||||
$(element)
|
||||
.find(".episodios")
|
||||
.children()
|
||||
.map((i, element) => {
|
||||
const title = "Episode" +
|
||||
$(element).find(".numerando").text().trim().split("-")[1];
|
||||
const link = $(element).find("a").attr("href");
|
||||
if (title && link) {
|
||||
episodesList.push({ title, link });
|
||||
}
|
||||
});
|
||||
if (title && episodesList.length > 0) {
|
||||
links.push({
|
||||
title,
|
||||
directLinks: episodesList,
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
links.push({
|
||||
title: title,
|
||||
directLinks: [{ title: title, link: url.slice(0, -1), type: "movie" }],
|
||||
});
|
||||
}
|
||||
// console.log('multi meta', links);
|
||||
return {
|
||||
title,
|
||||
synopsis,
|
||||
image,
|
||||
imdbId,
|
||||
type,
|
||||
linkList: links,
|
||||
};
|
||||
}
|
||||
catch (err) {
|
||||
console.error(err);
|
||||
return {
|
||||
title: "",
|
||||
synopsis: "",
|
||||
image: "",
|
||||
imdbId: "",
|
||||
type: "movie",
|
||||
linkList: [],
|
||||
};
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getMeta = getMeta;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,i,n){return new(i||(i=Promise))(function(s,r){function o(t){try{c(n.next(t))}catch(t){r(t)}}function a(t){try{c(n.throw(t))}catch(t){r(t)}}function c(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(o,a)}c((n=n.apply(t,e||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getMeta=void 0;const getMeta=function(t){return __awaiter(this,arguments,void 0,function*({link:t,providerContext:e}){try{const{axios:i,cheerio:n}=e,s=t,r=(yield i.get(s)).data,o=n.load(r),a=s.includes("tvshows")?"series":"movie",c="",d=s.split("/")[4].replace(/-/g," "),l=o(".g-item").find("a").attr("href")||"",p=o(".wp-content").find("p").text()||"",u=[];return"series"===a?o("#seasons").children().map((t,e)=>{const i=o(e).find(".title").children().remove().end().text();let n=[];o(e).find(".episodios").children().map((t,e)=>{const i="Episode"+o(e).find(".numerando").text().trim().split("-")[1],s=o(e).find("a").attr("href");i&&s&&n.push({title:i,link:s})}),i&&n.length>0&&u.push({title:i,directLinks:n})}):u.push({title:d,directLinks:[{title:d,link:s.slice(0,-1),type:"movie"}]}),{title:d,synopsis:p,image:l,imdbId:c,type:a,linkList:u}}catch(t){return{title:"",synopsis:"",image:"",imdbId:"",type:"movie",linkList:[]}}})};exports.getMeta=getMeta;
|
||||
61
dist/multi/posts.js
vendored
61
dist/multi/posts.js
vendored
@@ -1,60 +1 @@
|
||||
"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, page, signal, providerContext, }) {
|
||||
const { getBaseUrl, cheerio } = providerContext;
|
||||
const baseUrl = yield getBaseUrl("multi");
|
||||
const url = `${baseUrl + filter}page/${page}/`;
|
||||
return posts({ url, signal, cheerio });
|
||||
});
|
||||
};
|
||||
exports.getPosts = getPosts;
|
||||
const getSearchPosts = function (_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ searchQuery, signal, providerContext, }) {
|
||||
const { getBaseUrl, cheerio } = providerContext;
|
||||
const baseUrl = yield getBaseUrl("multi");
|
||||
const url = `${baseUrl}/?s=${searchQuery}`;
|
||||
return posts({ url, signal, cheerio });
|
||||
});
|
||||
};
|
||||
exports.getSearchPosts = getSearchPosts;
|
||||
function posts(_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ url, signal, cheerio, }) {
|
||||
try {
|
||||
const res = yield fetch(url, { signal });
|
||||
const data = yield res.text();
|
||||
const $ = cheerio.load(data);
|
||||
const catalog = [];
|
||||
$(".items.full")
|
||||
.children()
|
||||
.map((i, element) => {
|
||||
const title = $(element).find(".poster").find("img").attr("alt");
|
||||
const link = $(element).find(".poster").find("a").attr("href");
|
||||
const image = $(element).find(".poster").find("img").attr("data-src") ||
|
||||
$(element).find(".poster").find("img").attr("src");
|
||||
if (title && link && image) {
|
||||
catalog.push({
|
||||
title: title,
|
||||
link: link,
|
||||
image: image,
|
||||
});
|
||||
}
|
||||
});
|
||||
return catalog;
|
||||
}
|
||||
catch (err) {
|
||||
console.error("multiGetPosts error ", err);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
}
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,r,i){return new(r||(r=Promise))(function(n,s){function o(t){try{c(i.next(t))}catch(t){s(t)}}function a(t){try{c(i.throw(t))}catch(t){s(t)}}function c(t){var e;t.done?n(t.value):(e=t.value,e instanceof r?e:new r(function(t){t(e)})).then(o,a)}c((i=i.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,page:e,signal:r,providerContext:i}){const{getBaseUrl:n,cheerio:s}=i;return posts({url:`${(yield n("multi"))+t}page/${e}/`,signal:r,cheerio:s})})};exports.getPosts=getPosts;const getSearchPosts=function(t){return __awaiter(this,arguments,void 0,function*({searchQuery:t,signal:e,providerContext:r}){const{getBaseUrl:i,cheerio:n}=r;return posts({url:`${yield i("multi")}/?s=${t}`,signal:e,cheerio:n})})};function posts(t){return __awaiter(this,arguments,void 0,function*({url:t,signal:e,cheerio:r}){try{const i=yield fetch(t,{signal:e}),n=yield i.text(),s=r.load(n),o=[];return s(".items.full").children().map((t,e)=>{const r=s(e).find(".poster").find("img").attr("alt"),i=s(e).find(".poster").find("a").attr("href"),n=s(e).find(".poster").find("img").attr("data-src")||s(e).find(".poster").find("img").attr("src");r&&i&&n&&o.push({title:r,link:i,image:n})}),o}catch(t){return[]}})}exports.getSearchPosts=getSearchPosts;
|
||||
140
dist/multi/stream.js
vendored
140
dist/multi/stream.js
vendored
@@ -1,139 +1 @@
|
||||
"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: url, providerContext, }) {
|
||||
var _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
||||
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"',
|
||||
Referer: "https://multimovies.online/",
|
||||
"Sec-Fetch-User": "?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 {
|
||||
const res = yield axios.get(url, { headers });
|
||||
const html = res.data;
|
||||
const $ = cheerio.load(html);
|
||||
const streamLinks = [];
|
||||
const postId = $("#player-option-1").attr("data-post");
|
||||
const nume = $("#player-option-1").attr("data-nume");
|
||||
const typeValue = $("#player-option-1").attr("data-type");
|
||||
const baseUrl = url.split("/").slice(0, 3).join("/");
|
||||
console.log("baseUrl", baseUrl);
|
||||
const formData = new FormData();
|
||||
formData.append("action", "doo_player_ajax");
|
||||
formData.append("post", postId || "");
|
||||
formData.append("nume", nume || "");
|
||||
formData.append("type", typeValue || "");
|
||||
console.log("formData", formData);
|
||||
const playerRes = yield fetch(`${baseUrl}/wp-admin/admin-ajax.php`, {
|
||||
headers: headers,
|
||||
body: formData,
|
||||
method: "POST",
|
||||
});
|
||||
const playerData = yield playerRes.json();
|
||||
console.log("playerData", playerData);
|
||||
let ifameUrl = ((_c = (_b = playerData === null || playerData === void 0 ? void 0 : playerData.embed_url) === null || _b === void 0 ? void 0 : _b.match(/<iframe[^>]+src="([^"]+)"[^>]*>/i)) === null || _c === void 0 ? void 0 : _c[1]) ||
|
||||
(playerData === null || playerData === void 0 ? void 0 : playerData.embed_url);
|
||||
console.log("ifameUrl", ifameUrl);
|
||||
if (!ifameUrl.includes("multimovies")) {
|
||||
let playerBaseUrl = ifameUrl.split("/").slice(0, 3).join("/");
|
||||
const newPlayerBaseUrl = yield axios.head(playerBaseUrl, { headers });
|
||||
if (newPlayerBaseUrl) {
|
||||
playerBaseUrl = (_e = (_d = newPlayerBaseUrl.request) === null || _d === void 0 ? void 0 : _d.responseURL) === null || _e === void 0 ? void 0 : _e.split("/").slice(0, 3).join("/");
|
||||
}
|
||||
const playerId = ifameUrl.split("/").pop();
|
||||
const NewformData = new FormData();
|
||||
NewformData.append("sid", playerId);
|
||||
console.log("NewformData", playerBaseUrl + "/embedhelper.php", NewformData);
|
||||
const playerRes = yield fetch(`${playerBaseUrl}/embedhelper.php`, {
|
||||
headers: headers,
|
||||
body: NewformData,
|
||||
method: "POST",
|
||||
});
|
||||
const playerData = yield playerRes.json();
|
||||
// console.log('playerData', playerData);
|
||||
const siteUrl = (_f = playerData === null || playerData === void 0 ? void 0 : playerData.siteUrls) === null || _f === void 0 ? void 0 : _f.smwh;
|
||||
const siteId = ((_g = JSON.parse(atob(playerData === null || playerData === void 0 ? void 0 : playerData.mresult))) === null || _g === void 0 ? void 0 : _g.smwh) ||
|
||||
((_h = playerData === null || playerData === void 0 ? void 0 : playerData.mresult) === null || _h === void 0 ? void 0 : _h.smwh);
|
||||
const newIframeUrl = siteUrl + siteId;
|
||||
console.log("newIframeUrl", newIframeUrl);
|
||||
if (newIframeUrl) {
|
||||
ifameUrl = newIframeUrl;
|
||||
}
|
||||
}
|
||||
const iframeRes = yield axios.get(ifameUrl, {
|
||||
headers: Object.assign(Object.assign({}, headers), { Referer: url }),
|
||||
});
|
||||
const iframeData = iframeRes.data;
|
||||
// Step 1: Extract the function parameters and the encoded string
|
||||
var functionRegex = /eval\(function\((.*?)\)\{.*?return p\}.*?\('(.*?)'\.split/;
|
||||
var match = functionRegex.exec(iframeData);
|
||||
let p = "";
|
||||
if (match) {
|
||||
// var params = match[1].split(',').map(param => param.trim());
|
||||
var encodedString = match[2];
|
||||
// console.log('Parameters:', params);
|
||||
// console.log('Encoded String:', encodedString.split("',36,")[0], '🔥🔥');
|
||||
p = (_j = encodedString.split("',36,")) === null || _j === void 0 ? void 0 : _j[0].trim();
|
||||
let a = 36;
|
||||
let c = encodedString.split("',36,")[1].slice(2).split("|").length;
|
||||
let k = encodedString.split("',36,")[1].slice(2).split("|");
|
||||
while (c--) {
|
||||
if (k[c]) {
|
||||
var regex = new RegExp("\\b" + c.toString(a) + "\\b", "g");
|
||||
p = p.replace(regex, k[c]);
|
||||
}
|
||||
}
|
||||
// console.log('Decoded String:', p);
|
||||
}
|
||||
else {
|
||||
console.log("No match found");
|
||||
}
|
||||
const streamUrl = (_k = p === null || p === void 0 ? void 0 : p.match(/https?:\/\/[^"]+?\.m3u8[^"]*/)) === null || _k === void 0 ? void 0 : _k[0];
|
||||
const subtitles = [];
|
||||
const subtitleMatch = p === null || p === void 0 ? void 0 : p.match(/https:\/\/[^\s"]+\.vtt/g);
|
||||
// console.log('subtitleMatch', subtitleMatch);
|
||||
// console.log('streamUrl', streamUrl);
|
||||
if (subtitleMatch === null || subtitleMatch === void 0 ? void 0 : subtitleMatch.length) {
|
||||
subtitleMatch.forEach((sub) => {
|
||||
const lang = sub.match(/_([a-zA-Z]{3})\.vtt$/)[1];
|
||||
subtitles.push({
|
||||
language: lang,
|
||||
uri: sub,
|
||||
type: "text/vtt",
|
||||
title: lang,
|
||||
});
|
||||
});
|
||||
}
|
||||
console.log("streamUrl", streamUrl);
|
||||
console.log("newUrl", streamUrl === null || streamUrl === void 0 ? void 0 : streamUrl.replace(/&i=\d+,'\.4&/, "&i=0.4&"));
|
||||
if (streamUrl) {
|
||||
streamLinks.push({
|
||||
server: "Multi",
|
||||
link: streamUrl.replace(/&i=\d+,'\.4&/, "&i=0.4&"),
|
||||
type: "m3u8",
|
||||
subtitles: subtitles,
|
||||
});
|
||||
}
|
||||
return streamLinks;
|
||||
}
|
||||
catch (err) {
|
||||
console.error(err);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getStream = getStream;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))(function(n,l){function a(e){try{s(o.next(e))}catch(e){l(e)}}function r(e){try{s(o.throw(e))}catch(e){l(e)}}function s(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(a,r)}s((o=o.apply(e,t||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getStream=void 0;const getStream=function(e){return __awaiter(this,arguments,void 0,function*({link:e,providerContext:t}){var i,o,n,l,a,r,s,d,p;const{axios:c,cheerio:u}=t,v={"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"',Referer:"https://multimovies.online/","Sec-Fetch-User":"?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{const t=(yield c.get(e,{headers:v})).data,y=u.load(t),g=[],w=y("#player-option-1").attr("data-post"),b=y("#player-option-1").attr("data-nume"),_=y("#player-option-1").attr("data-type"),x=e.split("/").slice(0,3).join("/"),j=new FormData;j.append("action","doo_player_ajax"),j.append("post",w||""),j.append("nume",b||""),j.append("type",_||"");const S=yield fetch(`${x}/wp-admin/admin-ajax.php`,{headers:v,body:j,method:"POST"}),O=yield S.json();let M=(null===(o=null===(i=null==O?void 0:O.embed_url)||void 0===i?void 0:i.match(/<iframe[^>]+src="([^"]+)"[^>]*>/i))||void 0===o?void 0:o[1])||(null==O?void 0:O.embed_url);if(!M.includes("multimovies")){let e=M.split("/").slice(0,3).join("/");const t=yield c.head(e,{headers:v});t&&(e=null===(l=null===(n=t.request)||void 0===n?void 0:n.responseURL)||void 0===l?void 0:l.split("/").slice(0,3).join("/"));const i=M.split("/").pop(),o=new FormData;o.append("sid",i);const d=yield fetch(`${e}/embedhelper.php`,{headers:v,body:o,method:"POST"}),p=yield d.json(),u=null===(a=null==p?void 0:p.siteUrls)||void 0===a?void 0:a.smwh,h=u+((null===(r=JSON.parse(atob(null==p?void 0:p.mresult)))||void 0===r?void 0:r.smwh)||(null===(s=null==p?void 0:p.mresult)||void 0===s?void 0:s.smwh));h&&(M=h)}const k=(yield c.get(M,{headers:Object.assign(Object.assign({},v),{Referer:e})})).data;var h=/eval\(function\((.*?)\)\{.*?return p\}.*?\('(.*?)'\.split/.exec(k);let A="";if(h){var m=h[2];A=null===(d=m.split("',36,"))||void 0===d?void 0:d[0].trim();let e=36,t=m.split("',36,")[1].slice(2).split("|").length,i=m.split("',36,")[1].slice(2).split("|");for(;t--;)if(i[t]){var f=new RegExp("\\b"+t.toString(e)+"\\b","g");A=A.replace(f,i[t])}}const E=null===(p=null==A?void 0:A.match(/https?:\/\/[^"]+?\.m3u8[^"]*/))||void 0===p?void 0:p[0],P=[],R=null==A?void 0:A.match(/https:\/\/[^\s"]+\.vtt/g);return(null==R?void 0:R.length)&&R.forEach(e=>{const t=e.match(/_([a-zA-Z]{3})\.vtt$/)[1];P.push({language:t,uri:e,type:"text/vtt",title:t})}),E&&g.push({server:"Multi",link:E.replace(/&i=\d+,'\.4&/,"&i=0.4&"),type:"m3u8",subtitles:P}),g}catch(e){return[]}})};exports.getStream=getStream;
|
||||
19
dist/netflixMirror/catalog.js
vendored
19
dist/netflixMirror/catalog.js
vendored
@@ -1,18 +1 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.genres = exports.catalog = void 0;
|
||||
exports.catalog = [
|
||||
{
|
||||
title: "Home",
|
||||
filter: "/mobile/home?app=1",
|
||||
},
|
||||
{
|
||||
title: "Series",
|
||||
filter: "/mobile/series",
|
||||
},
|
||||
{
|
||||
title: "Movies",
|
||||
filter: "/mobile/movies",
|
||||
},
|
||||
];
|
||||
exports.genres = [];
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.genres=exports.catalog=void 0,exports.catalog=[{title:"Home",filter:"/mobile/home?app=1"},{title:"Series",filter:"/mobile/series"},{title:"Movies",filter:"/mobile/movies"}],exports.genres=[];
|
||||
65
dist/netflixMirror/episodes.js
vendored
65
dist/netflixMirror/episodes.js
vendored
@@ -1,64 +1 @@
|
||||
"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.getEpisodes = void 0;
|
||||
const getEpisodes = function (_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ url: link, providerContext, }) {
|
||||
var _b;
|
||||
const { getBaseUrl, axios } = providerContext;
|
||||
let providerValue = "netflixMirror";
|
||||
try {
|
||||
const baseUrl = yield getBaseUrl("nfMirror");
|
||||
const url = `${baseUrl}${providerValue === "netflixMirror"
|
||||
? "/episodes.php?s="
|
||||
: "/pv/episodes.php?s="}` +
|
||||
link +
|
||||
"&t=" +
|
||||
Math.round(new Date().getTime() / 1000);
|
||||
console.log("nfEpisodesUrl", url);
|
||||
let page = 1;
|
||||
let hasMorePages = true;
|
||||
const episodeList = [];
|
||||
while (hasMorePages) {
|
||||
const res = yield axios.get(url + `&page=${page}`, {
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36",
|
||||
"Accept-Language": "en-US,en;q=0.9",
|
||||
},
|
||||
});
|
||||
const data = res.data;
|
||||
(_b = data === null || data === void 0 ? void 0 : data.episodes) === null || _b === void 0 ? void 0 : _b.map((episode) => {
|
||||
episodeList.push({
|
||||
title: "Episode " + (episode === null || episode === void 0 ? void 0 : episode.ep.replace("E", "")),
|
||||
link: episode === null || episode === void 0 ? void 0 : episode.id,
|
||||
});
|
||||
});
|
||||
if (data === null || data === void 0 ? void 0 : data.nextPageShow) {
|
||||
page++;
|
||||
}
|
||||
else {
|
||||
hasMorePages = false;
|
||||
}
|
||||
}
|
||||
return episodeList.sort((a, b) => {
|
||||
const aNum = parseInt(a.title.replace("Episode ", ""));
|
||||
const bNum = parseInt(b.title.replace("Episode ", ""));
|
||||
return aNum - bNum;
|
||||
});
|
||||
}
|
||||
catch (err) {
|
||||
console.error("nfGetEpisodes error", err);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getEpisodes = getEpisodes;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))(function(o,r){function s(e){try{p(i.next(e))}catch(e){r(e)}}function a(e){try{p(i.throw(e))}catch(e){r(e)}}function p(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}p((i=i.apply(e,t||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getEpisodes=void 0;const getEpisodes=function(e){return __awaiter(this,arguments,void 0,function*({url:e,providerContext:t}){var n;const{getBaseUrl:i,axios:o}=t;try{const t=`${yield i("nfMirror")}/episodes.php?s=`+e+"&t="+Math.round((new Date).getTime()/1e3);let r=1,s=!0;const a=[];for(;s;){const e=(yield o.get(t+`&page=${r}`,{headers:{"Content-Type":"application/json","User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36","Accept-Language":"en-US,en;q=0.9"}})).data;null===(n=null==e?void 0:e.episodes)||void 0===n||n.map(e=>{a.push({title:"Episode "+(null==e?void 0:e.ep.replace("E","")),link:null==e?void 0:e.id})}),(null==e?void 0:e.nextPageShow)?r++:s=!1}return a.sort((e,t)=>parseInt(e.title.replace("Episode ",""))-parseInt(t.title.replace("Episode ","")))}catch(e){return[]}})};exports.getEpisodes=getEpisodes;
|
||||
67
dist/netflixMirror/meta.js
vendored
67
dist/netflixMirror/meta.js
vendored
@@ -1,66 +1 @@
|
||||
"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, }) {
|
||||
var _b, _c, _d, _e;
|
||||
let providerValue = "netflixMirror";
|
||||
try {
|
||||
const isPrime = providerValue === "primeMirror" ? "isPrime=true" : "isPrime=false";
|
||||
const url = `https://netmirror.zendax.tech/api/net-proxy?${isPrime}&url=${encodeURIComponent(link)}`;
|
||||
console.log("nfifo", url);
|
||||
const res = yield fetch(url, {
|
||||
credentials: "omit",
|
||||
});
|
||||
const data = yield res.json();
|
||||
const id = (_b = link.split("id=")[1]) === null || _b === void 0 ? void 0 : _b.split("&")[0];
|
||||
const meta = {
|
||||
title: data.title,
|
||||
synopsis: data.desc,
|
||||
image: `https://img.nfmirrorcdn.top/poster/h/${id}.jpg`,
|
||||
cast: (_c = data === null || data === void 0 ? void 0 : data.short_cast) === null || _c === void 0 ? void 0 : _c.split(","),
|
||||
tags: [data === null || data === void 0 ? void 0 : data.year, data === null || data === void 0 ? void 0 : data.hdsd, ...(_d = data === null || data === void 0 ? void 0 : data.thismovieis) === null || _d === void 0 ? void 0 : _d.split(",")],
|
||||
imdbId: "",
|
||||
type: "series",
|
||||
};
|
||||
console.log("nfinfo", meta);
|
||||
const linkList = [];
|
||||
if (((_e = data === null || data === void 0 ? void 0 : data.season) === null || _e === void 0 ? void 0 : _e.length) > 0) {
|
||||
data.season.map((season) => {
|
||||
linkList.push({
|
||||
title: "Season " + (season === null || season === void 0 ? void 0 : season.s),
|
||||
episodesLink: season === null || season === void 0 ? void 0 : season.id,
|
||||
});
|
||||
});
|
||||
}
|
||||
else {
|
||||
linkList.push({
|
||||
title: meta.title,
|
||||
directLinks: [{ link: id, title: "Movie", type: "movie" }],
|
||||
});
|
||||
}
|
||||
return Object.assign(Object.assign({}, meta), { linkList: linkList });
|
||||
}
|
||||
catch (err) {
|
||||
console.error(err);
|
||||
return {
|
||||
title: "",
|
||||
synopsis: "",
|
||||
image: "",
|
||||
imdbId: "",
|
||||
type: "",
|
||||
linkList: [],
|
||||
};
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getMeta = getMeta;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(t,i,e,n){return new(e||(e=Promise))(function(s,o){function l(t){try{a(n.next(t))}catch(t){o(t)}}function r(t){try{a(n.throw(t))}catch(t){o(t)}}function a(t){var i;t.done?s(t.value):(i=t.value,i instanceof e?i:new e(function(t){t(i)})).then(l,r)}a((n=n.apply(t,i||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getMeta=void 0;const getMeta=function(t){return __awaiter(this,arguments,void 0,function*({link:t}){var i,e,n,s;try{const o=`https://netmirror.zendax.tech/api/net-proxy?${"isPrime=false"}&url=${encodeURIComponent(t)}`,l=yield fetch(o,{credentials:"omit"}),r=yield l.json(),a=null===(i=t.split("id=")[1])||void 0===i?void 0:i.split("&")[0],d={title:r.title,synopsis:r.desc,image:`https://img.nfmirrorcdn.top/poster/h/${a}.jpg`,cast:null===(e=null==r?void 0:r.short_cast)||void 0===e?void 0:e.split(","),tags:[null==r?void 0:r.year,null==r?void 0:r.hdsd,...null===(n=null==r?void 0:r.thismovieis)||void 0===n?void 0:n.split(",")],imdbId:"",type:"series"},u=[];return(null===(s=null==r?void 0:r.season)||void 0===s?void 0:s.length)>0?r.season.map(t=>{u.push({title:"Season "+(null==t?void 0:t.s),episodesLink:null==t?void 0:t.id})}):u.push({title:d.title,directLinks:[{link:a,title:"Movie",type:"movie"}]}),Object.assign(Object.assign({},d),{linkList:u})}catch(t){return{title:"",synopsis:"",image:"",imdbId:"",type:"",linkList:[]}}})};exports.getMeta=getMeta;
|
||||
109
dist/netflixMirror/posts.js
vendored
109
dist/netflixMirror/posts.js
vendored
@@ -1,108 +1 @@
|
||||
"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, page, providerValue, signal, providerContext, }) {
|
||||
try {
|
||||
const { getBaseUrl, cheerio } = providerContext;
|
||||
const baseUrl = yield getBaseUrl("nfMirror");
|
||||
const catalog = [];
|
||||
if (page > 1) {
|
||||
return [];
|
||||
}
|
||||
// console.log(filter);
|
||||
const isPrime = providerValue === "primeMirror" ? "isPrime=true" : "isPrime=false";
|
||||
const url = `https://netmirror.zendax.tech/api/net-proxy?${isPrime}&url=${baseUrl + filter}`;
|
||||
const res = yield fetch(url, {
|
||||
signal: signal,
|
||||
method: "GET",
|
||||
credentials: "omit",
|
||||
});
|
||||
const data = yield res.text();
|
||||
// console.log('nfPost', data);
|
||||
const $ = cheerio.load(data);
|
||||
$("a.post-data").map((i, element) => {
|
||||
const title = "";
|
||||
const id = $(element).attr("data-post");
|
||||
// console.log('id', id);
|
||||
const image = $(element).find("img").attr("data-src") || "";
|
||||
if (id) {
|
||||
catalog.push({
|
||||
title: title,
|
||||
link: baseUrl +
|
||||
`${providerValue === "netflixMirror"
|
||||
? "/post.php?id="
|
||||
: "/pv/post.php?id="}` +
|
||||
id +
|
||||
"&t=" +
|
||||
Math.round(new Date().getTime() / 1000),
|
||||
image: image,
|
||||
});
|
||||
}
|
||||
});
|
||||
// console.log(catalog);
|
||||
return catalog;
|
||||
}
|
||||
catch (err) {
|
||||
console.error("nf error ", err);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getPosts = getPosts;
|
||||
const getSearchPosts = function (_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ searchQuery, page, providerValue, signal, providerContext, }) {
|
||||
var _b;
|
||||
const { getBaseUrl } = providerContext;
|
||||
try {
|
||||
if (page > 1) {
|
||||
return [];
|
||||
}
|
||||
const catalog = [];
|
||||
const baseUrl = yield getBaseUrl("nfMirror");
|
||||
const isPrime = providerValue === "primeMirror" ? "isPrime=true" : "isPrime=false";
|
||||
const url = `https://netmirror.zendax.tech/api/net-proxy?${isPrime}&url=${baseUrl}${providerValue === "netflixMirror" ? "" : "/pv"}/search.php?s=${encodeURI(searchQuery)}`;
|
||||
const res = yield fetch(url, {
|
||||
signal: signal,
|
||||
method: "GET",
|
||||
credentials: "omit",
|
||||
});
|
||||
const data = yield res.json();
|
||||
(_b = data === null || data === void 0 ? void 0 : data.searchResult) === null || _b === void 0 ? void 0 : _b.forEach((result) => {
|
||||
const title = (result === null || result === void 0 ? void 0 : result.t) || "";
|
||||
const id = result === null || result === void 0 ? void 0 : result.id;
|
||||
const image = providerValue === "netflixMirror"
|
||||
? `https://imgcdn.media/poster/v/${id}.jpg`
|
||||
: "";
|
||||
if (id) {
|
||||
catalog.push({
|
||||
title: title,
|
||||
link: baseUrl +
|
||||
`${providerValue === "netflixMirror"
|
||||
? "/mobile/post.php?id="
|
||||
: "/mobile/pv/post.php?id="}` +
|
||||
id +
|
||||
"&t=" +
|
||||
Math.round(new Date().getTime() / 1000),
|
||||
image: image,
|
||||
});
|
||||
}
|
||||
});
|
||||
return catalog;
|
||||
}
|
||||
catch (err) {
|
||||
console.error("Search error:", err);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getSearchPosts = getSearchPosts;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,r,i){return new(r||(r=Promise))(function(o,n){function s(t){try{c(i.next(t))}catch(t){n(t)}}function a(t){try{c(i.throw(t))}catch(t){n(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r(function(t){t(e)})).then(s,a)}c((i=i.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,page:e,providerValue:r,signal:i,providerContext:o}){try{const{getBaseUrl:n,cheerio:s}=o,a=yield n("nfMirror"),c=[];if(e>1)return[];const p=`https://netmirror.zendax.tech/api/net-proxy?${"primeMirror"===r?"isPrime=true":"isPrime=false"}&url=${a+t}`,l=yield fetch(p,{signal:i,method:"GET",credentials:"omit"}),d=yield l.text(),u=s.load(d);return u("a.post-data").map((t,e)=>{const i=u(e).attr("data-post"),o=u(e).find("img").attr("data-src")||"";i&&c.push({title:"",link:a+""+("netflixMirror"===r?"/post.php?id=":"/pv/post.php?id=")+i+"&t="+Math.round((new Date).getTime()/1e3),image:o})}),c}catch(t){return[]}})};exports.getPosts=getPosts;const getSearchPosts=function(t){return __awaiter(this,arguments,void 0,function*({searchQuery:t,page:e,providerValue:r,signal:i,providerContext:o}){var n;const{getBaseUrl:s}=o;try{if(e>1)return[];const o=[],a=yield s("nfMirror"),c=`https://netmirror.zendax.tech/api/net-proxy?${"primeMirror"===r?"isPrime=true":"isPrime=false"}&url=${a}${"netflixMirror"===r?"":"/pv"}/search.php?s=${encodeURI(t)}`,p=yield fetch(c,{signal:i,method:"GET",credentials:"omit"}),l=yield p.json();return null===(n=null==l?void 0:l.searchResult)||void 0===n||n.forEach(t=>{const e=(null==t?void 0:t.t)||"",i=null==t?void 0:t.id,n="netflixMirror"===r?`https://imgcdn.media/poster/v/${i}.jpg`:"";i&&o.push({title:e,link:a+""+("netflixMirror"===r?"/mobile/post.php?id=":"/mobile/pv/post.php?id=")+i+"&t="+Math.round((new Date).getTime()/1e3),image:n})}),o}catch(t){return[]}})};exports.getSearchPosts=getSearchPosts;
|
||||
50
dist/netflixMirror/stream.js
vendored
50
dist/netflixMirror/stream.js
vendored
@@ -1,49 +1 @@
|
||||
"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 = (_a) => __awaiter(void 0, [_a], void 0, function* ({ link: id, providerContext, }) {
|
||||
const { getBaseUrl } = providerContext;
|
||||
try {
|
||||
let providerValue = "netflixMirror";
|
||||
const baseUrl = "https://netfree2.cc";
|
||||
const url = `https://netmirror.zendax.tech/api/net-proxy?url=${baseUrl}${providerValue === "netflixMirror"
|
||||
? "/mobile/playlist.php?id="
|
||||
: "/pv/playlist.php?id="}${id}&t=${Math.round(new Date().getTime() / 1000)}`;
|
||||
console.log("nfGetStream, url:", url);
|
||||
const res = yield fetch(url, {
|
||||
credentials: "omit",
|
||||
});
|
||||
const resJson = yield res.json();
|
||||
const data = resJson === null || resJson === void 0 ? void 0 : resJson[0];
|
||||
const streamLinks = [];
|
||||
data === null || data === void 0 ? void 0 : data.sources.forEach((source) => {
|
||||
var _a;
|
||||
streamLinks.push({
|
||||
server: source.label,
|
||||
link: (_a = source.file) === null || _a === void 0 ? void 0 : _a.replace(":su", ":ni"),
|
||||
type: "m3u8",
|
||||
headers: {
|
||||
Referer: baseUrl,
|
||||
origin: baseUrl,
|
||||
Cookie: "hd=on",
|
||||
},
|
||||
});
|
||||
});
|
||||
console.log(streamLinks);
|
||||
return streamLinks;
|
||||
}
|
||||
catch (err) {
|
||||
console.error(err);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
exports.getStream = getStream;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{c(n.next(e))}catch(e){o(e)}}function l(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,l)}c((n=n.apply(e,t||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getStream=void 0;const getStream=e=>__awaiter(void 0,[e],void 0,function*({link:e,providerContext:t}){const{getBaseUrl:r}=t;try{const t="https://netfree2.cc",r=`https://netmirror.zendax.tech/api/net-proxy?url=${t}${"netflixMirror"==="netflixMirror"?"/mobile/playlist.php?id=":"/pv/playlist.php?id="}${e}&t=${Math.round((new Date).getTime()/1e3)}`,n=yield fetch(r,{credentials:"omit"}),i=yield n.json(),o=null==i?void 0:i[0],a=[];return null==o||o.sources.forEach(e=>{var r;a.push({server:e.label,link:null===(r=e.file)||void 0===r?void 0:r.replace(":su",":ni"),type:"m3u8",headers:{Referer:t,origin:t,Cookie:"hd=on"}})}),a}catch(e){return[]}});exports.getStream=getStream;
|
||||
19
dist/primeMirror/catalog.js
vendored
19
dist/primeMirror/catalog.js
vendored
@@ -1,18 +1 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.genres = exports.catalog = void 0;
|
||||
exports.catalog = [
|
||||
{
|
||||
title: "Home",
|
||||
filter: "/mobile/home?app=1",
|
||||
},
|
||||
{
|
||||
title: "Series",
|
||||
filter: "/mobile/series",
|
||||
},
|
||||
{
|
||||
title: "Movies",
|
||||
filter: "/mobile/movies",
|
||||
},
|
||||
];
|
||||
exports.genres = [];
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.genres=exports.catalog=void 0,exports.catalog=[{title:"Home",filter:"/mobile/home?app=1"},{title:"Series",filter:"/mobile/series"},{title:"Movies",filter:"/mobile/movies"}],exports.genres=[];
|
||||
63
dist/primeMirror/episodes.js
vendored
63
dist/primeMirror/episodes.js
vendored
@@ -1,62 +1 @@
|
||||
"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.getEpisodes = void 0;
|
||||
const getEpisodes = function (_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ url: link, providerContext, }) {
|
||||
var _b;
|
||||
const { getBaseUrl, axios } = providerContext;
|
||||
let providerValue = "netflixMirror";
|
||||
try {
|
||||
const baseUrl = yield getBaseUrl("nfMirror");
|
||||
const url = `${baseUrl}${"/pv/episodes.php?s="}` +
|
||||
link +
|
||||
"&t=" +
|
||||
Math.round(new Date().getTime() / 1000);
|
||||
console.log("nfEpisodesUrl", url);
|
||||
let page = 1;
|
||||
let hasMorePages = true;
|
||||
const episodeList = [];
|
||||
while (hasMorePages) {
|
||||
const res = yield axios.get(url + `&page=${page}`, {
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36",
|
||||
"Accept-Language": "en-US,en;q=0.9",
|
||||
},
|
||||
});
|
||||
const data = res.data;
|
||||
(_b = data === null || data === void 0 ? void 0 : data.episodes) === null || _b === void 0 ? void 0 : _b.map((episode) => {
|
||||
episodeList.push({
|
||||
title: "Episode " + (episode === null || episode === void 0 ? void 0 : episode.ep.replace("E", "")),
|
||||
link: episode === null || episode === void 0 ? void 0 : episode.id,
|
||||
});
|
||||
});
|
||||
if (data === null || data === void 0 ? void 0 : data.nextPageShow) {
|
||||
page++;
|
||||
}
|
||||
else {
|
||||
hasMorePages = false;
|
||||
}
|
||||
}
|
||||
return episodeList.sort((a, b) => {
|
||||
const aNum = parseInt(a.title.replace("Episode ", ""));
|
||||
const bNum = parseInt(b.title.replace("Episode ", ""));
|
||||
return aNum - bNum;
|
||||
});
|
||||
}
|
||||
catch (err) {
|
||||
console.error("nfGetEpisodes error", err);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getEpisodes = getEpisodes;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))(function(o,r){function s(e){try{p(i.next(e))}catch(e){r(e)}}function a(e){try{p(i.throw(e))}catch(e){r(e)}}function p(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}p((i=i.apply(e,t||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getEpisodes=void 0;const getEpisodes=function(e){return __awaiter(this,arguments,void 0,function*({url:e,providerContext:t}){var n;const{getBaseUrl:i,axios:o}=t;try{const t=`${yield i("nfMirror")}/pv/episodes.php?s=`+e+"&t="+Math.round((new Date).getTime()/1e3);let r=1,s=!0;const a=[];for(;s;){const e=(yield o.get(t+`&page=${r}`,{headers:{"Content-Type":"application/json","User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36","Accept-Language":"en-US,en;q=0.9"}})).data;null===(n=null==e?void 0:e.episodes)||void 0===n||n.map(e=>{a.push({title:"Episode "+(null==e?void 0:e.ep.replace("E","")),link:null==e?void 0:e.id})}),(null==e?void 0:e.nextPageShow)?r++:s=!1}return a.sort((e,t)=>parseInt(e.title.replace("Episode ",""))-parseInt(t.title.replace("Episode ","")))}catch(e){return[]}})};exports.getEpisodes=getEpisodes;
|
||||
67
dist/primeMirror/meta.js
vendored
67
dist/primeMirror/meta.js
vendored
@@ -1,66 +1 @@
|
||||
"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, }) {
|
||||
var _b, _c, _d, _e;
|
||||
let providerValue = "primeMirror";
|
||||
try {
|
||||
const isPrime = providerValue === "primeMirror" ? "isPrime=true" : "isPrime=false";
|
||||
const url = `https://netmirror.zendax.tech/api/net-proxy?${isPrime}&url=${encodeURIComponent(link)}`;
|
||||
console.log("nfifo", url);
|
||||
const res = yield fetch(url, {
|
||||
credentials: "omit",
|
||||
});
|
||||
const data = yield res.json();
|
||||
const id = (_b = link.split("id=")[1]) === null || _b === void 0 ? void 0 : _b.split("&")[0];
|
||||
const meta = {
|
||||
title: data.title,
|
||||
synopsis: data.desc,
|
||||
image: `https://img.nfmirrorcdn.top/poster/h/${id}.jpg`,
|
||||
cast: (_c = data === null || data === void 0 ? void 0 : data.short_cast) === null || _c === void 0 ? void 0 : _c.split(","),
|
||||
tags: [data === null || data === void 0 ? void 0 : data.year, data === null || data === void 0 ? void 0 : data.hdsd, ...(_d = data === null || data === void 0 ? void 0 : data.thismovieis) === null || _d === void 0 ? void 0 : _d.split(",")],
|
||||
imdbId: "",
|
||||
type: "series",
|
||||
};
|
||||
console.log("nfinfo", meta);
|
||||
const linkList = [];
|
||||
if (((_e = data === null || data === void 0 ? void 0 : data.season) === null || _e === void 0 ? void 0 : _e.length) > 0) {
|
||||
data.season.map((season) => {
|
||||
linkList.push({
|
||||
title: "Season " + (season === null || season === void 0 ? void 0 : season.s),
|
||||
episodesLink: season === null || season === void 0 ? void 0 : season.id,
|
||||
});
|
||||
});
|
||||
}
|
||||
else {
|
||||
linkList.push({
|
||||
title: meta.title,
|
||||
directLinks: [{ link: id, title: "Movie", type: "movie" }],
|
||||
});
|
||||
}
|
||||
return Object.assign(Object.assign({}, meta), { linkList: linkList });
|
||||
}
|
||||
catch (err) {
|
||||
console.error(err);
|
||||
return {
|
||||
title: "",
|
||||
synopsis: "",
|
||||
image: "",
|
||||
imdbId: "",
|
||||
type: "",
|
||||
linkList: [],
|
||||
};
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getMeta = getMeta;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(t,i,e,n){return new(e||(e=Promise))(function(o,s){function l(t){try{d(n.next(t))}catch(t){s(t)}}function r(t){try{d(n.throw(t))}catch(t){s(t)}}function d(t){var i;t.done?o(t.value):(i=t.value,i instanceof e?i:new e(function(t){t(i)})).then(l,r)}d((n=n.apply(t,i||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getMeta=void 0;const getMeta=function(t){return __awaiter(this,arguments,void 0,function*({link:t}){var i,e,n,o;try{const s=`https://netmirror.zendax.tech/api/net-proxy?${"isPrime=true"}&url=${encodeURIComponent(t)}`,l=yield fetch(s,{credentials:"omit"}),r=yield l.json(),d=null===(i=t.split("id=")[1])||void 0===i?void 0:i.split("&")[0],a={title:r.title,synopsis:r.desc,image:`https://img.nfmirrorcdn.top/poster/h/${d}.jpg`,cast:null===(e=null==r?void 0:r.short_cast)||void 0===e?void 0:e.split(","),tags:[null==r?void 0:r.year,null==r?void 0:r.hdsd,...null===(n=null==r?void 0:r.thismovieis)||void 0===n?void 0:n.split(",")],imdbId:"",type:"series"},u=[];return(null===(o=null==r?void 0:r.season)||void 0===o?void 0:o.length)>0?r.season.map(t=>{u.push({title:"Season "+(null==t?void 0:t.s),episodesLink:null==t?void 0:t.id})}):u.push({title:a.title,directLinks:[{link:d,title:"Movie",type:"movie"}]}),Object.assign(Object.assign({},a),{linkList:u})}catch(t){return{title:"",synopsis:"",image:"",imdbId:"",type:"",linkList:[]}}})};exports.getMeta=getMeta;
|
||||
109
dist/primeMirror/posts.js
vendored
109
dist/primeMirror/posts.js
vendored
@@ -1,108 +1 @@
|
||||
"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, page, providerValue, signal, providerContext, }) {
|
||||
try {
|
||||
const { getBaseUrl, cheerio } = providerContext;
|
||||
const baseUrl = yield getBaseUrl("nfMirror");
|
||||
const catalog = [];
|
||||
if (page > 1) {
|
||||
return [];
|
||||
}
|
||||
// console.log(filter);
|
||||
const isPrime = providerValue === "primeMirror" ? "isPrime=true" : "isPrime=false";
|
||||
const url = `https://netmirror.zendax.tech/api/net-proxy?${isPrime}&url=${baseUrl + filter}`;
|
||||
const res = yield fetch(url, {
|
||||
signal: signal,
|
||||
method: "GET",
|
||||
credentials: "omit",
|
||||
});
|
||||
const data = yield res.text();
|
||||
// console.log('nfPost', data);
|
||||
const $ = cheerio.load(data);
|
||||
$("a.post-data").map((i, element) => {
|
||||
const title = "";
|
||||
const id = $(element).attr("data-post");
|
||||
// console.log('id', id);
|
||||
const image = $(element).find("img").attr("data-src") || "";
|
||||
if (id) {
|
||||
catalog.push({
|
||||
title: title,
|
||||
link: baseUrl +
|
||||
`${providerValue === "netflixMirror"
|
||||
? "/post.php?id="
|
||||
: "/pv/post.php?id="}` +
|
||||
id +
|
||||
"&t=" +
|
||||
Math.round(new Date().getTime() / 1000),
|
||||
image: image,
|
||||
});
|
||||
}
|
||||
});
|
||||
// console.log(catalog);
|
||||
return catalog;
|
||||
}
|
||||
catch (err) {
|
||||
console.error("nf error ", err);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getPosts = getPosts;
|
||||
const getSearchPosts = function (_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ searchQuery, page, providerValue, signal, providerContext, }) {
|
||||
var _b;
|
||||
const { getBaseUrl } = providerContext;
|
||||
try {
|
||||
if (page > 1) {
|
||||
return [];
|
||||
}
|
||||
const catalog = [];
|
||||
const baseUrl = yield getBaseUrl("nfMirror");
|
||||
const isPrime = providerValue === "primeMirror" ? "isPrime=true" : "isPrime=false";
|
||||
const url = `https://netmirror.zendax.tech/api/net-proxy?${isPrime}&url=${baseUrl}${providerValue === "netflixMirror" ? "" : "/pv"}/search.php?s=${encodeURI(searchQuery)}`;
|
||||
const res = yield fetch(url, {
|
||||
signal: signal,
|
||||
method: "GET",
|
||||
credentials: "omit",
|
||||
});
|
||||
const data = yield res.json();
|
||||
(_b = data === null || data === void 0 ? void 0 : data.searchResult) === null || _b === void 0 ? void 0 : _b.forEach((result) => {
|
||||
const title = (result === null || result === void 0 ? void 0 : result.t) || "";
|
||||
const id = result === null || result === void 0 ? void 0 : result.id;
|
||||
const image = providerValue === "netflixMirror"
|
||||
? `https://imgcdn.media/poster/v/${id}.jpg`
|
||||
: `https://imgcdn.media/pv/341/${id}.jpg`;
|
||||
if (id) {
|
||||
catalog.push({
|
||||
title: title,
|
||||
link: baseUrl +
|
||||
`${providerValue === "netflixMirror"
|
||||
? "/mobile/post.php?id="
|
||||
: "/mobile/pv/post.php?id="}` +
|
||||
id +
|
||||
"&t=" +
|
||||
Math.round(new Date().getTime() / 1000),
|
||||
image: image,
|
||||
});
|
||||
}
|
||||
});
|
||||
return catalog;
|
||||
}
|
||||
catch (err) {
|
||||
console.error("Search error:", err);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getSearchPosts = getSearchPosts;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,r,i){return new(r||(r=Promise))(function(o,n){function s(t){try{p(i.next(t))}catch(t){n(t)}}function a(t){try{p(i.throw(t))}catch(t){n(t)}}function p(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r(function(t){t(e)})).then(s,a)}p((i=i.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,page:e,providerValue:r,signal:i,providerContext:o}){try{const{getBaseUrl:n,cheerio:s}=o,a=yield n("nfMirror"),p=[];if(e>1)return[];const c=`https://netmirror.zendax.tech/api/net-proxy?${"primeMirror"===r?"isPrime=true":"isPrime=false"}&url=${a+t}`,l=yield fetch(c,{signal:i,method:"GET",credentials:"omit"}),d=yield l.text(),u=s.load(d);return u("a.post-data").map((t,e)=>{const i=u(e).attr("data-post"),o=u(e).find("img").attr("data-src")||"";i&&p.push({title:"",link:a+""+("netflixMirror"===r?"/post.php?id=":"/pv/post.php?id=")+i+"&t="+Math.round((new Date).getTime()/1e3),image:o})}),p}catch(t){return[]}})};exports.getPosts=getPosts;const getSearchPosts=function(t){return __awaiter(this,arguments,void 0,function*({searchQuery:t,page:e,providerValue:r,signal:i,providerContext:o}){var n;const{getBaseUrl:s}=o;try{if(e>1)return[];const o=[],a=yield s("nfMirror"),p=`https://netmirror.zendax.tech/api/net-proxy?${"primeMirror"===r?"isPrime=true":"isPrime=false"}&url=${a}${"netflixMirror"===r?"":"/pv"}/search.php?s=${encodeURI(t)}`,c=yield fetch(p,{signal:i,method:"GET",credentials:"omit"}),l=yield c.json();return null===(n=null==l?void 0:l.searchResult)||void 0===n||n.forEach(t=>{const e=(null==t?void 0:t.t)||"",i=null==t?void 0:t.id,n="netflixMirror"===r?`https://imgcdn.media/poster/v/${i}.jpg`:`https://imgcdn.media/pv/341/${i}.jpg`;i&&o.push({title:e,link:a+""+("netflixMirror"===r?"/mobile/post.php?id=":"/mobile/pv/post.php?id=")+i+"&t="+Math.round((new Date).getTime()/1e3),image:n})}),o}catch(t){return[]}})};exports.getSearchPosts=getSearchPosts;
|
||||
50
dist/primeMirror/stream.js
vendored
50
dist/primeMirror/stream.js
vendored
@@ -1,49 +1 @@
|
||||
"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 = (_a) => __awaiter(void 0, [_a], void 0, function* ({ link: id, providerContext, }) {
|
||||
const { getBaseUrl } = providerContext;
|
||||
try {
|
||||
let providerValue = "primeMirror";
|
||||
const baseUrl = "https://netfree2.cc";
|
||||
const url = `https://netmirror.zendax.tech/api/net-proxy?url=${baseUrl}${providerValue === "netflixMirror"
|
||||
? "/mobile/playlist.php?id="
|
||||
: "/pv/playlist.php?id="}${id}&t=${Math.round(new Date().getTime() / 1000)}`;
|
||||
console.log("nfGetStream, url:", url);
|
||||
const res = yield fetch(url, {
|
||||
credentials: "omit",
|
||||
});
|
||||
const resJson = yield res.json();
|
||||
const data = resJson === null || resJson === void 0 ? void 0 : resJson[0];
|
||||
const streamLinks = [];
|
||||
data === null || data === void 0 ? void 0 : data.sources.forEach((source) => {
|
||||
var _a;
|
||||
streamLinks.push({
|
||||
server: source.label,
|
||||
link: (_a = (baseUrl + source.file)) === null || _a === void 0 ? void 0 : _a.replace(":su", ":ni"),
|
||||
type: "m3u8",
|
||||
headers: {
|
||||
Referer: baseUrl,
|
||||
origin: baseUrl,
|
||||
Cookie: "hd=on",
|
||||
},
|
||||
});
|
||||
});
|
||||
console.log(streamLinks);
|
||||
return streamLinks;
|
||||
}
|
||||
catch (err) {
|
||||
console.error(err);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
exports.getStream = getStream;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{c(n.next(e))}catch(e){o(e)}}function l(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,l)}c((n=n.apply(e,t||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getStream=void 0;const getStream=e=>__awaiter(void 0,[e],void 0,function*({link:e,providerContext:t}){const{getBaseUrl:r}=t;try{const t="https://netfree2.cc",r=`https://netmirror.zendax.tech/api/net-proxy?url=${t}${"netflixMirror"==="primeMirror"?"/mobile/playlist.php?id=":"/pv/playlist.php?id="}${e}&t=${Math.round((new Date).getTime()/1e3)}`,n=yield fetch(r,{credentials:"omit"}),i=yield n.json(),o=null==i?void 0:i[0],a=[];return null==o||o.sources.forEach(e=>{var r;a.push({server:e.label,link:null===(r=t+e.file)||void 0===r?void 0:r.replace(":su",":ni"),type:"m3u8",headers:{Referer:t,origin:t,Cookie:"hd=on"}})}),a}catch(e){return[]}});exports.getStream=getStream;
|
||||
19
dist/primewire/catalog.js
vendored
19
dist/primewire/catalog.js
vendored
@@ -1,18 +1 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.genres = exports.catalog = void 0;
|
||||
exports.catalog = [
|
||||
{
|
||||
title: "Recently Added",
|
||||
filter: "/filter?sort=Just+Added&free_links=true",
|
||||
},
|
||||
{
|
||||
title: "TV Shows",
|
||||
filter: "/filter?sort=Trending+Today&type=tv",
|
||||
},
|
||||
{
|
||||
title: "Movies",
|
||||
filter: "/filter?sort=Trending+Today&type=movie",
|
||||
},
|
||||
];
|
||||
exports.genres = [];
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.genres=exports.catalog=void 0,exports.catalog=[{title:"Recently Added",filter:"/filter?sort=Just+Added&free_links=true"},{title:"TV Shows",filter:"/filter?sort=Trending+Today&type=tv"},{title:"Movies",filter:"/filter?sort=Trending+Today&type=movie"}],exports.genres=[];
|
||||
90
dist/primewire/meta.js
vendored
90
dist/primewire/meta.js
vendored
@@ -1,89 +1 @@
|
||||
"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;
|
||||
try {
|
||||
const { axios, cheerio } = providerContext;
|
||||
const url = link;
|
||||
const baseUrl = link.split("/").slice(0, 3).join("/");
|
||||
const res = yield axios.get(url);
|
||||
const html = yield res.data;
|
||||
const $ = cheerio.load(html);
|
||||
const imdbId = ((_b = $(".movie_info")
|
||||
.find('a[href*="imdb.com/title/tt"]:not([href*="imdb.com/title/tt/"])')
|
||||
.attr("href")) === null || _b === void 0 ? void 0 : _b.split("/")[4]) || "";
|
||||
const type = $(".show_season").html() ? "series" : "movie";
|
||||
const linkList = [];
|
||||
$(".show_season").each((i, element) => {
|
||||
const seasonTitle = "Season " + $(element).attr("data-id");
|
||||
const episodes = [];
|
||||
$(element)
|
||||
.children()
|
||||
.each((i, element2) => {
|
||||
const episodeTitle = $(element2)
|
||||
.find("a")
|
||||
.children()
|
||||
.remove()
|
||||
.end()
|
||||
.text()
|
||||
.trim()
|
||||
.replace("E", "Epiosode ");
|
||||
const episodeLink = baseUrl + $(element2).find("a").attr("href");
|
||||
if (episodeTitle && episodeLink) {
|
||||
episodes.push({
|
||||
title: episodeTitle,
|
||||
link: episodeLink,
|
||||
});
|
||||
}
|
||||
});
|
||||
linkList.push({
|
||||
title: seasonTitle,
|
||||
directLinks: episodes,
|
||||
});
|
||||
});
|
||||
if (type === "movie") {
|
||||
linkList.push({
|
||||
title: "Movie",
|
||||
directLinks: [
|
||||
{
|
||||
link: link,
|
||||
title: "Movie",
|
||||
type: "movie",
|
||||
},
|
||||
],
|
||||
});
|
||||
}
|
||||
return {
|
||||
title: "",
|
||||
image: "",
|
||||
imdbId: imdbId,
|
||||
synopsis: "",
|
||||
type: type,
|
||||
linkList: linkList,
|
||||
};
|
||||
}
|
||||
catch (error) {
|
||||
console.error(error);
|
||||
return {
|
||||
title: "",
|
||||
image: "",
|
||||
imdbId: "",
|
||||
synopsis: "",
|
||||
linkList: [],
|
||||
type: "uhd",
|
||||
};
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getMeta = getMeta;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,i,n){return new(i||(i=Promise))(function(o,r){function s(t){try{c(n.next(t))}catch(t){r(t)}}function a(t){try{c(n.throw(t))}catch(t){r(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(s,a)}c((n=n.apply(t,e||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getMeta=void 0;const getMeta=function(t){return __awaiter(this,arguments,void 0,function*({link:t,providerContext:e}){var i;try{const{axios:n,cheerio:o}=e,r=t,s=t.split("/").slice(0,3).join("/"),a=yield n.get(r),c=yield a.data,d=o.load(c),l=(null===(i=d(".movie_info").find('a[href*="imdb.com/title/tt"]:not([href*="imdb.com/title/tt/"])').attr("href"))||void 0===i?void 0:i.split("/")[4])||"",h=d(".show_season").html()?"series":"movie",u=[];return d(".show_season").each((t,e)=>{const i="Season "+d(e).attr("data-id"),n=[];d(e).children().each((t,e)=>{const i=d(e).find("a").children().remove().end().text().trim().replace("E","Epiosode "),o=s+d(e).find("a").attr("href");i&&o&&n.push({title:i,link:o})}),u.push({title:i,directLinks:n})}),"movie"===h&&u.push({title:"Movie",directLinks:[{link:t,title:"Movie",type:"movie"}]}),{title:"",image:"",imdbId:l,synopsis:"",type:h,linkList:u}}catch(t){return{title:"",image:"",imdbId:"",synopsis:"",linkList:[],type:"uhd"}}})};exports.getMeta=getMeta;
|
||||
64
dist/primewire/posts.js
vendored
64
dist/primewire/posts.js
vendored
@@ -1,63 +1 @@
|
||||
"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, page, signal, providerContext, }) {
|
||||
const { getBaseUrl, axios, cheerio } = providerContext;
|
||||
const baseUrl = yield getBaseUrl("primewire");
|
||||
const url = `${baseUrl + filter}&page=${page}`;
|
||||
return posts({ baseUrl, url, signal, axios, cheerio });
|
||||
});
|
||||
};
|
||||
exports.getPosts = getPosts;
|
||||
const getSearchPosts = function (_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ searchQuery, page, signal, providerContext, }) {
|
||||
const { getBaseUrl, axios, cheerio, Aes } = providerContext;
|
||||
const getSHA256ofJSON = function (input) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return yield Aes.sha1(input);
|
||||
});
|
||||
};
|
||||
const baseUrl = yield getBaseUrl("primewire");
|
||||
const hash = yield getSHA256ofJSON(searchQuery + "JyjId97F9PVqUPuMO0");
|
||||
const url = `${baseUrl}/filter?s=${searchQuery}&page=${page}&ds=${hash.slice(0, 10)}`;
|
||||
return posts({ baseUrl, url, signal, axios, cheerio });
|
||||
});
|
||||
};
|
||||
exports.getSearchPosts = getSearchPosts;
|
||||
function posts(_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ baseUrl, url, signal, axios, cheerio, }) {
|
||||
try {
|
||||
const res = yield axios.get(url, { signal });
|
||||
const data = res.data;
|
||||
const $ = cheerio.load(data);
|
||||
const catalog = [];
|
||||
$(".index_item.index_item_ie").map((i, element) => {
|
||||
const title = $(element).find("a").attr("title");
|
||||
const link = $(element).find("a").attr("href");
|
||||
const image = $(element).find("img").attr("src") || "";
|
||||
if (title && link) {
|
||||
catalog.push({
|
||||
title: title,
|
||||
link: baseUrl + link,
|
||||
image: image,
|
||||
});
|
||||
}
|
||||
});
|
||||
return catalog;
|
||||
}
|
||||
catch (err) {
|
||||
console.error("primewire error ", err);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
}
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,i,r){return new(i||(i=Promise))(function(s,n){function o(t){try{c(r.next(t))}catch(t){n(t)}}function a(t){try{c(r.throw(t))}catch(t){n(t)}}function c(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(o,a)}c((r=r.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,page:e,signal:i,providerContext:r}){const{getBaseUrl:s,axios:n,cheerio:o}=r,a=yield s("primewire");return posts({baseUrl:a,url:`${a+t}&page=${e}`,signal:i,axios:n,cheerio:o})})};exports.getPosts=getPosts;const getSearchPosts=function(t){return __awaiter(this,arguments,void 0,function*({searchQuery:t,page:e,signal:i,providerContext:r}){const{getBaseUrl:s,axios:n,cheerio:o,Aes:a}=r,c=yield s("primewire");return posts({baseUrl:c,url:`${c}/filter?s=${t}&page=${e}&ds=${(yield function(t){return __awaiter(this,void 0,void 0,function*(){return yield a.sha1(t)})}(t+"JyjId97F9PVqUPuMO0")).slice(0,10)}`,signal:i,axios:n,cheerio:o})})};function posts(t){return __awaiter(this,arguments,void 0,function*({baseUrl:t,url:e,signal:i,axios:r,cheerio:s}){try{const n=(yield r.get(e,{signal:i})).data,o=s.load(n),a=[];return o(".index_item.index_item_ie").map((e,i)=>{const r=o(i).find("a").attr("title"),s=o(i).find("a").attr("href"),n=o(i).find("img").attr("src")||"";r&&s&&a.push({title:r,link:t+s,image:n})}),a}catch(t){return[]}})}exports.getSearchPosts=getSearchPosts;
|
||||
138
dist/primewire/stream.js
vendored
138
dist/primewire/stream.js
vendored
@@ -1,137 +1 @@
|
||||
"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: url, type, providerContext, }) {
|
||||
var _b, _c, _d, _e, _f, _g;
|
||||
const { axios, cheerio } = providerContext;
|
||||
try {
|
||||
console.log("pwGetStream", type, url);
|
||||
const baseUrl = url.split("/").slice(0, 3).join("/");
|
||||
const streamLinks = [];
|
||||
const urls = [];
|
||||
const res = yield axios.get(url);
|
||||
const data = res.data;
|
||||
const $ = cheerio.load(data);
|
||||
$('tr:contains("mixdrop")').map((i, element) => {
|
||||
const id = $(element).find(".wp-menu-btn").attr("data-wp-menu");
|
||||
const size = $(element).find(".wp-menu-btn").next().text();
|
||||
if (id) {
|
||||
urls.push({ id: baseUrl + "/links/go/" + id, size });
|
||||
}
|
||||
});
|
||||
console.log("urls", urls);
|
||||
for (const url of urls) {
|
||||
const res2 = yield axios.head(url.id);
|
||||
const location = (_b = res2.request) === null || _b === void 0 ? void 0 : _b.responseURL.replace("/f/", "/e/");
|
||||
const res3 = yield fetch(location, {
|
||||
credentials: "include",
|
||||
headers: {
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0",
|
||||
Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8",
|
||||
"Accept-Language": "en-US,en;q=0.5",
|
||||
"Upgrade-Insecure-Requests": "1",
|
||||
"Sec-Fetch-Dest": "iframe",
|
||||
"Sec-Fetch-Mode": "navigate",
|
||||
"Sec-Fetch-Site": "same-origin",
|
||||
Pragma: "no-cache",
|
||||
"Cache-Control": "no-cache",
|
||||
referer: (_c = res2.request) === null || _c === void 0 ? void 0 : _c.responseURL,
|
||||
},
|
||||
referrer: (_d = res2.request) === null || _d === void 0 ? void 0 : _d.responseURL,
|
||||
method: "GET",
|
||||
mode: "cors",
|
||||
});
|
||||
const data3 = yield res3.text();
|
||||
// let MDCore: any = {};
|
||||
// Step 1: Extract the function parameters and the encoded string
|
||||
var functionRegex = /eval\(function\((.*?)\)\{.*?return p\}.*?\('(.*?)'\.split/;
|
||||
var match = functionRegex.exec(data3);
|
||||
let p = "";
|
||||
if (match) {
|
||||
// var params = match[1].split(',').map(param => param.trim());
|
||||
var encodedString = match[2];
|
||||
console.log("Encoded String:", encodedString);
|
||||
// console.log('Parameters:', params);
|
||||
// console.log('Encoded String:', encodedString.split("',36,")[0], '🔥🔥');
|
||||
const base = Number(encodedString.split(",'|MDCore|")[0].split(",")[encodedString.split(",'|MDCore|")[0].split(",").length - 1]);
|
||||
console.log("Base:", base);
|
||||
p = (_e = encodedString.split(`',${base},`)) === null || _e === void 0 ? void 0 : _e[0].trim();
|
||||
let a = base;
|
||||
let c = encodedString.split(`',${base},`)[1].slice(2).split("|").length;
|
||||
let k = encodedString.split(`',${base},`)[1].slice(2).split("|");
|
||||
// console.log('p:', p);
|
||||
// console.log('a:', a);
|
||||
// console.log('c:', c);
|
||||
// console.log('k:', k);
|
||||
const decode = function (p, a, c, k, e, d) {
|
||||
e = function (c) {
|
||||
return c.toString(36);
|
||||
};
|
||||
if (!"".replace(/^/, String)) {
|
||||
while (c--) {
|
||||
d[c.toString(a)] = k[c] || c.toString(a);
|
||||
}
|
||||
k = [
|
||||
function (e) {
|
||||
return d[e];
|
||||
},
|
||||
];
|
||||
e = function () {
|
||||
return "\\w+";
|
||||
};
|
||||
c = 1;
|
||||
}
|
||||
while (c--) {
|
||||
if (k[c]) {
|
||||
p = p.replace(new RegExp("\\b" + e(c) + "\\b", "g"), k[c]);
|
||||
}
|
||||
}
|
||||
return p;
|
||||
};
|
||||
const decoded = decode(p, a, c, k, 0, {});
|
||||
// get MDCore.wurl=
|
||||
const wurl = (_f = decoded.match(/MDCore\.wurl="([^"]+)"/)) === null || _f === void 0 ? void 0 : _f[1];
|
||||
console.log("wurl:", wurl);
|
||||
const streamUrl = "https:" + wurl;
|
||||
console.log("streamUrl:", streamUrl);
|
||||
streamLinks.push({
|
||||
server: "Mixdrop " + url.size,
|
||||
link: streamUrl,
|
||||
type: "mp4",
|
||||
headers: {
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0",
|
||||
Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8",
|
||||
"Accept-Language": "en-US,en;q=0.5",
|
||||
"Upgrade-Insecure-Requests": "1",
|
||||
"Sec-Fetch-Dest": "iframe",
|
||||
"Sec-Fetch-Mode": "navigate",
|
||||
"Sec-Fetch-Site": "same-origin",
|
||||
Pragma: "no-cache",
|
||||
"Cache-Control": "no-cache",
|
||||
referer: (_g = res2.request) === null || _g === void 0 ? void 0 : _g.responseURL,
|
||||
},
|
||||
});
|
||||
}
|
||||
else {
|
||||
console.log("No match found");
|
||||
}
|
||||
}
|
||||
return streamLinks;
|
||||
}
|
||||
catch (err) {
|
||||
console.error(err);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getStream = getStream;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))(function(r,o){function c(e){try{s(i.next(e))}catch(e){o(e)}}function a(e){try{s(i.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(c,a)}s((i=i.apply(e,t||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getStream=void 0;const getStream=function(e){return __awaiter(this,arguments,void 0,function*({link:e,type:t,providerContext:n}){var i,r,o,c,a,s;const{axios:l,cheerio:p}=n;try{const t=e.split("/").slice(0,3).join("/"),n=[],h=[],f=(yield l.get(e)).data,m=p.load(f);m('tr:contains("mixdrop")').map((e,n)=>{const i=m(n).find(".wp-menu-btn").attr("data-wp-menu"),r=m(n).find(".wp-menu-btn").next().text();i&&h.push({id:t+"/links/go/"+i,size:r})});for(const e of h){const t=yield l.head(e.id),p=null===(i=t.request)||void 0===i?void 0:i.responseURL.replace("/f/","/e/"),h=yield fetch(p,{credentials:"include",headers:{"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0",Accept:"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8","Accept-Language":"en-US,en;q=0.5","Upgrade-Insecure-Requests":"1","Sec-Fetch-Dest":"iframe","Sec-Fetch-Mode":"navigate","Sec-Fetch-Site":"same-origin",Pragma:"no-cache","Cache-Control":"no-cache",referer:null===(r=t.request)||void 0===r?void 0:r.responseURL},referrer:null===(o=t.request)||void 0===o?void 0:o.responseURL,method:"GET",mode:"cors"}),f=yield h.text();var u=/eval\(function\((.*?)\)\{.*?return p\}.*?\('(.*?)'\.split/.exec(f);let m="";if(u){var d=u[2];const i=Number(d.split(",'|MDCore|")[0].split(",")[d.split(",'|MDCore|")[0].split(",").length-1]);m=null===(c=d.split(`',${i},`))||void 0===c?void 0:c[0].trim();let r=i,o=d.split(`',${i},`)[1].slice(2).split("|").length,l=d.split(`',${i},`)[1].slice(2).split("|");const p=function(e,t,n,i,r,o){if(r=function(e){return e.toString(36)},!"".replace(/^/,String)){for(;n--;)o[n.toString(t)]=i[n]||n.toString(t);i=[function(e){return o[e]}],r=function(){return"\\w+"},n=1}for(;n--;)i[n]&&(e=e.replace(new RegExp("\\b"+r(n)+"\\b","g"),i[n]));return e},h=p(m,r,o,l,0,{}),f="https:"+(null===(a=h.match(/MDCore\.wurl="([^"]+)"/))||void 0===a?void 0:a[1]);n.push({server:"Mixdrop "+e.size,link:f,type:"mp4",headers:{"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0",Accept:"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8","Accept-Language":"en-US,en;q=0.5","Upgrade-Insecure-Requests":"1","Sec-Fetch-Dest":"iframe","Sec-Fetch-Mode":"navigate","Sec-Fetch-Site":"same-origin",Pragma:"no-cache","Cache-Control":"no-cache",referer:null===(s=t.request)||void 0===s?void 0:s.responseURL}})}}return n}catch(e){return[]}})};exports.getStream=getStream;
|
||||
23
dist/protonMovies/catalog.js
vendored
23
dist/protonMovies/catalog.js
vendored
@@ -1,22 +1 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.genres = exports.catalog = void 0;
|
||||
exports.catalog = [
|
||||
{
|
||||
title: "Latest",
|
||||
filter: "/movies",
|
||||
},
|
||||
{
|
||||
title: "Netflix",
|
||||
filter: "/platform/netflix",
|
||||
},
|
||||
{
|
||||
title: "Disney +",
|
||||
filter: "/platform/disney-hotstar",
|
||||
},
|
||||
{
|
||||
title: "Amazon Prime",
|
||||
filter: "/platform/amazon-prime-video",
|
||||
},
|
||||
];
|
||||
exports.genres = [];
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.genres=exports.catalog=void 0,exports.catalog=[{title:"Latest",filter:"/movies"},{title:"Netflix",filter:"/platform/netflix"},{title:"Disney +",filter:"/platform/disney-hotstar"},{title:"Amazon Prime",filter:"/platform/amazon-prime-video"}],exports.genres=[];
|
||||
103
dist/protonMovies/meta.js
vendored
103
dist/protonMovies/meta.js
vendored
@@ -1,102 +1 @@
|
||||
"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;
|
||||
try {
|
||||
const { axios, cheerio, getBaseUrl } = providerContext;
|
||||
const baseUrl = yield getBaseUrl("protonMovies");
|
||||
console.log("all", link);
|
||||
const res = yield axios.get(`${baseUrl}${link}`);
|
||||
const data = res.data;
|
||||
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;
|
||||
}
|
||||
const $$ = cheerio.load(data);
|
||||
const htmlArray = (_f = (_e = (_d = (_c = (_b = $$('script:contains("decodeURIComponent")')
|
||||
.text()
|
||||
.split(" = ")) === null || _b === void 0 ? void 0 : _b[1]) === null || _c === void 0 ? void 0 : _c.split("protomovies")) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.trim()) === null || _f === void 0 ? void 0 : _f.slice(0, -1); // remove the last character
|
||||
// console.log('protonGetInfo', htmlArray);
|
||||
const html = decodeHtml(JSON.parse(htmlArray));
|
||||
// console.log('all', html);
|
||||
const $ = cheerio.load(html);
|
||||
const title = $(".trending-text.fw-bold.texture-text.text-uppercase.my-0.fadeInLeft.animated.d-inline-block").text();
|
||||
const image = $("#thumbnail").attr("src");
|
||||
const type = link.includes("series") ? "series" : "movie";
|
||||
const synopsis = $(".col-12.iq-mb-30.animated.fadeIn").first().text() ||
|
||||
$(".description-content").text();
|
||||
const tags = $(".p-0.mt-2.list-inline.d-flex.flex-wrap.movie-tag")
|
||||
.find("li")
|
||||
.map((i, el) => $(el).text())
|
||||
.slice(0, 3)
|
||||
.get();
|
||||
const links = [];
|
||||
if (type === "movie") {
|
||||
const directLinks = [];
|
||||
directLinks.push({ title: "Movie", link: baseUrl + link });
|
||||
links.push({ title: "Movie", directLinks: directLinks });
|
||||
}
|
||||
else {
|
||||
$("#episodes")
|
||||
.children()
|
||||
.map((i, element) => {
|
||||
let directLinks = [];
|
||||
$(element)
|
||||
.find(".episode-block")
|
||||
.map((j, ep) => {
|
||||
const link = baseUrl + $(ep).find("a").attr("href") || "";
|
||||
const title = "Episode " + $(ep).find(".episode-number").text().split("E")[1];
|
||||
directLinks.push({ title, link });
|
||||
});
|
||||
links.push({ title: "Season " + (i + 1), directLinks: directLinks });
|
||||
});
|
||||
}
|
||||
return {
|
||||
image: image || "",
|
||||
imdbId: "",
|
||||
linkList: links,
|
||||
title: title || "",
|
||||
synopsis: synopsis,
|
||||
tags: tags,
|
||||
type: type,
|
||||
};
|
||||
}
|
||||
catch (err) {
|
||||
console.error("prton", err);
|
||||
return {
|
||||
title: "",
|
||||
synopsis: "",
|
||||
image: "",
|
||||
imdbId: "",
|
||||
type: "movie",
|
||||
linkList: [],
|
||||
};
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getMeta = getMeta;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,l){function r(e){try{a(n.next(e))}catch(e){l(e)}}function s(e){try{a(n.throw(e))}catch(e){l(e)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(r,s)}a((n=n.apply(e,t||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getMeta=void 0;const getMeta=function(e){return __awaiter(this,arguments,void 0,function*({link:e,providerContext:t}){var i,n,o,l,r;try{const{axios:s,cheerio:a,getBaseUrl:c}=t,d=yield c("protonMovies"),p=(yield s.get(`${d}${e}`)).data;const u=null===(r=null===(l=null===(o=null===(n=null===(i=a.load(p)('script:contains("decodeURIComponent")').text().split(" = "))||void 0===i?void 0:i[1])||void 0===n?void 0:n.split("protomovies"))||void 0===o?void 0:o[0])||void 0===l?void 0:l.trim())||void 0===r?void 0:r.slice(0,-1),v=JSON.parse(u).join("").replace(/\\"/g,'"').replace(/\\'/g,"'").replace(/\\n/g,"\n").replace(/\\t/g,"\t").replace(/\\r/g,"\r").replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&"),f=a.load(v),m=f(".trending-text.fw-bold.texture-text.text-uppercase.my-0.fadeInLeft.animated.d-inline-block").text(),g=f("#thumbnail").attr("src"),x=e.includes("series")?"series":"movie",h=f(".col-12.iq-mb-30.animated.fadeIn").first().text()||f(".description-content").text(),y=f(".p-0.mt-2.list-inline.d-flex.flex-wrap.movie-tag").find("li").map((e,t)=>f(t).text()).slice(0,3).get(),b=[];if("movie"===x){const t=[];t.push({title:"Movie",link:d+e}),b.push({title:"Movie",directLinks:t})}else f("#episodes").children().map((e,t)=>{let i=[];f(t).find(".episode-block").map((e,t)=>{const n=d+f(t).find("a").attr("href")||"",o="Episode "+f(t).find(".episode-number").text().split("E")[1];i.push({title:o,link:n})}),b.push({title:"Season "+(e+1),directLinks:i})});return{image:g||"",imdbId:"",linkList:b,title:m||"",synopsis:h,tags:y,type:x}}catch(e){return{title:"",synopsis:"",image:"",imdbId:"",type:"movie",linkList:[]}}})};exports.getMeta=getMeta;
|
||||
86
dist/protonMovies/posts.js
vendored
86
dist/protonMovies/posts.js
vendored
@@ -1,85 +1 @@
|
||||
"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, page, signal, providerContext, }) {
|
||||
const { getBaseUrl, axios, cheerio } = providerContext;
|
||||
const baseUrl = yield getBaseUrl("protonMovies");
|
||||
const url = `${baseUrl + filter}/page/${page}/`;
|
||||
return posts({ url, baseUrl, signal, axios, cheerio });
|
||||
});
|
||||
};
|
||||
exports.getPosts = getPosts;
|
||||
const getSearchPosts = function (_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ searchQuery, page, signal, providerContext, }) {
|
||||
const { getBaseUrl, axios, cheerio } = providerContext;
|
||||
const baseUrl = yield getBaseUrl("protonMovies");
|
||||
const url = `${baseUrl}/search/${searchQuery}/page/${page}/`;
|
||||
return posts({ url, baseUrl, signal, axios, cheerio });
|
||||
});
|
||||
};
|
||||
exports.getSearchPosts = getSearchPosts;
|
||||
function posts(_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ url, baseUrl, signal, axios, cheerio, }) {
|
||||
try {
|
||||
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;
|
||||
}
|
||||
const res = yield axios.get(url, {
|
||||
headers: {
|
||||
referer: baseUrl,
|
||||
},
|
||||
signal,
|
||||
});
|
||||
const data = res.data;
|
||||
const regex = /\[(?=.*?"<div class")(.*?)\]/g;
|
||||
const htmlArray = data === null || data === void 0 ? void 0 : data.match(regex);
|
||||
const html = decodeHtml(JSON.parse(htmlArray[htmlArray.length - 1]));
|
||||
const $ = cheerio.load(html);
|
||||
const catalog = [];
|
||||
$(".col.mb-4").map((i, element) => {
|
||||
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 [];
|
||||
}
|
||||
});
|
||||
}
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(e,t,r,a){return new(r||(r=Promise))(function(s,o){function n(e){try{c(a.next(e))}catch(e){o(e)}}function i(e){try{c(a.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(n,i)}c((a=a.apply(e,t||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getSearchPosts=exports.getPosts=void 0;const getPosts=function(e){return __awaiter(this,arguments,void 0,function*({filter:e,page:t,signal:r,providerContext:a}){const{getBaseUrl:s,axios:o,cheerio:n}=a,i=yield s("protonMovies");return posts({url:`${i+e}/page/${t}/`,baseUrl:i,signal:r,axios:o,cheerio:n})})};exports.getPosts=getPosts;const getSearchPosts=function(e){return __awaiter(this,arguments,void 0,function*({searchQuery:e,page:t,signal:r,providerContext:a}){const{getBaseUrl:s,axios:o,cheerio:n}=a,i=yield s("protonMovies");return posts({url:`${i}/search/${e}/page/${t}/`,baseUrl:i,signal:r,axios:o,cheerio:n})})};function posts(e){return __awaiter(this,arguments,void 0,function*({url:e,baseUrl:t,signal:r,axios:a,cheerio:s}){try{const o=(yield a.get(e,{headers:{referer:t},signal:r})).data,n=/\[(?=.*?"<div class")(.*?)\]/g,i=null==o?void 0:o.match(n),c=JSON.parse(i[i.length-1]).join("").replace(/\\"/g,'"').replace(/\\'/g,"'").replace(/\\n/g,"\n").replace(/\\t/g,"\t").replace(/\\r/g,"\r").replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&"),l=s.load(c),g=[];return l(".col.mb-4").map((e,t)=>{const r=l(t).find("h5").text(),a=l(t).find("h5").find("a").attr("href"),s=l(t).find("img").attr("data-src")||l(t).find("img").attr("src")||"";r&&a&&s&&g.push({title:r,link:a,image:s})}),g}catch(e){return[]}})}exports.getSearchPosts=getSearchPosts;
|
||||
172
dist/protonMovies/stream.js
vendored
172
dist/protonMovies/stream.js
vendored
File diff suppressed because one or more lines are too long
67
dist/providerContext.js
vendored
67
dist/providerContext.js
vendored
@@ -1,66 +1 @@
|
||||
"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;
|
||||
};
|
||||
})();
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.providerContext = void 0;
|
||||
const axios_1 = __importDefault(require("axios"));
|
||||
const getBaseUrl_1 = require("./getBaseUrl");
|
||||
const headers_1 = require("./headers");
|
||||
const cheerio = __importStar(require("cheerio"));
|
||||
const hubcloudExtractor_1 = require("./hubcloudExtractor");
|
||||
const gofileExtracter_1 = require("./gofileExtracter");
|
||||
const superVideoExtractor_1 = require("./superVideoExtractor");
|
||||
const gdflixExtractor_1 = require("./gdflixExtractor");
|
||||
const react_native_aes_crypto_1 = __importDefault(require("react-native-aes-crypto"));
|
||||
/**
|
||||
* Context for provider functions.
|
||||
* This context is used to pass common dependencies to provider functions.
|
||||
*/
|
||||
const extractors = {
|
||||
hubcloudExtracter: hubcloudExtractor_1.hubcloudExtracter,
|
||||
gofileExtracter: gofileExtracter_1.gofileExtracter,
|
||||
superVideoExtractor: superVideoExtractor_1.superVideoExtractor,
|
||||
gdFlixExtracter: gdflixExtractor_1.gdFlixExtracter,
|
||||
};
|
||||
exports.providerContext = {
|
||||
axios: axios_1.default,
|
||||
getBaseUrl: getBaseUrl_1.getBaseUrl,
|
||||
commonHeaders: headers_1.headers,
|
||||
Aes: react_native_aes_crypto_1.default,
|
||||
cheerio,
|
||||
extractors,
|
||||
};
|
||||
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,r,t,o){void 0===o&&(o=t);var a=Object.getOwnPropertyDescriptor(r,t);a&&!("get"in a?!r.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(e,o,a)}:function(e,r,t,o){void 0===o&&(o=t),e[o]=r[t]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:!0,value:r})}:function(e,r){e.default=r}),__importStar=this&&this.__importStar||function(){var e=function(r){return e=Object.getOwnPropertyNames||function(e){var r=[];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[r.length]=t);return r},e(r)};return function(r){if(r&&r.__esModule)return r;var t={};if(null!=r)for(var o=e(r),a=0;a<o.length;a++)"default"!==o[a]&&__createBinding(t,r,o[a]);return __setModuleDefault(t,r),t}}(),__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.providerContext=void 0;const axios_1=__importDefault(require("axios")),getBaseUrl_1=require("./getBaseUrl"),headers_1=require("./headers"),cheerio=__importStar(require("cheerio")),hubcloudExtractor_1=require("./hubcloudExtractor"),gofileExtracter_1=require("./gofileExtracter"),superVideoExtractor_1=require("./superVideoExtractor"),gdflixExtractor_1=require("./gdflixExtractor"),react_native_aes_crypto_1=__importDefault(require("react-native-aes-crypto")),extractors={hubcloudExtracter:hubcloudExtractor_1.hubcloudExtracter,gofileExtracter:gofileExtracter_1.gofileExtracter,superVideoExtractor:superVideoExtractor_1.superVideoExtractor,gdFlixExtracter:gdflixExtractor_1.gdFlixExtracter};exports.providerContext={axios:axios_1.default,getBaseUrl:getBaseUrl_1.getBaseUrl,commonHeaders:headers_1.headers,Aes:react_native_aes_crypto_1.default,cheerio:cheerio,extractors:extractors};
|
||||
15
dist/ridoMovies/catalog.js
vendored
15
dist/ridoMovies/catalog.js
vendored
@@ -1,14 +1 @@
|
||||
"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 = [];
|
||||
"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=[];
|
||||
95
dist/ridoMovies/meta.js
vendored
95
dist/ridoMovies/meta.js
vendored
@@ -1,94 +1 @@
|
||||
"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;
|
||||
try {
|
||||
const { getBaseUrl, axios } = providerContext;
|
||||
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 baseUrl = yield getBaseUrl("ridomovies");
|
||||
let slug = "";
|
||||
try {
|
||||
const res2 = yield axios.get(baseUrl + "/core/api/search?q=" + meta.imdbId);
|
||||
const data2 = res2.data;
|
||||
slug = (_e = (_d = data2 === null || data2 === void 0 ? void 0 : data2.data) === null || _d === void 0 ? void 0 : _d.items[0]) === null || _e === void 0 ? void 0 : _e.fullSlug;
|
||||
if (!slug || (meta === null || meta === void 0 ? void 0 : meta.type) === "series") {
|
||||
return {
|
||||
title: "",
|
||||
synopsis: "",
|
||||
image: "",
|
||||
imdbId: ((_f = data === null || data === void 0 ? void 0 : data.meta) === null || _f === void 0 ? void 0 : _f.imdb_id) || "",
|
||||
type: (meta === null || meta === void 0 ? void 0 : meta.type) || "movie",
|
||||
linkList: [],
|
||||
};
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
return {
|
||||
title: "",
|
||||
synopsis: "",
|
||||
image: "",
|
||||
imdbId: (meta === null || meta === void 0 ? void 0 : meta.imdbId) || "",
|
||||
type: (meta === null || meta === void 0 ? void 0 : meta.type) || "movie",
|
||||
linkList: [],
|
||||
};
|
||||
}
|
||||
const links = [];
|
||||
let directLinks = [];
|
||||
let season = new Map();
|
||||
if (meta.type === "series") {
|
||||
(_h = (_g = data === null || data === void 0 ? void 0 : data.meta) === null || _g === void 0 ? void 0 : _g.videos) === null || _h === void 0 ? void 0 : _h.map((video) => {
|
||||
if ((video === 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),
|
||||
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 Object.assign(Object.assign({}, meta), { linkList: links });
|
||||
}
|
||||
catch (err) {
|
||||
return {
|
||||
title: "",
|
||||
synopsis: "",
|
||||
image: "",
|
||||
imdbId: "",
|
||||
type: "movie",
|
||||
linkList: [],
|
||||
};
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getMeta = getMeta;
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(i,e,t,n){return new(t||(t=Promise))(function(o,l){function s(i){try{a(n.next(i))}catch(i){l(i)}}function d(i){try{a(n.throw(i))}catch(i){l(i)}}function a(i){var e;i.done?o(i.value):(e=i.value,e instanceof t?e:new t(function(i){i(e)})).then(s,d)}a((n=n.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,n,o,l,s,d,a;try{const{getBaseUrl:u,axios:v}=e,r=(yield v.get(i)).data,c={title:"",synopsis:"",image:"",imdbId:(null===(t=null==r?void 0:r.meta)||void 0===t?void 0:t.imdb_id)||"",type:(null===(n=null==r?void 0:r.meta)||void 0===n?void 0:n.type)||"movie"},p=yield u("ridomovies");let m="";try{const i=(yield v.get(p+"/core/api/search?q="+c.imdbId)).data;if(m=null===(l=null===(o=null==i?void 0:i.data)||void 0===o?void 0:o.items[0])||void 0===l?void 0:l.fullSlug,!m||"series"===(null==c?void 0:c.type))return{title:"",synopsis:"",image:"",imdbId:(null===(s=null==r?void 0:r.meta)||void 0===s?void 0:s.imdb_id)||"",type:(null==c?void 0:c.type)||"movie",linkList:[]}}catch(i){return{title:"",synopsis:"",image:"",imdbId:(null==c?void 0:c.imdbId)||"",type:(null==c?void 0:c.type)||"movie",linkList:[]}}const y=[];let f=[],g=new Map;if("series"===c.type){null===(a=null===(d=null==r?void 0:r.meta)||void 0===d?void 0:d.videos)||void 0===a||a.map(i=>{(null==i?void 0:i.season)<=0||(g.has(null==i?void 0:i.season)||g.set(null==i?void 0:i.season,[]),g.get(null==i?void 0:i.season).push({title:"Episode "+(null==i?void 0:i.episode),link:""}))});for(const[i,e]of g.entries())y.push({title:"Season "+i,directLinks:e})}else f.push({title:"Movie",link:i}),y.push({title:"Movie",directLinks:f});return Object.assign(Object.assign({},c),{linkList:y})}catch(i){return{title:"",synopsis:"",image:"",imdbId:"",type:"movie",linkList:[]}}})};exports.getMeta=getMeta;
|
||||
80
dist/ridoMovies/posts.js
vendored
80
dist/ridoMovies/posts.js
vendored
@@ -1,79 +1 @@
|
||||
"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;
|
||||
"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;
|
||||
72
dist/ridoMovies/stream.js
vendored
72
dist/ridoMovies/stream.js
vendored
@@ -1,71 +1 @@
|
||||
"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 = (_a) => __awaiter(void 0, [_a], void 0, function* ({ link: data, providerContext, }) {
|
||||
var _b, _c;
|
||||
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 === null || streamData === void 0 ? void 0 : streamData.baseUrl) + "/api/" + (streamData === null || streamData === void 0 ? void 0 : streamData.slug);
|
||||
console.log("rido url", url);
|
||||
const res = yield axios.get(url, { headers });
|
||||
const iframe = (_c = (_b = res.data.data) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.url;
|
||||
console.log("rido data", iframe);
|
||||
const iframeUrl = iframe.split('src="')[1].split('"')[0];
|
||||
console.log("rido iframeUrl", iframeUrl);
|
||||
const iframeRes = yield axios.get(iframeUrl, {
|
||||
headers: Object.assign(Object.assign({}, headers), { Referer: streamData === null || streamData === void 0 ? void 0 : 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;
|
||||
}
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,r,a){return new(r||(r=Promise))(function(n,i){function o(t){try{c(a.next(t))}catch(t){i(t)}}function s(t){try{c(a.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?n(t.value):(e=t.value,e instanceof r?e:new r(function(t){t(e)})).then(o,s)}c((a=a.apply(t,e||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getStream=void 0;const getStream=t=>__awaiter(void 0,[t],void 0,function*({link:t,providerContext:e}){var r,a;try{const{cheerio:n,commonHeaders:i,axios:o}=e,s=JSON.parse(t),c=[],l=(null==s?void 0:s.baseUrl)+"/api/"+(null==s?void 0:s.slug),u=yield o.get(l,{headers:i}),d=(null===(a=null===(r=u.data.data)||void 0===r?void 0:r[0])||void 0===a?void 0:a.url).split('src="')[1].split('"')[0],p=yield o.get(d,{headers:Object.assign(Object.assign({},i),{Referer:null==s?void 0:s.baseUrl})}),v=n.load(p.data)('script:contains("eval")').html();if(!v)throw new Error("Unable to find script");const h=unpackJavaScript(v.trim());return c.push({link:h,server:"rido",type:"m3u8",headers:{Referer:d}}),c}catch(t){return[]}});function unpackJavaScript(t){const e=t.split("|aHR")[1].split("|")[0];var r;return atob((r="aHR"+e)+"=".repeat((4-r.length%4)%4))}exports.getStream=getStream;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user