mirror of
https://gitlab.com/Binaryify/neteasecloudmusicapi.git
synced 2025-05-23 22:37:41 +08:00
相似歌手
,首页-发现-圆形图标入口列表
接口增加匿名token #877,#988,修复音乐 url
接口POST方式手动传入cookie报错问题 #1005
This commit is contained in:
parent
f4a3a9cc72
commit
65e32eec77
@ -1,4 +1,9 @@
|
|||||||
# 更新日志
|
# 更新日志
|
||||||
|
### 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
|
### 3.45.2 | 2020.10.26
|
||||||
- 云贝完成任务接口增加`depositCode`参数
|
- 云贝完成任务接口增加`depositCode`参数
|
||||||
|
|
||||||
|
@ -2,7 +2,13 @@
|
|||||||
// 这个接口为移动端接口,首页-发现页(每日推荐、歌单、排行榜 那些入口)
|
// 这个接口为移动端接口,首页-发现页(每日推荐、歌单、排行榜 那些入口)
|
||||||
// 数据结构可以参考 https://github.com/hcanyz/flutter-netease-music-api/blob/master/lib/src/api/uncategorized/bean.dart#L290 HomeDragonBallWrap
|
// 数据结构可以参考 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) => {
|
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 = {}
|
const data = {}
|
||||||
return request(
|
return request(
|
||||||
'POST',
|
'POST',
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
// 相似歌手
|
// 相似歌手
|
||||||
|
const config = require('../util/config')
|
||||||
module.exports = (query, request) => {
|
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 = {
|
const data = {
|
||||||
artistid: query.id,
|
artistid: query.id,
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,11 @@
|
|||||||
// 歌曲链接
|
// 歌曲链接
|
||||||
|
|
||||||
const crypto = require('crypto')
|
const crypto = require('crypto')
|
||||||
|
const { cookieToJson } = require('../util/index')
|
||||||
module.exports = (query, request) => {
|
module.exports = (query, request) => {
|
||||||
|
if (typeof query.cookie === 'string') {
|
||||||
|
query.cookie = cookieToJson(query.cookie)
|
||||||
|
}
|
||||||
if (!('MUSIC_U' in query.cookie))
|
if (!('MUSIC_U' in query.cookie))
|
||||||
query.cookie._ntes_nuid = crypto.randomBytes(16).toString('hex')
|
query.cookie._ntes_nuid = crypto.randomBytes(16).toString('hex')
|
||||||
query.cookie.os = 'pc'
|
query.cookie.os = 'pc'
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "NeteaseCloudMusicApi",
|
"name": "NeteaseCloudMusicApi",
|
||||||
"version": "3.45.2",
|
"version": "3.45.3",
|
||||||
"description": "网易云音乐 NodeJS 版 API",
|
"description": "网易云音乐 NodeJS 版 API",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node app.js",
|
"start": "node app.js",
|
||||||
|
3
util/config.json
Normal file
3
util/config.json
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"anonymous_token": "8aae43f148f990410b9a2af38324af24e87ab9227c9265627ddd10145db744295fcd8701dc45b1ab8985e142f491516295dd965bae848761274a577a62b0fdc54a50284d1e434dcc04ca6d1a52333c9a"
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user