UNPKG

rsshub

Version:
20 lines (18 loc) 731 B
import { n as init_esm_shims, t as __dirname } from "./esm-shims-CzJ_djXG.mjs"; import { n as parseRelativeDate } from "./parse-date-BrP7mxXf.mjs"; import { t as art } from "./render-BQo6B4tL.mjs"; import path from "node:path"; //#region lib/routes/javtiful/utils.ts init_esm_shims(); const renderDescription = (data) => art(path.join(__dirname, "templates/description-600566aa.art"), data); const parseItems = (e) => ({ title: e.find("a > img").attr("alt"), link: e.find("a").attr("href"), description: renderDescription({ poster: e.find("a > img").data("src"), previewVideo: e.find("a > span").data("trailer") }), pubDate: parseRelativeDate(e.find(".video-addtime").text()) }); //#endregion export { parseItems as t };