Archived
1
0
Fork 0
This repository has been archived on 2024-04-26. You can view files and clone it, but cannot push or open issues or pull requests.
akari-bot/modules/whois/domain.py
多羅狼 13e19aaac4
fix
2023-05-27 11:07:22 +08:00

17 lines
625 B
Python

import whois
async def check_domain(domain: str):
return whois.whois(domain)
async def format_domain(msg, info: Dict[str, Any]):
return f'''\
{info['domain_name']}{f"""
Registrar: {info['registrar']}""" if info['registrar'] is not None else ''}{f"""
Whois Server: {info['whois_server']}""" if info['whois_server'] is not None else ''}{f"""
Referral URL: {info['referral_url']}""" if info['referral_url'] is not None else ''}{f"""
Updated Date: {info['updated_date']}""" if info['updated_date'] is not None else ''}{f"""
Creation Date: {info['creation_date']}""" if info['creation_date'] is not None else ''}'''