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:
18
dist/filmyfly/catalog.js
vendored
Normal file
18
dist/filmyfly/catalog.js
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
"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
Normal file
33
dist/filmyfly/episodes.js
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
"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;
|
||||
52
dist/filmyfly/meta.js
vendored
Normal file
52
dist/filmyfly/meta.js
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
"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
Normal file
46
dist/filmyfly/posts.js
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
"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
Normal file
40
dist/filmyfly/stream.js
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
"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