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:
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;
|
||||
Reference in New Issue
Block a user