chore(docs): improve radar/rssbud support for weibo (#6832)

* feat: detect weibo uid in url

* feat: support weibo.cn

* docs: add weibo rssbud support
This commit is contained in:
cayZ
2021-02-03 21:33:36 -05:00
committed by GitHub
parent f156c104d0
commit e20c4381fb
2 changed files with 16 additions and 2 deletions
+15 -1
View File
@@ -96,7 +96,10 @@
docs: 'https://docs.rsshub.app/social-media.html#wei-bo',
source: ['/u/:id', '/:id'],
target: (params, url, document) => {
const uid = document && document.documentElement.innerHTML.match(/\$CONFIG\['oid']='(\d+)'/)[1];
let uid = document && document.documentElement.innerHTML.match(/\$CONFIG\['oid']='(\d+)'/)[1];
if (!uid && !isNaN(params.id)) {
uid = params.id;
}
return uid ? `/weibo/user/${uid}` : '';
},
},
@@ -120,6 +123,17 @@
},
],
},
'weibo.cn': {
_name: '微博',
'm': [
{
title: '博主',
docs: 'https://docs.rsshub.app/social-media.html#wei-bo',
source: ['/u/:uid', '/profile/:uid'],
target: '/weibo/user/:uid',
}
]
},
'pixiv.net': {
_name: 'Pixiv',
www: [
+1 -1
View File
@@ -999,7 +999,7 @@ rule
### 博主
<Route author="DIYgod iplusx" example="/weibo/user/1195230310" path="/weibo/user/:uid/:routeParams?" :paramsDesc="['用户 id, 博主主页打开控制台执行 `$CONFIG.oid` 获取', '额外参数;请参阅上面的说明和表格;特别地,当 `routeParams=1` 时开启微博视频显示']" anticrawler="1" radar="1">
<Route author="DIYgod iplusx" example="/weibo/user/1195230310" path="/weibo/user/:uid/:routeParams?" :paramsDesc="['用户 id, 博主主页打开控制台执行 `$CONFIG.oid` 获取', '额外参数;请参阅上面的说明和表格;特别地,当 `routeParams=1` 时开启微博视频显示']" anticrawler="1" radar="1" rssbud="1">
部分博主仅登录可见,不支持订阅,可以通过打开 `https://m.weibo.cn/u/:uid` 验证