update: NMTID 动态添加 #1792

This commit is contained in:
binaryify 2023-09-10 11:41:18 +08:00
parent 1bc0b8f177
commit 37bad1cc33

View File

@ -75,6 +75,9 @@ const createRequest = (method, url, data = {}, options) => {
// NMTID: crypto.randomBytes(16).toString('hex'), // NMTID: crypto.randomBytes(16).toString('hex'),
_ntes_nuid: 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_U) {
// 游客 // 游客
if (!options.cookie.MUSIC_A) { if (!options.cookie.MUSIC_A) {