From 4f257189812dd0ed942966dd08319947549106b7 Mon Sep 17 00:00:00 2001 From: Nzix Date: Sun, 24 Feb 2019 22:46:45 +0800 Subject: [PATCH] add hook path --- hook.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hook.js b/hook.js index 9f3158d7..ab4aada6 100644 --- a/hook.js +++ b/hook.js @@ -45,7 +45,9 @@ hook.target.path = [ '/api/v1/search/get', '/api/cloudsearch/pc', '/api/v1/playlist/manipulate/tracks', - '/api/song/like' + '/api/song/like', + '/api/v1/play/record', + '/api/playlist/v4/detail' ] hook.http.before = ctx => { @@ -114,6 +116,7 @@ hook.http.after = ctx => { netease.encrypted = true netease.jsonBody = JSON.parse(crypto.eapi.decrypt(buffer).toString()) } + if(netease.path.includes('manipulate') && [401, 512].includes(netease.jsonBody.code)) return tryCollect(ctx) else if(netease.path == '/api/song/like' && [401, 512].includes(netease.jsonBody.code))