feat: [radar] add 网易云音乐/腾讯视频规则 (#6922)

This commit is contained in:
YsMox
2021-02-14 22:11:47 -05:00
committed by GitHub
parent 06184a2cee
commit 508a47a506
2 changed files with 54 additions and 5 deletions
+49
View File
@@ -1156,6 +1156,44 @@
target: '/open163/latest',
},
],
music: [
{
title: '云音乐 - 用户歌单',
docs: 'https://docs.rsshub.app/multimedia.html#wang-yi-yun-yin-yue',
source: '/',
target: (params, url) => {
const id = new URL(url).hash.match(/home\?id=(.*)/)[1];
return id ? `/ncm/user/playlist/${id}` : '';
}
},
{
title: '云音乐 - 歌单歌曲',
docs: 'https://docs.rsshub.app/multimedia.html#wang-yi-yun-yin-yue',
source: '/',
target: (params, url) => {
const id = new URL(url).hash.match(/playlist\?id=(.*)/)[1];
return id ? `/ncm/playlist/${id}` : '';
}
},
{
title: '云音乐 - 歌手专辑',
docs: 'https://docs.rsshub.app/multimedia.html#wang-yi-yun-yin-yue',
source: '/',
target: (params, url) => {
const id = new URL(url).hash.match(/album\?id=(.*)/)[1];
return id ? `/ncm/artist/${id}` : '';
}
},
{
title: '云音乐 - 电台节目',
docs: 'https://docs.rsshub.app/multimedia.html#wang-yi-yun-yin-yue',
source: '/',
target: (params, url) => {
const id = new URL(url).hash.match(/djradio\?id=(.*)/)[1];
return id ? `/ncm/djradio/${id}` : '';
}
},
],
},
'suzhou.gov.cn': {
_name: '苏州市政府',
@@ -1935,6 +1973,17 @@
},
},
],
v: [
{
title: '视频 - 播放列表',
docs: 'https://docs.rsshub.app/multimedia.html#teng-xun-shi-pin',
source: '/detail/:type/:id',
target: (params) => {
const id = params.id.match('(.*).html')[1];
return id ? `/tencentvideo/playlist/${id}` : '';
}
},
]
},
'javbus.com': {
_name: 'JavBus',
+5 -5
View File
@@ -894,25 +894,25 @@ pageClass: routes
### 播放列表
<Route author="Andiedie" example="/tencentvideo/playlist/jx7g4sm320sqm7i" path="/tencentvideo/playlist/:id" :paramsDesc="['播放列表 ID,可以在 URL 中找到']" />
<Route author="Andiedie" example="/tencentvideo/playlist/jx7g4sm320sqm7i" path="/tencentvideo/playlist/:id" :paramsDesc="['播放列表 ID,可以在 URL 中找到']" radar="1" />
## 网易云音乐
### 歌单歌曲
<Route author="DIYgod" example="/ncm/playlist/35798529" path="/ncm/playlist/:id" :paramsDesc="['歌单 id, 可在歌单页 URL 中找到']"/>
<Route author="DIYgod" example="/ncm/playlist/35798529" path="/ncm/playlist/:id" :paramsDesc="['歌单 id, 可在歌单页 URL 中找到']" radar="1" />
### 用户歌单
<Route author="DIYgod" example="/ncm/user/playlist/45441555" path="/ncm/user/playlist/:uid" :paramsDesc="['用户 uid, 可在用户主页 URL 中找到']"/>
<Route author="DIYgod" example="/ncm/user/playlist/45441555" path="/ncm/user/playlist/:uid" :paramsDesc="['用户 uid, 可在用户主页 URL 中找到']" radar="1" />
### 歌手专辑
<Route author="metowolf" example="/ncm/artist/2116" path="/ncm/artist/:id" :paramsDesc="[' 歌手 id, 可在歌手详情页 URL 中找到']"/>
<Route author="metowolf" example="/ncm/artist/2116" path="/ncm/artist/:id" :paramsDesc="[' 歌手 id, 可在歌手详情页 URL 中找到']" radar="1" />
### 电台节目
<Route author="magic-akari" example="/ncm/djradio/347317067" path="/ncm/djradio/:id" :paramsDesc="['节目 id, 可在电台节目页 URL 中找到']" supportPodcast="1" />
<Route author="magic-akari" example="/ncm/djradio/347317067" path="/ncm/djradio/:id" :paramsDesc="['节目 id, 可在电台节目页 URL 中找到']" supportPodcast="1" radar="1" />
## 西瓜视频