import socket socket.gethostbyname("www.youtube.com")