微博超话新增按类型获取,如最新帖子、最新评论、热门、精华等 (#8723)

This commit is contained in:
mifang 2022-01-23 03:48:58 +08:00 committed by GitHub
parent 6686292d54
commit 0dda81860a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 6 deletions

View File

@ -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形如 <https://www.youtube.com/feeds/vid
| showAuthorInTitle | 是否在标题处显示作者 | 0/1/true/false | true |
| showAuthorInDesc | 是否在正文处显示作者 | 0/1/true/false | false |
| showAuthorAvatarInDesc | 是否在正文处显示作者头像(若阅读器会提取正文图片,不建议开启) | 0/1/true/false | false |
| showEmojiForRetweet | 显示 “🔁” 取代 “Fw”转发 | 0/1/true/false | false |
| showEmojiForRetweet | 显示 “🔁” 取代 “Fw”转发 | 0/1/true/false | false |
| showRetweetTextInTitle | 在标题出显示转发评论(置为 false 则在标题只显示被转发的广播) | 0/1/true/false | false |
| addLinkForPics | 为图片添加可点击的链接 | 0/1/true/false | false |
| showTimestampInDescription | 在正文处显示广播的时间戳 | 0/1/true/false | false |
@ -1091,7 +1091,7 @@ rule
| showAuthorInTitle | 是否在标题处显示作者 | 0/1/true/false | false`/weibo/keyword/`中为 true |
| showAuthorInDesc | 是否在正文处显示作者 | 0/1/true/false | false`/weibo/keyword/`中为 true |
| showAuthorAvatarInDesc | 是否在正文处显示作者头像(若阅读器会提取正文图片,不建议开启) | 0/1/true/false | false |
| showEmojiForRetweet | 显示 “🔁” 取代 “转发” 两个字 | 0/1/true/false | false |
| showEmojiForRetweet | 显示 “🔁” 取代 “转发” 两个字 | 0/1/true/false | false |
| showRetweetTextInTitle | 在标题出显示转发评论(置为 false 则在标题只显示被转发微博) | 0/1/true/false | true |
| addLinkForPics | 为图片添加可点击的链接 | 0/1/true/false | false |
| showTimestampInDescription | 在正文处显示被转发微博的时间戳 | 0/1/true/false | false |
@ -1126,7 +1126,16 @@ rule
### 超话
<Route author="zengxs" example="/weibo/super_index/1008084989d223732bf6f02f75ea30efad58a9" path="/weibo/super_index/:id/:routeParams?" :paramsDesc="['超话ID', '额外参数;请参阅上面的说明和表格']" anticrawler="1" radar="1" rssbud="1"/>
<Route author="zengxs" example="/weibo/super_index/1008084989d223732bf6f02f75ea30efad58a9/sort_time" path="/weibo/super_index/:id/:type?/:routeParams?" :paramsDesc="['超话ID', '类型:见下表', '额外参数;请参阅上面的说明和表格']" anticrawler="1" radar="1" rssbud="1"/>
| type | 备注 |
| --------- | ---------------- |
| soul | 精华 |
| video | 视频(暂不支持) |
| album | 相册(暂不支持) |
| hot_sort | 热门 |
| sort_time | 最新帖子 |
| feed | 最新评论 |
### 个人时间线

View File

@ -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'));
// 贴吧

View File

@ -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`,
}),