UNPKG

rsshub

Version:
51 lines (49 loc) 1.67 kB
import "./dist-Bog6z_OM.mjs"; import { t as config } from "./config-MQ-7ebJ_.mjs"; import "./logger-C4avouvV.mjs"; import "./ofetch-DKl_Ma9g.mjs"; import "./is-worker-DESPicPc.mjs"; import "./cache-SV6W5EPy.mjs"; import { t as config_not_found_default } from "./config-not-found-zoFMPvbz.mjs"; import { n as getFollowingsItems } from "./utils-B74DzQJC.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 };