diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 5e0c953e4bbb916072072a6b182aa1cedbca32a7..e71c9401cc1bc9615a72b3882f9a96987e7b366a 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -1,5 +1,9 @@ # 更新日志 +### 2.8.6 | 2018.01.16 + +修复歌单详情接口数据不完整的问题 + ### 2.8.5 | 2018.01.16 修复评论点赞失败的问题 diff --git a/package.json b/package.json index b014d80856699a2955d9b15cd2560d32a50396e1..1cfc1ea3b54feaeb9cbe0ed0dfec0f16542ff49d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "NeteaseCloudMusicApi", - "version": "2.8.5", + "version": "2.8.6", "description": "网易云音乐 NodeJS 版 API", "scripts": { "start": "node app.js", diff --git a/router/playlist_detail.js b/router/playlist_detail.js index f8652fd02170bf8cb44ce2c661d988407aff2496..d075854c2602a4d272d92b00d34c64f598f6981b 100644 --- a/router/playlist_detail.js +++ b/router/playlist_detail.js @@ -7,6 +7,7 @@ router.get("/", (req, res) => { const cookie = req.get("Cookie") ? req.get("Cookie") : ""; const data = { id: req.query.id, + n: 100000, csrf_token: "" }; @@ -17,44 +18,14 @@ router.get("/", (req, res) => { data, cookie, music_req => { - // console.log(music_req) + // console.log(JSON.parse(music_req).playlist.tracks.length) + // console.log(JSON.parse(music_req).playlist.trackIds.length) res.send(music_req); }, err => { res.status(502).send("fetch error"); } ); - - // FIXME:i dont know the api to get coverimgurl - // so i get it by parsing html - // const http_client = http.get({ - // hostname: 'music.163.com', - // path: '/playlist?id=' + req.query.id, - // headers: { - // 'Referer': 'http://music.163.com', - // }, - // }, function (res) { - // res.setEncoding('utf8') - // let html = '' - // res.on('data', function (chunk) { - // html += chunk - // }) - // res.on('end', function () { - // console.log('end', html) - // const regImgCover = /\ x.replace(/.music.163.com/g, "")).sort((a, b) => a.length - b.length) + cookie = cookie + .map(x => x.replace(/.music.163.com/g, "")) + .sort((a, b) => a.length - b.length); } callback(body, cookie); }