I am trying to connect to a web server in Python 3 and it just doesn't work! I wrote the following in my code editor VS Code and btw, I don't have telnet installed. So, here's my code:
import socket
mysock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
mysock.connect(('http://data.pr4e.org',80))
And the traceback I am getting:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
socket.gaierror: [Errno 11001] getaddrinfo failed
Any suggestions?
http://. Try justdata.pr4e.org.