mirror of
https://github.com/vega-org/vega-providers.git
synced 2026-04-17 15:41:45 +00:00
unminify
This commit is contained in:
64
dist/filmyfly/meta.js
vendored
64
dist/filmyfly/meta.js
vendored
@@ -1 +1,63 @@
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,i,n){return new(i||(i=Promise))(function(o,r){function a(t){try{c(n.next(t))}catch(t){r(t)}}function s(t){try{c(n.throw(t))}catch(t){r(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(a,s)}c((n=n.apply(t,e||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getMeta=void 0;const getMeta=function(t){return __awaiter(this,arguments,void 0,function*({link:t,providerContext:e}){try{const{axios:i,cheerio:n,commonHeaders:o}=e,r=t,a=(yield i.get(r,{headers:o})).data,s=n.load(a),c=r.includes("tvshows")?"series":"movie",d="",f=s('.fname:contains("Name")').find(".colora").text().trim(),l=s(".ss").find("img").attr("src")||"",u=s('.fname:contains("Description")').find(".colorg").text().trim(),m=s('.fname:contains("Genre")').find(".colorb").text().split(",")||[],p="",h=[],g=s(".dlbtn").find("a").attr("href");return g&&h.push({title:f,episodesLink:g}),{title:f,tags:m,rating:p,synopsis:u,image:l,imdbId:d,type:c,linkList:h}}catch(t){return{title:"",synopsis:"",image:"",imdbId:"",type:"movie",linkList:[]}}})};exports.getMeta=getMeta;
|
||||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getMeta = void 0;
|
||||
const getMeta = function (_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ link, providerContext, }) {
|
||||
try {
|
||||
const { axios, cheerio, commonHeaders: headers } = providerContext;
|
||||
const url = link;
|
||||
const res = yield 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;
|
||||
|
||||
Reference in New Issue
Block a user