#26 Bugfix: Server return: {'code': -460, 'msg': 'Cheating'}, use a 32-bits random '_ntes_nuid' to fix it.

This commit is contained in:
codezjx 2018-08-22 13:01:37 +08:00
parent 67840eae8c
commit 2849de3dc1
1 changed files with 3 additions and 1 deletions

View File

@ -1,4 +1,6 @@
# -*- coding: utf-8 -*-
import random
import string
# Encrypt key
modulus = '00e0b509f6259df8642dbc35662901477df22677ec152b5ff68ace615bb7b725152b3ab17a876aea8a5aa76d2e417629ec4ee341f56135fccf695280104e0312ecbda92557c93870114af6c9d05c4f7f0c3685b7a46bee255932575cce10b424d813cfe4875d3e82047b97ddef52741d546b8e289dc6935b3ece0462db0a22b8e7'
@ -11,7 +13,7 @@ headers = {
'Host': 'music.163.com',
'User-Agent': 'curl/7.51.0',
'Referer': 'http://music.163.com',
'Cookie': 'appver=2.0.2'
'Cookie': 'appver=2.0.2; _ntes_nuid={};'.format(''.join(random.choice(string.ascii_letters + string.digits) for _ in range(32)))
}
song_download_url = 'http://music.163.com/weapi/song/enhance/player/url?csrf_token='