修复bug

This commit is contained in:
xmengnet 2021-06-07 20:19:42 +08:00
parent 744b3553e1
commit c47b9e3261

View file

@ -5,8 +5,7 @@ from config import LOLIKEYS
class Ans(StdAns): class Ans(StdAns):
AllowGroup = [973510746, 805197917, 343700338, 125733077, 1084566280, AllowGroup = [874769998,596678277,794290657,204097403]
920863253, 798595664, 655057127, 196268763, 247022495, 474907856, 940333876]
def GETMSG(self): def GETMSG(self):
@ -51,6 +50,7 @@ def getsetu(apikey, keyword=''):
url = 'https://api.lolicon.app/setu/' url = 'https://api.lolicon.app/setu/'
params = { params = {
'apikey': apikey, 'apikey': apikey,
'r18': 0,
} }
if keyword != '': if keyword != '':
params['keyword'] = keyword params['keyword'] = keyword
@ -66,7 +66,7 @@ def getsetu(apikey, keyword=''):
#h, m = divmod(m, 60) #h, m = divmod(m, 60)
#quota_min_ttl = f'{h}时{m}分{s}秒' #quota_min_ttl = f'{h}时{m}分{s}秒'
if resp['code'] == 0: if resp['code'] == 0:
quota = resp['quota'] quota = resp['count']
try: try:
picurl = resp['data'][0]['url'] picurl = resp['data'][0]['url']
code = 0 code = 0