From 37bad1cc337d0b8ca5010c646a6069ed6563a5aa Mon Sep 17 00:00:00 2001 From: binaryify Date: Sun, 10 Sep 2023 11:41:18 +0800 Subject: [PATCH] =?UTF-8?q?update:=20NMTID=20=E5=8A=A8=E6=80=81=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=20#1792?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- util/request.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/util/request.js b/util/request.js index 9921a7c..64940ab 100644 --- a/util/request.js +++ b/util/request.js @@ -75,6 +75,9 @@ const createRequest = (method, url, data = {}, options) => { // NMTID: crypto.randomBytes(16).toString('hex'), _ntes_nuid: crypto.randomBytes(16).toString('hex'), } + if (url.indexOf('login') === -1) { + options.cookie['NMTID'] = crypto.randomBytes(16).toString('hex') + } if (!options.cookie.MUSIC_U) { // 游客 if (!options.cookie.MUSIC_A) {