From 60403701eaa049856784ffe982852f78f5c8fcc4 Mon Sep 17 00:00:00 2001 From: codezjx Date: Wed, 30 Jun 2021 18:51:23 +0800 Subject: [PATCH] #58 Bugfix: Fix error code -460, update header User-Agent. --- ncm/constants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ncm/constants.py b/ncm/constants.py index 7477ad2..61ff0e5 100644 --- a/ncm/constants.py +++ b/ncm/constants.py @@ -11,7 +11,7 @@ pub_key = '010001' headers = { 'Accept': '*/*', 'Host': 'music.163.com', - 'User-Agent': 'curl/7.51.0', + 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', 'Referer': 'http://music.163.com', 'Cookie': 'appver=2.0.2; _ntes_nuid={};'.format(''.join(random.choice(string.ascii_letters + string.digits) for _ in range(32))) }