3 ms·
Win32 socket API doesn't do it. Python wraps it more or less directly, and: Python 3.8.1 (tags/v3.8.1:1b293b6, Dec 18 2019, 23:11:46) [MSC v.1916 64 bit (AM
by int_19h 7y ago
Win32 socket API doesn't do it. Python wraps it more or less directly, and:
Python 3.8.1 (tags/v3.8.1:1b293b6, Dec 18 2019, 23:11:46) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> socket.gethostbyname("example")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
socket.gaierror: [Errno 11001] getaddrinfo failed
>>> socket.gethostbyname("example.com")
'93.184.216.34'