TGViewer
Zen of Python Zen of Python @zen_of_python · 18.8K subscribers
Post #2677 5.48K
​whois для домена на Python

Библиотека позволяет выводить те же сведения о сайте, что и одноимённый сервис.

>>> 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.expiration_date)
... 2024-09-14 00:00:00

Репозиторий на GitHub

#библиотека
  • 👍 7
More from @zen_of_python
  1. Oct 10, 2026Чего не проверяет runtime_checkable Protocol Protocol позволяет описать небольшой интерфей…
  2. Oct 9, 2026Как добавить MCP-сервер в Django-проект django-mcpz позволяет зарегистрировать Python-функ…
  3. Oct 9, 2026Как дождаться обработки очереди asyncio Пустая очередь ещё не означает, что работа законче…
  4. Oct 9, 2026Почему frozendict не замораживает вложенные объекты В Python 3.15 появляется встроенный fr…
  5. Oct 8, 2026Почему цикл внутри теста скрывает часть ошибок Тест перебирает десять входов и проверяет р…
  6. Oct 8, 2026Как выполнять CPU-задачи в отдельных интерпретаторах Python В Python 3.14 InterpreterPoolE…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →