mirror of
https://github.com/TeamPGM/PagerMaid_Plugins.git
synced 2024-11-22 12:15:37 +00:00
parent
f7f6e76292
commit
e74f374d1c
@ -192,7 +192,7 @@
|
||||
},
|
||||
{
|
||||
"name": "whois",
|
||||
"version": "1.1",
|
||||
"version": "1.11",
|
||||
"section": "daily",
|
||||
"maintainer": "KorenKrita",
|
||||
"size": "1.1 kb",
|
||||
|
4
whois.py
4
whois.py
@ -16,8 +16,8 @@ async def whois(context):
|
||||
return
|
||||
req = get("https://tenapi.cn/whois/?url=" + message)
|
||||
if req.status_code == 200:
|
||||
data = json.loads(req.text)
|
||||
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'])
|
||||
data = json.loads(req.text)['data']
|
||||
res = '域名: `' + data['url'] + '`\n注册商: `' + str(data['registrar']) + '`\n联系人: `' + str(data['registrant']) + '`\n联系邮箱: `' + str(data['mail']) + '`\n注册时间: `' + str(data['registration']) + '`\n过期时间: `' + str(data['expiration']) + '`\nDNS: ' + str(data['dns']).replace('<br/>', '\n')
|
||||
await context.edit(res)
|
||||
else:
|
||||
await context.edit("出错了呜呜呜 ~ 无法访问到 API 服务器 。")
|
||||
|
Loading…
Reference in New Issue
Block a user