提交 65e32eec 编写于 作者: B binaryify

`相似歌手`,`首页-发现-圆形图标入口列表`接口增加匿名token #877,#988,修复`音乐 url`接口POST方式手动传入cookie报错问题 #1005

上级 f4a3a9cc
# 更新日志
### 3.45.3 | 2020.11.1
- `相似歌手`,`首页-发现-圆形图标入口列表`接口增加匿名token[#877](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/877) [#988](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/988)
- 修复`音乐 url`接口POST方式手动传入cookie报错问题 [#1005](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/1005)
### 3.45.2 | 2020.10.26
- 云贝完成任务接口增加`depositCode`参数
......
......@@ -2,7 +2,13 @@
// 这个接口为移动端接口,首页-发现页(每日推荐、歌单、排行榜 那些入口)
// 数据结构可以参考 https://github.com/hcanyz/flutter-netease-music-api/blob/master/lib/src/api/uncategorized/bean.dart#L290 HomeDragonBallWrap
// !需要登录或者匿名登录,非登录返回 []
const config = require('../util/config')
module.exports = (query, request) => {
if (typeof query.cookie === 'string') {
query.cookie = cookieToJson(query.cookie)
}
if (!('MUSIC_U' in query.cookie))
query.cookie.MUSIC_A = config.anonymous_token
const data = {}
return request(
'POST',
......
// 相似歌手
const config = require('../util/config')
module.exports = (query, request) => {
if (typeof query.cookie === 'string') {
query.cookie = cookieToJson(query.cookie)
}
if (!('MUSIC_U' in query.cookie))
query.cookie.MUSIC_A = config.anonymous_token
const data = {
artistid: query.id,
}
......
// 歌曲链接
const crypto = require('crypto')
const { cookieToJson } = require('../util/index')
module.exports = (query, request) => {
if (typeof query.cookie === 'string') {
query.cookie = cookieToJson(query.cookie)
}
if (!('MUSIC_U' in query.cookie))
query.cookie._ntes_nuid = crypto.randomBytes(16).toString('hex')
query.cookie.os = 'pc'
......
{
"name": "NeteaseCloudMusicApi",
"version": "3.45.2",
"version": "3.45.3",
"description": "网易云音乐 NodeJS 版 API",
"scripts": {
"start": "node app.js",
......
{
"anonymous_token": "8aae43f148f990410b9a2af38324af24e87ab9227c9265627ddd10145db744295fcd8701dc45b1ab8985e142f491516295dd965bae848761274a577a62b0fdc54a50284d1e434dcc04ca6d1a52333c9a"
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册