UNPKG

rsshub

Version:
66 lines (64 loc) 1.75 kB
import "./esm-shims-CzJ_djXG.mjs"; import "./config-C37vj7VH.mjs"; import "./dist-BInvbO1W.mjs"; import "./logger-Czu8UMNd.mjs"; import { t as ofetch_default } from "./ofetch-BIyrKU3Y.mjs"; import { t as parseDate } from "./parse-date-BrP7mxXf.mjs"; //#region lib/routes/chub/characters.ts const route = { path: "/characters", categories: ["new-media"], example: "/chub/characters", name: "Characters", maintainers: ["flameleaf"], handler, features: { nsfw: true } }; async function handler() { const hostURL = "https://www.chub.ai/characters"; const { data } = await ofetch_default("https://api.chub.ai/search", { headers: { Accept: "application/json" }, query: { search: "", first: 200, page: 1, sort: "last_activity_at", asc: "false", include_forks: "false", nsfw: "true", nsfl: "true", nsfw_only: "false", require_images: "false", require_example_dialogues: "false", require_alternate_greetings: "false", require_custom_prompt: "false", exclude_mine: "false", min_tokens: 50, require_expressions: "false", require_lore: "false", mine_first: "false", require_lore_embedded: "false", require_lore_linked: "false", inclusive_or: "false", recommended_verified: "false" } }); return { allowEmpty: true, title: "Chub", link: hostURL, item: data.nodes.map((item) => ({ title: item.name, description: `${item.tagline}<br><br>${item.description}`, pubDate: parseDate(item.createdAt), updated: parseDate(item.lastActivityAt), link: `${hostURL}/${item.fullPath}`, author: String(item.fullPath.split("/", 1)), enclosure_url: item.avatar_url, enclosure_type: `image/webp`, category: item.topics })) }; } //#endregion export { route };