From 0dda81860ae5b8f4fcedd53233e348ac776b133e Mon Sep 17 00:00:00 2001 From: mifang Date: Sun, 23 Jan 2022 03:48:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E5=8D=9A=E8=B6=85=E8=AF=9D=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E6=8C=89=E7=B1=BB=E5=9E=8B=E8=8E=B7=E5=8F=96=EF=BC=8C?= =?UTF-8?q?=E5=A6=82=E6=9C=80=E6=96=B0=E5=B8=96=E5=AD=90=E3=80=81=E6=9C=80?= =?UTF-8?q?=E6=96=B0=E8=AF=84=E8=AE=BA=E3=80=81=E7=83=AD=E9=97=A8=E3=80=81?= =?UTF-8?q?=E7=B2=BE=E5=8D=8E=E7=AD=89=20(#8723)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/social-media.md | 17 +++++++++++++---- lib/router.js | 2 +- lib/routes/weibo/super_index.js | 3 ++- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/docs/social-media.md b/docs/social-media.md index c1dd5159c..338c8aa96 100644 --- a/docs/social-media.md +++ b/docs/social-media.md @@ -628,7 +628,7 @@ Tiny Tiny RSS 会给所有 iframe 元素添加 `sandbox="allow-scripts"` 属性 | showAuthorInDesc | 是否在正文处显示作者 | 0/1/true/false | false(`/twitter/followings` 中为 true) | | showQuotedAuthorAvatarInDesc | 是否在正文处显示被转推的推文的作者头像(若阅读器会提取正文图片,不建议开启) | 0/1/true/false | false | | showAuthorAvatarInDesc | 是否在正文处显示作者头像(若阅读器会提取正文图片,不建议开启) | 0/1/true/false | false | -| showEmojiForRetweetAndReply | 显示 “🔁” 取代 “Rt”、“↩️” 取代 “Re” | 0/1/true/false | false | +| showEmojiForRetweetAndReply | 显示 “🔁” 取代 “Rt”、“↩️” 取代 “Re” | 0/1/true/false | false | | showRetweetTextInTitle | 在标题处显示转推评论(置为 false 则在标题只显示被转推推文) | 0/1/true/false | true | | addLinkForPics | 为图片添加可点击的链接 | 0/1/true/false | false | | showTimestampInDescription | 在正文处显示推特的时间戳 | 0/1/true/false | false | @@ -876,7 +876,7 @@ YouTube 官方亦有提供频道 RSS,形如 + + +| type | 备注 | +| --------- | ---------------- | +| soul | 精华 | +| video | 视频(暂不支持) | +| album | 相册(暂不支持) | +| hot_sort | 热门 | +| sort_time | 最新帖子 | +| feed | 最新评论 | ### 个人时间线 diff --git a/lib/router.js b/lib/router.js index ef94d513f..b3702eaa8 100644 --- a/lib/router.js +++ b/lib/router.js @@ -89,7 +89,7 @@ router.get('/twreporter/category/:cid', lazyloadRouteHandler('./routes/twreporte router.get('/weibo/user/:uid/:routeParams?', lazyloadRouteHandler('./routes/weibo/user')); router.get('/weibo/keyword/:keyword/:routeParams?', lazyloadRouteHandler('./routes/weibo/keyword')); router.get('/weibo/search/hot', lazyloadRouteHandler('./routes/weibo/search/hot')); -router.get('/weibo/super_index/:id/:routeParams?', lazyloadRouteHandler('./routes/weibo/super_index')); +router.get('/weibo/super_index/:id/:type?/:routeParams?', lazyloadRouteHandler('./routes/weibo/super_index')); router.get('/weibo/oasis/user/:userid', lazyloadRouteHandler('./routes/weibo/oasis/user')); // 贴吧 diff --git a/lib/routes/weibo/super_index.js b/lib/routes/weibo/super_index.js index 8d1d1ad01..914ee2e08 100644 --- a/lib/routes/weibo/super_index.js +++ b/lib/routes/weibo/super_index.js @@ -5,10 +5,11 @@ const queryString = require('query-string'); module.exports = async (ctx) => { const id = ctx.params.id; + const type = ctx.params.type ?? 'feed'; const res = await got.get('https://m.weibo.cn/api/container/getIndex', { searchParams: queryString.stringify({ - containerid: `${id}_-_feed`, + containerid: `${id}_-_${type}`, luicode: '10000011', lfid: `${id}_-_main`, }),