diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 5e0c953..e71c940 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 b014d80..1cfc1ea 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 f8652fd..d075854 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); }