UNPKG

rsshub

Version:
52 lines (50 loc) 1.7 kB
import "./esm-shims-CzJ_djXG.mjs"; import { t as config } from "./config-C37vj7VH.mjs"; import "./dist-BInvbO1W.mjs"; import "./logger-Czu8UMNd.mjs"; import "./ofetch-BIyrKU3Y.mjs"; import "./cache-Bo__VnGm.mjs"; import "./render-BQo6B4tL.mjs"; import { t as config_not_found_default } from "./config-not-found-Dyp3RlZZ.mjs"; import { n as getFollowingsItems } from "./utils-BrYAWfDx.mjs"; //#region lib/routes/skeb/following-works.ts const route = { path: "/following_works/:username", categories: ["picture"], example: "/skeb/following_works/@brm2_1925", parameters: { username: "Skeb Username with @" }, features: { requireConfig: [{ name: "SKEB_BEARER_TOKEN", optional: false, description: "在瀏覽器開發者工具(F12)的主控台中輸入 `localStorage.getItem(\"token\")` 獲取" }], requirePuppeteer: false, antiCrawler: false, supportBT: false, supportPodcast: false, supportScihub: false, nsfw: true }, name: "Following Works", maintainers: ["SnowAgar25"], handler, radar: [{ title: "Following Works", source: ["skeb.jp/:username"], target: "/following_works/:username" }], description: "Get the latest works for the specified user's followings on Skeb." }; async function handler(ctx) { const username = ctx.req.param("username"); if (!config.skeb || !config.skeb.bearerToken) throw new config_not_found_default("Skeb followings RSS is disabled due to the lack of relevant config"); const items = await getFollowingsItems(username, "following_works"); return { title: `Skeb - ${username} - フォロー中のクリエイターの新着作品`, link: `https://skeb.jp/${username}`, item: items }; } //#endregion export { route };