UNPKG

rsshub

Version:
37 lines (36 loc) 925 B
import { t as got_default } from "./got-DUpa1V3-.mjs"; import { n as SUB_URL, r as loadArticle, t as SUB_NAME_PREFIX } from "./const-Cgk98ZPd.mjs"; //#region lib/routes/everia/latest.ts const route = { path: "/", categories: ["picture"], example: "/everia", parameters: {}, features: { requireConfig: false, requirePuppeteer: false, antiCrawler: false, supportBT: false, supportPodcast: false, supportScihub: false, nsfw: true }, radar: [{ source: ["everia.club/"], target: "" }], name: "Latest", maintainers: ["KTachibanaM", "AiraNadih"], handler }; async function handler(ctx) { const limit = Number.parseInt(ctx.req.query("limit")) || 20; const { data: posts } = await got_default(`${SUB_URL}wp-json/wp/v2/posts?per_page=${limit}&_embed`); return { title: `${SUB_NAME_PREFIX} - Latest`, link: SUB_URL, item: posts.map((post) => loadArticle(post)) }; } //#endregion export { route };