mirror of
https://github.com/TeamPGM/PagerMaid_Plugins.git
synced 2024-11-29 02:17:20 +00:00
Update whois.py
change api data format
This commit is contained in:
parent
a622055a96
commit
d9e242417a
2
whois.py
2
whois.py
@ -17,7 +17,7 @@ async def whois(context):
|
||||
req = get("https://tenapi.cn/whois/?url=" + message)
|
||||
if req.status_code == 200:
|
||||
data = json.loads(req.text)
|
||||
res = 'url: ' + data['data']['url'] + '\n注册商: ' + str(data['data']['注册商']) + '\n联系人: ' + str(data['data']['联系人']) + '\n联系邮箱: ' + str(data['data']['联系邮箱']) + '\n注册时间: ' + str(data['data']['注册时间']) + '\n过期时间: ' + str(data['data']['过期时间']) + '\nDNS: ' + str(data['data']['DNS'])
|
||||
res = '网址: ' + data['data']['url'] + '\n注册商: ' + str(data['data']['registrar']) + '\n联系人: ' + str(data['data']['registrant']) + '\n联系邮箱: ' + str(data['data']['mail']) + '\n注册时间: ' + str(data['data']['registration']) + '\n过期时间: ' + str(data['data']['expiration']) + '\nDNS: ' + str(data['data']['dns'])
|
||||
await context.edit(res)
|
||||
else:
|
||||
await context.edit("出错了呜呜呜 ~ 无法访问到 API 服务器 。")
|
||||
|
Loading…
Reference in New Issue
Block a user