mirror of
https://github.com/vega-org/vega-providers.git
synced 2026-04-17 23:51:44 +00:00
minify
This commit is contained in:
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;
|
||||
Reference in New Issue
Block a user