添加自动多次尝试功能

This commit is contained in:
TNTcraftHIM 2020-08-28 00:04:34 +08:00
parent 3b141c6dc0
commit 68b0195117
2 changed files with 6 additions and 2 deletions

View File

@ -282,10 +282,10 @@
},
{
"name": "neteasemusic",
"version": "1.6",
"version": "1.7",
"section": "daily",
"maintainer": "TNTcraftHIM",
"size": "22.2 kb",
"size": "22.5 kb",
"supported": true,
"des-short": "网易云点歌",
"des": "可以在线搜索并且快速点歌歌曲信息齐全支持直接回复点歌。命令nem。"

View File

@ -311,6 +311,10 @@ async def nem(context):
with open(file, 'wb') as fp:
fp.write(content)
for __ in range(6): #最多尝试6次
if proxynum > (len(proxy) -1): #代理自动切换至下一个
proxynum = 0
proxies = proxy[proxynum]
proxynum += 1
try:
WangyiyunDownload().download()
ccimported = True