This commit is contained in:
himanshu8443
2025-06-15 21:29:40 +05:30
commit 3f3e12f5df
299 changed files with 18729 additions and 0 deletions

18
dist/filmyfly/ffCatalog.js vendored Normal file
View File

@@ -0,0 +1,18 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ffGenresList = exports.ffCatalog = void 0;
exports.ffCatalog = [
{
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.ffGenresList = [];

33
dist/filmyfly/ffGetEpisodes.js vendored Normal file
View File

@@ -0,0 +1,33 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ffEpisodeLinks = void 0;
const ffEpisodeLinks = async function ({ url, providerContext, }) {
try {
const headers = providerContext.commonHeaders;
const { axios, cheerio } = providerContext;
const res = await axios.get(url, { headers });
const data = res.data;
const $ = cheerio.load(data);
const episodeLinks = [];
$('.dlink.dl').map((i, element) => {
const title = $(element)
.find('a')
.text()
?.replace('Download', '')
?.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.ffEpisodeLinks = ffEpisodeLinks;

52
dist/filmyfly/ffGetMeta.js vendored Normal file
View File

@@ -0,0 +1,52 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ffGetInfo = void 0;
const ffGetInfo = async function ({ link, providerContext, }) {
try {
const { axios, cheerio, commonHeaders: headers } = providerContext;
const url = link;
const res = await 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.ffGetInfo = ffGetInfo;

46
dist/filmyfly/ffGetPosts.js vendored Normal file
View File

@@ -0,0 +1,46 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ffGetPostsSearch = exports.ffGetPosts = void 0;
const ffGetPosts = async function ({ filter, page, signal, providerContext, }) {
const { getBaseUrl } = providerContext;
const baseUrl = await getBaseUrl('filmyfly');
const url = `${baseUrl + filter}/${page}`;
return posts({ url, signal, baseUrl, providerContext });
};
exports.ffGetPosts = ffGetPosts;
const ffGetPostsSearch = async function ({ searchQuery, page, signal, providerContext, }) {
const { getBaseUrl } = providerContext;
const baseUrl = await getBaseUrl('filmyfly');
const url = `${baseUrl}/site-1.html?to-search=${searchQuery}`;
if (page > 1) {
return [];
}
return posts({ url, signal, baseUrl, providerContext });
};
exports.ffGetPostsSearch = ffGetPostsSearch;
async function posts({ url, signal, baseUrl, providerContext, }) {
try {
const { cheerio, commonHeaders: headers } = providerContext;
const res = await fetch(url, { headers, signal });
const data = await 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 [];
}
}

40
dist/filmyfly/ffGetStream.js vendored Normal file
View File

@@ -0,0 +1,40 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ffGetStream = void 0;
const ffGetStream = async function ({ link, signal, providerContext, }) {
try {
const res = await 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(async (element) => {
const title = $(element).text();
let link = $(element).attr('href');
if (title.includes('GDFLIX') && link) {
const gdLinks = await 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',
});
}
});
await Promise.all(promises);
return streams;
}
catch (err) {
console.error(err);
return [];
}
};
exports.ffGetStream = ffGetStream;

17
dist/filmyfly/index.js vendored Normal file
View File

@@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.filmyfly = void 0;
const ffCatalog_1 = require("./ffCatalog");
const ffGetEpisodes_1 = require("./ffGetEpisodes");
const ffGetMeta_1 = require("./ffGetMeta");
const ffGetPosts_1 = require("./ffGetPosts");
const ffGetStream_1 = require("./ffGetStream");
exports.filmyfly = {
catalog: ffCatalog_1.ffCatalog,
genres: ffCatalog_1.ffGenresList,
GetHomePosts: ffGetPosts_1.ffGetPosts,
GetMetaData: ffGetMeta_1.ffGetInfo,
GetSearchPosts: ffGetPosts_1.ffGetPostsSearch,
GetEpisodeLinks: ffGetEpisodes_1.ffEpisodeLinks,
GetStream: ffGetStream_1.ffGetStream,
};