From ad171731ad924b9ff42ebd7c17af38d3987fc0ba Mon Sep 17 00:00:00 2001 From: TNTcraftHIM Date: Thu, 27 Aug 2020 23:32:51 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=8F=91=E7=8E=B0=E4=BA=86=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD=E7=9A=84=E6=97=B6=E5=80=99=E4=B8=8D=E8=B5=B0=E4=BB=A3?= =?UTF-8?q?=E7=90=86=E4=B9=9F=E5=8F=AF=E4=BB=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- neteasemusic.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/neteasemusic.py b/neteasemusic.py index e9720ac..d79b1b3 100644 --- a/neteasemusic.py +++ b/neteasemusic.py @@ -278,7 +278,7 @@ async def nem(context): song_id=self.song_id) # 发送请求 request = requests.post( - url=self.url, headers=self.headers, data=data) + url=self.url, headers=self.headers, data=data, proxies=proxies, verify=False) # 初始化real_url real_url = '' # 处理返回信息 @@ -307,7 +307,7 @@ async def nem(context): file = name # 开始下载 content = requests.get( - url=real_url, headers=self.headers, proxies=proxies, verify=False).content + url=real_url, headers=self.headers).content with open(file, 'wb') as fp: fp.write(content) for __ in range(3): #最多尝试3次 @@ -333,7 +333,7 @@ async def nem(context): continue else: music = requests.request( - "GET", music['data']['url'], headers=headers, proxies=proxies, verify=False) + "GET", music['data']['url'], headers=headers) else: continue From 49a7ea7d42d261c18bce484f7141d198c741bfee Mon Sep 17 00:00:00 2001 From: TNTcraftHIM Date: Thu, 27 Aug 2020 23:48:31 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- neteasemusic.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/neteasemusic.py b/neteasemusic.py index d79b1b3..fcbf00a 100644 --- a/neteasemusic.py +++ b/neteasemusic.py @@ -310,7 +310,7 @@ async def nem(context): url=real_url, headers=self.headers).content with open(file, 'wb') as fp: fp.write(content) - for __ in range(3): #最多尝试3次 + for __ in range(6): #最多尝试6次 try: WangyiyunDownload().download() ccimported = True @@ -351,15 +351,15 @@ async def nem(context): except: pass await context.delete() - res = '你可以点击' + \ ' 这里 ' + '' + '前往网页版收听' - await bot.send_message(context.chat_id, f"【{info['title']}】\n" + "歌曲获取失败,可能歌曲资源受限,受到地区版权限制,或为VIP资源。\n" + res, parse_mode='html', link_preview=True) + await bot.send_message(context.chat_id, f"【{info['title']}】\n" + "歌曲获取失败,资源获取可能受限,你可以再次尝试。\n" + res, parse_mode='html', link_preview=True) return if imported is True: await context.edit(f"{title}信息导入中 . . .") imagedata = requests.get( - info['albumpic'], headers=headers, proxies=proxies, verify=False).content + info['albumpic'], headers=headers).content tag = eyed3.load(name) tag.initTag() tag = tag.tag From 3b141c6dc079bd3f40a51609fa3a91f750df93b0 Mon Sep 17 00:00:00 2001 From: TNTcraftHIM Date: Thu, 27 Aug 2020 23:50:18 +0800 Subject: [PATCH 3/3] Update list.json --- list.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/list.json b/list.json index 4ab98f5..3a51271 100644 --- a/list.json +++ b/list.json @@ -282,10 +282,10 @@ }, { "name": "neteasemusic", - "version": "1.5", + "version": "1.6", "section": "daily", "maintainer": "TNTcraftHIM", - "size": "22.3 kb", + "size": "22.2 kb", "supported": true, "des-short": "网易云点歌", "des": "可以在线搜索并且快速点歌,歌曲信息齐全,支持直接回复点歌。命令:nem。"