try to fix qymusic

This commit is contained in:
weilinfox 2020-08-21 12:04:15 +08:00
parent dba8951be7
commit 8333e8c741

View file

@ -1,5 +1,6 @@
from zzcore import StdAns
import requests
import re
class Ans(StdAns):
def GETMSG(self):
@ -24,6 +25,7 @@ class Ans(StdAns):
}
try:
resp = requests.get(url=url,params=params)
# print(resp)
resp = re.match("callback%((.+)%)", resp).json()
if resp['data']['song']['totalnum'] == 0:
return '辣鸡曲库没这首,或者你的关键词有问题'