UNPKG

rsshub

Version:
36 lines (35 loc) 966 B
import { t as rofetch } from "./ofetch-U0CdpE2g.mjs"; import { t as parseDate } from "./parse-date-3kcy2Eau.mjs"; import { load } from "cheerio"; //#region lib/routes/hentaimama/videos.ts const route = { path: "/videos", categories: ["multimedia"], example: "/hentaimama/videos", name: "Recent Videos", maintainers: ["DrakeTDL"], handler }; async function handler() { const link = "https://hentaimama.io/recent-episodes/"; const response = await rofetch(link); const $ = load(response); return { title: "Hentaimama - Recent Videos", link, language: "en-us", item: $(".item.episodes").toArray().map((item) => { const $item = $(item); const date = $item.find(".data span").text(); return { title: $item.find("img").attr("alt") ?? "", description: `<img src="${$item.find("img").attr("data-src")}">`, pubDate: parseDate(date), guid: date, link: $item.find("a").attr("href") }; }) }; } //#endregion export { route };