pythonl | Unsorted

Telegram-канал pythonl - Python/ django

52806

по всем вопросам @haarrp @itchannels_telegram - 🔥 best it channels @ai_machinelearning_big_data -ML @ArtificialIntelligencedl -AI @datascienceiot - ml 📚 @pythonlbooks -📚books

Subscribe to a channel

Python/ django

🖥 Get domain name information using Python

Получение информации о домене. с помощью Python.

$pip install whois

$pip install whois

>>> import whois
>>> domain = whois.query('google.com')

>>> print(domain.__dict__)
{
'expiration_date': datetime.datetime(2020, 9, 14, 0, 0),
'last_updated': datetime.datetime(2011, 7, 20, 0, 0),
'registrar': 'MARKMONITOR INC.',
'name': 'google.com',
'creation_date': datetime.datetime(1997, 9, 15, 0, 0)
}

>>> print(domain.name)
google.com

>>> print(domain.expiration_date)
2024-09-14 00:00:00

• Github

@pythonl

Читать полностью…
Subscribe to a channel