upd
This commit is contained in:
parent
763d09cda6
commit
515721f978
1 changed files with 13 additions and 11 deletions
|
@ -35,17 +35,19 @@ async def get_whois(msg, domain):
|
|||
|
||||
if info['name_servers']:
|
||||
name_servers = [ns for ns in info['name_servers'] if ns.islower()]
|
||||
else:
|
||||
name_servers = None
|
||||
|
||||
return f'''\
|
||||
{msg.locale.t('whois.message.domain_name')}{info['domain_name'][1]}{f"""
|
||||
{msg.locale.t('whois.message.registrar')}{info['registrar']}""" if info['registrar'] is not None else ''}{f"""
|
||||
{msg.locale.t('whois.message.whois_server')}{info['whois_server']}""" if info['whois_server'] is not None else ''}{f"""
|
||||
{msg.locale.t('whois.message.updated_date')}{str(process(info['updated_date']))}""" if info['updated_date'] is not None else ''}{f"""
|
||||
{msg.locale.t('whois.message.creation_date')}{str(process(info['creation_date']))}""" if info['creation_date'] is not None else ''}{f"""
|
||||
{msg.locale.t('whois.message.expiration_date')}{str(process(info['expiration_date']))}""" if info['expiration_date'] is not None else ''}{f"""
|
||||
{msg.locale.t('whois.message.name_servers')}{', '.join(name_servers)}""" if info['name_servers'] is not None else ''}{f"""
|
||||
{msg.locale.t('whois.message.dnssec')}{info['dnssec']}""" if info['dnssec'] is not None else ''}{f"""
|
||||
{msg.locale.t('whois.message.name')}{process(info['name'])}""" if info['name'] is not None else ''}{f"""
|
||||
{msg.locale.t('whois.message.organization')}{process(info['org'])}""" if info['org'] is not None else ''}{f"""
|
||||
{msg.locale.t('ip.message.location')}{f"{process(info['address'])}, " if info['address'] is not None else ''}{f"{info['city']}, " if info['city'] is not None else ''}{f"{info['state']}, " if info['state'] is not None else ''}{info['country']}""" if info['country'] is not None else ''}{f"""
|
||||
{msg.locale.t('whois.message.postal_code')}{process(info['registrant_postal_code'])}""" if info['registrant_postal_code'] is not None else ''}'''
|
||||
{msg.locale.t('whois.message.registrar')}{info['registrar']}""" if info['registrar'] else ''}{f"""
|
||||
{msg.locale.t('whois.message.whois_server')}{info['whois_server']}""" if info['whois_server'] else ''}{f"""
|
||||
{msg.locale.t('whois.message.updated_date')}{str(process(info['updated_date']))}""" if info['updated_date'] else ''}{f"""
|
||||
{msg.locale.t('whois.message.creation_date')}{str(process(info['creation_date']))}""" if info['creation_date'] else ''}{f"""
|
||||
{msg.locale.t('whois.message.expiration_date')}{str(process(info['expiration_date']))}""" if info['expiration_date'] else ''}{f"""
|
||||
{msg.locale.t('whois.message.name_servers')}{', '.join(name_servers)}""" if info['name_servers'] else ''}{f"""
|
||||
{msg.locale.t('whois.message.dnssec')}{info['dnssec']}""" if info['dnssec'] else ''}{f"""
|
||||
{msg.locale.t('whois.message.name')}{process(info['name'])}""" if info['name'] else ''}{f"""
|
||||
{msg.locale.t('whois.message.organization')}{process(info['org'])}""" if info['org'] else ''}{f"""
|
||||
{msg.locale.t('ip.message.location')}{f"{process(info['address'])}, " if info['address'] else ''}{f"{process({info['city'])}, " if info['city'] else ''}{f"{{process(info['state'])}, " if info['state'] else ''}{{process(info['country'])}""" if info['country'] else ''}{f"""
|
||||
{msg.locale.t('whois.message.postal_code')}{process(info['registrant_postal_code'])}""" if info['registrant_postal_code'] else ''}'''
|
||||
|
|
Reference in a new issue