Files
vega-providers/dist/filmyfly/meta.js
himanshu8443 a21dad9698 build
2025-06-16 22:35:39 +05:30

53 lines
1.6 KiB
JavaScript

"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;