rsshub
Version:
Make RSS Great Again!
49 lines (47 loc) • 1.43 kB
JavaScript
import "./esm-shims-CzJ_djXG.mjs";
import "./config-C37vj7VH.mjs";
import "./dist-BInvbO1W.mjs";
import "./logger-Czu8UMNd.mjs";
import "./ofetch-BIyrKU3Y.mjs";
import { t as parseDate } from "./parse-date-BrP7mxXf.mjs";
import "./cache-Bo__VnGm.mjs";
import "./helpers-DxBp0Pty.mjs";
import "./got-KxxWdaxq.mjs";
import { t as cache_default } from "./cache-DnVF2qTE.mjs";
//#region lib/routes/qq/kg/reply.ts
const route = {
path: "/kg/reply/:playId",
categories: ["social-media"],
example: "/qq/kg/reply/OhXHMdO1VxLWQOOm",
parameters: { playId: "音频页 ID, 可在对应页面的 URL 中找到" },
features: {
requireConfig: false,
requirePuppeteer: false,
antiCrawler: false,
supportBT: false,
supportPodcast: false,
supportScihub: false
},
name: "用户作品评论动态",
maintainers: ["zhangxiang012"],
handler
};
async function handler(ctx) {
const playId = ctx.req.param("playId");
const url = `https://node.kg.qq.com/play?s=${playId}`;
const play_item = await cache_default.getPlayInfo(ctx, playId, "");
return {
title: `${play_item.name} - ${play_item.author} 的评论`,
link: url,
image: play_item.itunes_item_image,
allowEmpty: true,
item: play_item.comments.map((item) => ({
title: `${item.nick}:${item.content}`,
pubDate: parseDate(item.ctime * 1e3),
link: url,
guid: `ksong:${play_item.ksong_mid}:${item.comment_id}`
}))
};
}
//#endregion
export { route };