From d9e242417a80d369df6fa977adab0658a2936200 Mon Sep 17 00:00:00 2001 From: Jackson-Chen2007 <48171385+Jackson-Chen2007@users.noreply.github.com> Date: Sat, 28 Nov 2020 17:45:51 +0800 Subject: [PATCH] Update whois.py change api data format --- whois.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/whois.py b/whois.py index ebcc382..2a75b35 100644 --- a/whois.py +++ b/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 服务器 。")