This commit is contained in:
himanshu8443
2025-06-17 21:32:50 +05:30
parent 1b23125dfd
commit a2afb200ad
264 changed files with 0 additions and 16201 deletions

View File

@@ -1,18 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.genres = exports.catalog = void 0;
exports.catalog = [
{
title: "Home",
filter: "",
},
{
title: "Movies",
filter: "/movie",
},
{
title: "TV Shows",
filter: "/tv",
},
];
exports.genres = [];

View File

@@ -1,43 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getEpisodes = void 0;
const getEpisodes = async function ({ url: id, providerContext, }) {
const { axios } = providerContext;
try {
const [fileId, febboxId] = id.split("&");
const febLink = febboxId
? `https://www.febbox.com/file/file_share_list?share_key=${fileId}&pwd=&parent_id=${febboxId}&is_html=0`
: `https://www.febbox.com/file/file_share_list?share_key=${fileId}&pwd=&is_html=0`;
const res = await axios.get(febLink);
const data = res.data;
const fileList = data.data.file_list;
const episodeLinks = [];
fileList?.map((file) => {
const fileName = formatEpisodeName(file.file_name);
const epId = file?.fid;
if (!file.is_dir && fileName && epId) {
episodeLinks.push({
title: fileName,
link: `${fileId}&${epId}`,
});
}
});
return episodeLinks;
}
catch (err) {
return [];
}
};
exports.getEpisodes = getEpisodes;
function formatEpisodeName(title) {
const regex = /[sS](\d+)\s*[eE](\d+)/;
const match = title.match(regex);
if (match) {
const season = match[1].padStart(2, "0");
const episode = match[2].padStart(2, "0");
return `Season${season} Episode${episode}`;
}
else {
return title;
}
}

17
dist/showbox/index.js vendored
View File

@@ -1,17 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.showBox = void 0;
const sbCatalog_1 = require("./sbCatalog");
const sbGetEpisodeList_1 = require("./sbGetEpisodeList");
const sbGetMeta_1 = require("./sbGetMeta");
const sbGetPosts_1 = require("./sbGetPosts");
const sbGetStream_1 = require("./sbGetStream");
exports.showBox = {
catalog: sbCatalog_1.catalogList,
genres: sbCatalog_1.sbGenresList,
GetMetaData: sbGetMeta_1.sbGetInfo,
GetHomePosts: sbGetPosts_1.sbGetPosts,
GetStream: sbGetStream_1.sbGetStream,
GetSearchPosts: sbGetPosts_1.sbGetPostsSearch,
GetEpisodeLinks: sbGetEpisodeList_1.sbGetEpisodeLinks,
};

65
dist/showbox/meata.js vendored
View File

@@ -1,65 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getMeta = void 0;
const getMeta = async function ({ link, providerContext, }) {
try {
const { axios, cheerio } = providerContext;
const url = link;
const res = await axios.get(url);
const data = res.data;
const $ = cheerio.load(data);
const type = url.includes("tv") ? "series" : "movie";
const imdbId = "";
const title = $(".heading-name").text();
const rating = $(".btn-imdb")
.text()
?.match(/\d+(\.\d+)?/g)?.[0] || "";
const image = $(".cover_follow").attr("style")?.split("url(")[1]?.split(")")[0] || "";
const synopsis = $(".description")
.text()
?.replace(/[\n\t]/g, "")
?.trim();
const febID = $(".heading-name").find("a").attr("href")?.split("/")?.pop();
const baseUrl = url.split("/").slice(0, 3).join("/");
const indexUrl = `${baseUrl}/index/share_link?id=${febID}&type=${type === "movie" ? "1" : "2"}`;
const indexRes = await axios.get(indexUrl);
const indexData = indexRes.data;
const febKey = indexData.data.link.split("/").pop();
const febLink = `https://www.febbox.com/file/file_share_list?share_key=${febKey}&is_html=0`;
const febRes = await axios.get(febLink);
const febData = febRes.data;
const fileList = febData?.data?.file_list;
const links = [];
if (fileList) {
fileList.map((file) => {
const fileName = `${file.file_name} (${file.file_size})`;
const fileId = file.fid;
links.push({
title: fileName,
episodesLink: file.is_dir ? `${febKey}&${fileId}` : `${febKey}&`,
});
});
}
return {
title,
rating,
synopsis,
image,
imdbId,
type,
linkList: links,
};
}
catch (err) {
return {
title: "",
rating: "",
synopsis: "",
image: "",
imdbId: "",
type: "",
linkList: [],
};
}
};
exports.getMeta = getMeta;

47
dist/showbox/posts.js vendored
View File

@@ -1,47 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getSearchPosts = exports.getPosts = void 0;
const getPosts = async function ({ filter, page,
// providerValue,
signal, providerContext, }) {
const { getBaseUrl, axios, cheerio } = providerContext;
const baseUrl = await getBaseUrl("showbox");
const url = `${baseUrl + filter}?page=${page}/`;
return posts({ url, signal, baseUrl, axios, cheerio });
};
exports.getPosts = getPosts;
const getSearchPosts = async function ({ searchQuery, page,
// providerValue,
signal, providerContext, }) {
const { getBaseUrl, axios, cheerio } = providerContext;
const baseUrl = await getBaseUrl("showbox");
const url = `${baseUrl}/search?keyword=${searchQuery}&page=${page}`;
return posts({ url, signal, baseUrl, axios, cheerio });
};
exports.getSearchPosts = getSearchPosts;
async function posts({ url, signal,
// baseUrl,
axios, cheerio, }) {
try {
const res = await axios.get(url, { signal });
const data = res.data;
const $ = cheerio.load(data);
const catalog = [];
$(".movie-item").map((i, element) => {
const title = $(element).find(".movie-title").text();
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) {
return [];
}
}

View File

@@ -1,18 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.sbGenresList = exports.catalogList = void 0;
exports.catalogList = [
{
title: 'Home',
filter: '',
},
{
title: 'Movies',
filter: '/movie',
},
{
title: 'TV Shows',
filter: '/tv',
},
];
exports.sbGenresList = [];

View File

@@ -1,43 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.sbGetEpisodeLinks = void 0;
const sbGetEpisodeLinks = async function ({ url: id, providerContext, }) {
const { axios } = providerContext;
try {
const [fileId, febboxId] = id.split('&');
const febLink = febboxId
? `https://www.febbox.com/file/file_share_list?share_key=${fileId}&pwd=&parent_id=${febboxId}&is_html=0`
: `https://www.febbox.com/file/file_share_list?share_key=${fileId}&pwd=&is_html=0`;
const res = await axios.get(febLink);
const data = res.data;
const fileList = data.data.file_list;
const episodeLinks = [];
fileList?.map((file) => {
const fileName = formatEpisodeName(file.file_name);
const epId = file?.fid;
if (!file.is_dir && fileName && epId) {
episodeLinks.push({
title: fileName,
link: `${fileId}&${epId}`,
});
}
});
return episodeLinks;
}
catch (err) {
return [];
}
};
exports.sbGetEpisodeLinks = sbGetEpisodeLinks;
function formatEpisodeName(title) {
const regex = /[sS](\d+)\s*[eE](\d+)/;
const match = title.match(regex);
if (match) {
const season = match[1].padStart(2, '0');
const episode = match[2].padStart(2, '0');
return `Season${season} Episode${episode}`;
}
else {
return title;
}
}

View File

@@ -1,65 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.sbGetInfo = void 0;
const sbGetInfo = async function ({ link, providerContext, }) {
try {
const { axios, cheerio } = providerContext;
const url = link;
const res = await axios.get(url);
const data = res.data;
const $ = cheerio.load(data);
const type = url.includes('tv') ? 'series' : 'movie';
const imdbId = '';
const title = $('.heading-name').text();
const rating = $('.btn-imdb')
.text()
?.match(/\d+(\.\d+)?/g)?.[0] || '';
const image = $('.cover_follow').attr('style')?.split('url(')[1]?.split(')')[0] || '';
const synopsis = $('.description')
.text()
?.replaceAll(/[\n\t]/g, '')
?.trim();
const febID = $('.heading-name').find('a').attr('href')?.split('/')?.pop();
const baseUrl = url.split('/').slice(0, 3).join('/');
const indexUrl = `${baseUrl}/index/share_link?id=${febID}&type=${type === 'movie' ? '1' : '2'}`;
const indexRes = await axios.get(indexUrl);
const indexData = indexRes.data;
const febKey = indexData.data.link.split('/').pop();
const febLink = `https://www.febbox.com/file/file_share_list?share_key=${febKey}&is_html=0`;
const febRes = await axios.get(febLink);
const febData = febRes.data;
const fileList = febData?.data?.file_list;
const links = [];
if (fileList) {
fileList.map((file) => {
const fileName = `${file.file_name} (${file.file_size})`;
const fileId = file.fid;
links.push({
title: fileName,
episodesLink: file.is_dir ? `${febKey}&${fileId}` : `${febKey}&`,
});
});
}
return {
title,
rating,
synopsis,
image,
imdbId,
type,
linkList: links,
};
}
catch (err) {
return {
title: '',
rating: '',
synopsis: '',
image: '',
imdbId: '',
type: '',
linkList: [],
};
}
};
exports.sbGetInfo = sbGetInfo;

View File

@@ -1,47 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.sbGetPostsSearch = exports.sbGetPosts = void 0;
const sbGetPosts = async function ({ filter, page,
// providerValue,
signal, providerContext, }) {
const { getBaseUrl, axios, cheerio } = providerContext;
const baseUrl = await getBaseUrl('showbox');
const url = `${baseUrl + filter}?page=${page}/`;
return posts({ url, signal, baseUrl, axios, cheerio });
};
exports.sbGetPosts = sbGetPosts;
const sbGetPostsSearch = async function ({ searchQuery, page,
// providerValue,
signal, providerContext, }) {
const { getBaseUrl, axios, cheerio } = providerContext;
const baseUrl = await getBaseUrl('showbox');
const url = `${baseUrl}/search?keyword=${searchQuery}&page=${page}`;
return posts({ url, signal, baseUrl, axios, cheerio });
};
exports.sbGetPostsSearch = sbGetPostsSearch;
async function posts({ url, signal,
// baseUrl,
axios, cheerio, }) {
try {
const res = await axios.get(url, { signal });
const data = res.data;
const $ = cheerio.load(data);
const catalog = [];
$('.movie-item').map((i, element) => {
const title = $(element).find('.movie-title').text();
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) {
return [];
}
}

View File

@@ -1,70 +0,0 @@
"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;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.sbGetStream = void 0;
const cheerio = __importStar(require("cheerio"));
const sbGetStream = async function ({ link: id,
// type,
signal, providerContext, }) {
try {
const { axios } = providerContext;
const stream = [];
const [, epId] = id.split('&');
const url = `https://febbox.vercel.app/api/video-quality?fid=${epId}`;
const res = await axios.get(url, { signal });
const data = res.data;
const $ = cheerio.load(data.html);
$('.file_quality').each((i, el) => {
const server = $(el).find('p.name').text() +
' - ' +
$(el).find('p.size').text() +
' - ' +
$(el).find('p.speed').text();
const link = $(el).attr('data-url');
if (link) {
stream.push({
server: server,
type: 'mkv',
link: link,
});
}
});
return stream;
}
catch (err) {
return [];
}
};
exports.sbGetStream = sbGetStream;

View File

@@ -1,70 +0,0 @@
"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;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.getStream = void 0;
const cheerio = __importStar(require("cheerio"));
const getStream = async function ({ link: id,
// type,
signal, providerContext, }) {
try {
const { axios } = providerContext;
const stream = [];
const [, epId] = id.split("&");
const url = `https://febbox.vercel.app/api/video-quality?fid=${epId}`;
const res = await axios.get(url, { signal });
const data = res.data;
const $ = cheerio.load(data.html);
$(".file_quality").each((i, el) => {
const server = $(el).find("p.name").text() +
" - " +
$(el).find("p.size").text() +
" - " +
$(el).find("p.speed").text();
const link = $(el).attr("data-url");
if (link) {
stream.push({
server: server,
type: "mkv",
link: link,
});
}
});
return stream;
}
catch (err) {
return [];
}
};
exports.getStream = getStream;