mirror of
https://github.com/vega-org/vega-providers.git
synced 2026-04-17 15:41:45 +00:00
build
This commit is contained in:
78
dist/primeMirror/episodes.js
vendored
78
dist/primeMirror/episodes.js
vendored
@@ -1,39 +1,51 @@
|
||||
"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 = async function ({ url: link, providerContext, }) {
|
||||
const { getBaseUrl, axios } = providerContext;
|
||||
let providerValue = "primeMirror";
|
||||
try {
|
||||
const baseUrl = await 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);
|
||||
const res = await axios.get(url, {
|
||||
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;
|
||||
console.log("nfEpisodes", data);
|
||||
const episodeList = [];
|
||||
data?.episodes?.map((episode) => {
|
||||
episodeList.push({
|
||||
title: "Episode " + episode?.ep.replace("E", ""),
|
||||
link: episode?.id,
|
||||
const getEpisodes = function (_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ url: link, providerContext, }) {
|
||||
var _b;
|
||||
const { getBaseUrl, axios } = providerContext;
|
||||
let providerValue = "primeMirror";
|
||||
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);
|
||||
const res = yield axios.get(url, {
|
||||
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",
|
||||
},
|
||||
});
|
||||
});
|
||||
return episodeList;
|
||||
}
|
||||
catch (err) {
|
||||
console.error("nfGetEpisodes error", err);
|
||||
return [];
|
||||
}
|
||||
const data = res.data;
|
||||
console.log("nfEpisodes", data);
|
||||
const episodeList = [];
|
||||
(_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,
|
||||
});
|
||||
});
|
||||
return episodeList;
|
||||
}
|
||||
catch (err) {
|
||||
console.error("nfGetEpisodes error", err);
|
||||
return [];
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getEpisodes = getEpisodes;
|
||||
|
||||
107
dist/primeMirror/meta.js
vendored
107
dist/primeMirror/meta.js
vendored
@@ -1,57 +1,66 @@
|
||||
"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 = async function ({ link, }) {
|
||||
let providerValue = "primeMirror";
|
||||
try {
|
||||
const isPrime = providerValue === "primeMirror" ? "isPrime=true" : "isPrime=false";
|
||||
const url = `https://netmirror.8man.me/api/net-proxy?${isPrime}&url=${encodeURIComponent(link)}`;
|
||||
console.log("nfifo", url);
|
||||
const res = await fetch(url, {
|
||||
credentials: "omit",
|
||||
});
|
||||
const data = await res.json();
|
||||
const id = link.split("id=")[1]?.split("&")[0];
|
||||
const meta = {
|
||||
title: data.title,
|
||||
synopsis: data.desc,
|
||||
image: `https://img.nfmirrorcdn.top/poster/h/${id}.jpg`,
|
||||
cast: data?.short_cast?.split(","),
|
||||
tags: [data?.year, data?.hdsd, ...data?.thismovieis?.split(",")],
|
||||
imdbId: "",
|
||||
type: "series",
|
||||
};
|
||||
console.log("nfinfo", meta);
|
||||
const linkList = [];
|
||||
if (data?.season?.length > 0) {
|
||||
data.season.map((season) => {
|
||||
linkList.push({
|
||||
title: "Season " + season?.s,
|
||||
episodesLink: season?.id,
|
||||
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.8man.me/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 });
|
||||
}
|
||||
else {
|
||||
linkList.push({
|
||||
title: meta.title,
|
||||
directLinks: [{ link: id, title: "Movie", type: "movie" }],
|
||||
});
|
||||
catch (err) {
|
||||
console.error(err);
|
||||
return {
|
||||
title: "",
|
||||
synopsis: "",
|
||||
image: "",
|
||||
imdbId: "",
|
||||
type: "",
|
||||
linkList: [],
|
||||
};
|
||||
}
|
||||
return {
|
||||
...meta,
|
||||
linkList: linkList,
|
||||
};
|
||||
}
|
||||
catch (err) {
|
||||
console.error(err);
|
||||
return {
|
||||
title: "",
|
||||
synopsis: "",
|
||||
image: "",
|
||||
imdbId: "",
|
||||
type: "",
|
||||
linkList: [],
|
||||
};
|
||||
}
|
||||
});
|
||||
};
|
||||
exports.getMeta = getMeta;
|
||||
|
||||
180
dist/primeMirror/posts.js
vendored
180
dist/primeMirror/posts.js
vendored
@@ -1,94 +1,108 @@
|
||||
"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 = async function ({ filter, page, providerValue, signal, providerContext, }) {
|
||||
try {
|
||||
const { getBaseUrl, cheerio } = providerContext;
|
||||
const baseUrl = await getBaseUrl("nfMirror");
|
||||
const catalog = [];
|
||||
if (page > 1) {
|
||||
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.8man.me/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 [];
|
||||
}
|
||||
// console.log(filter);
|
||||
const isPrime = providerValue === "primeMirror" ? "isPrime=true" : "isPrime=false";
|
||||
const url = `https://netmirror.8man.me/api/net-proxy?${isPrime}&url=${baseUrl + filter}`;
|
||||
const res = await fetch(url, {
|
||||
signal: signal,
|
||||
method: "GET",
|
||||
credentials: "omit",
|
||||
});
|
||||
const data = await 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 = async function ({ searchQuery, page, providerValue, signal, providerContext, }) {
|
||||
const { getBaseUrl } = providerContext;
|
||||
try {
|
||||
if (page > 1) {
|
||||
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.8man.me/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 [];
|
||||
}
|
||||
const catalog = [];
|
||||
const baseUrl = await getBaseUrl("nfMirror");
|
||||
const isPrime = providerValue === "primeMirror" ? "isPrime=true" : "isPrime=false";
|
||||
const url = `https://netmirror.8man.me/api/net-proxy?${isPrime}&url=${baseUrl}${providerValue === "netflixMirror" ? "" : "/pv"}/search.php?s=${encodeURI(searchQuery)}`;
|
||||
const res = await fetch(url, {
|
||||
signal: signal,
|
||||
method: "GET",
|
||||
credentials: "omit",
|
||||
});
|
||||
const data = await res.json();
|
||||
data?.searchResult?.forEach((result) => {
|
||||
const title = result?.t || "";
|
||||
const id = 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;
|
||||
|
||||
26
dist/primeMirror/stream.js
vendored
26
dist/primeMirror/stream.js
vendored
@@ -1,25 +1,35 @@
|
||||
"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 = async ({ link: id, providerContext, }) => {
|
||||
const getStream = (_a) => __awaiter(void 0, [_a], void 0, function* ({ link: id, providerContext, }) {
|
||||
const { getBaseUrl } = providerContext;
|
||||
try {
|
||||
let providerValue = "primeMirror";
|
||||
const baseUrl = await getBaseUrl("nfMirror");
|
||||
const baseUrl = yield getBaseUrl("nfMirror");
|
||||
const url = `https://netmirror.8man.me/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 = await fetch(url, {
|
||||
const res = yield fetch(url, {
|
||||
credentials: "omit",
|
||||
});
|
||||
const resJson = await res.json();
|
||||
const data = resJson?.[0];
|
||||
const resJson = yield res.json();
|
||||
const data = resJson === null || resJson === void 0 ? void 0 : resJson[0];
|
||||
const streamLinks = [];
|
||||
data?.sources.forEach((source) => {
|
||||
data === null || data === void 0 ? void 0 : data.sources.forEach((source) => {
|
||||
var _a;
|
||||
streamLinks.push({
|
||||
server: source.label,
|
||||
link: (baseUrl + source.file)?.replace(":su", ":ni"),
|
||||
link: (_a = (baseUrl + source.file)) === null || _a === void 0 ? void 0 : _a.replace(":su", ":ni"),
|
||||
type: "m3u8",
|
||||
headers: {
|
||||
Referer: baseUrl,
|
||||
@@ -35,5 +45,5 @@ const getStream = async ({ link: id, providerContext, }) => {
|
||||
console.error(err);
|
||||
return [];
|
||||
}
|
||||
};
|
||||
});
|
||||
exports.getStream = getStream;
|
||||
|
||||
Reference in New Issue
Block a user