mirror of
https://github.com/vega-org/vega-providers.git
synced 2026-04-17 23:51:44 +00:00
build
This commit is contained in:
18
dist/filmyfly/catalog.js
vendored
18
dist/filmyfly/catalog.js
vendored
@@ -1,18 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.genres = exports.catalog = void 0;
|
||||
exports.catalog = [
|
||||
{
|
||||
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.genres = [];
|
||||
33
dist/filmyfly/episodes.js
vendored
33
dist/filmyfly/episodes.js
vendored
@@ -1,33 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getEpisodes = void 0;
|
||||
const getEpisodes = 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.getEpisodes = getEpisodes;
|
||||
18
dist/filmyfly/ffCatalog.js
vendored
18
dist/filmyfly/ffCatalog.js
vendored
@@ -1,18 +0,0 @@
|
||||
"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
33
dist/filmyfly/ffGetEpisodes.js
vendored
@@ -1,33 +0,0 @@
|
||||
"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
52
dist/filmyfly/ffGetMeta.js
vendored
@@ -1,52 +0,0 @@
|
||||
"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
46
dist/filmyfly/ffGetPosts.js
vendored
@@ -1,46 +0,0 @@
|
||||
"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
40
dist/filmyfly/ffGetStream.js
vendored
@@ -1,40 +0,0 @@
|
||||
"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
17
dist/filmyfly/index.js
vendored
@@ -1,17 +0,0 @@
|
||||
"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,
|
||||
};
|
||||
52
dist/filmyfly/meta.js
vendored
52
dist/filmyfly/meta.js
vendored
@@ -1,52 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getMeta = void 0;
|
||||
const getMeta = 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.getMeta = getMeta;
|
||||
46
dist/filmyfly/posts.js
vendored
46
dist/filmyfly/posts.js
vendored
@@ -1,46 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getSearchPosts = exports.getPosts = void 0;
|
||||
const getPosts = 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.getPosts = getPosts;
|
||||
const getSearchPosts = 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.getSearchPosts = getSearchPosts;
|
||||
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/stream.js
vendored
40
dist/filmyfly/stream.js
vendored
@@ -1,40 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getStream = void 0;
|
||||
const getStream = 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.getStream = getStream;
|
||||
Reference in New Issue
Block a user