Skip to content

Commit

Permalink
新增歌曲相关视频接口
Browse files Browse the repository at this point in the history
  • Loading branch information
kengwang committed Aug 23, 2021
1 parent 077a347 commit d8bdb40
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3486,6 +3486,20 @@ type='1009' 获取其 id, 如`/search?keywords= 代码时间 &type=1009`

**调用例子 :** `/musician/sign`

### 歌曲相关视频

说明: 可以调用此接口获取歌曲相关视频 (区别于 MV), 有些歌曲没有 MV 但是有用户上传的与此歌曲相关的 Mlog。 此功能仅在 网易云音乐 APP上存在。

请注意:此接口偶尔会在相关视频后返回不相关视频,请合理使用。
<!-- 说点实在的, 某些番剧的 OP/ED 歌曲可以通过此接口获取热心用户上传的视频版 -->

**必选参数 :** `songid` : 歌曲ID

**可选参数 :** `mvid` : 如果定义,此 mvid 对应的 MV 将会作为第一个返回。
`limit` : 取出的 Mlog 数量, 不包含第一个 mvid

**接口地址 :** `/mlog/music/rcmd`

## 离线访问此文档

此文档同时也是 Progressive Web Apps(PWA), 加入了 serviceWorker, 可离线访问
Expand Down
23 changes: 23 additions & 0 deletions module/mlog_music_rcmd.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// 歌曲相关视频

module.exports = (query, request) => {
const data = {
id: query.mvid || 0,
type: 2,
rcmdType: 20,
limit: query.limit || 10,
extInfo: JSON.stringify({ songId: query.songid }),
}
return request(
'POST',
`https://interface.music.163.com/eapi/mlog/rcmd/feed/list`,
data,
{
crypto: 'eapi',
cookie: query.cookie,
proxy: query.proxy,
url: '/api/mlog/rcmd/feed/list',
realIP: query.realIP,
},
)
}

0 comments on commit d8bdb40

Please sign in to comment.