XZZ/worker/tiangou.py
xmengnet 9466bff17c
Add files via upload
下载网易云音乐和舔狗日记
2021-04-14 20:41:56 +08:00

20 lines
532 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from zzcore import StdAns, mysakuya
import requests
class Ans(StdAns):
#AllowGroup = [874769998,596678277]
def GETMSG(self):
msg = f"[CQ:reply,id={self.raw_msg['message_id']}]"
try:
msg += tiangou()
except:
msg += '可能是api坏掉了可不是咱'
return msg
def tiangou():
r = requests.get(url='https://api.muxiaoguo.cn/api/tiangourj').json()
# print(r)
msg = None
if r['msg'] == 'success':
msg = r['data']['comment']
return msg