HI there. This is my first question on this forum. So here we go.
In the exercise I modified the url in the socket1.py file as told to retrieve the document from the link provided. But after doing all and running in cmd, I get ‘socket.gaierror: [Errno 11001] getaddrinfo failed’ error. I also can’t get to work this with the other alternative methods i.e., browser developer console and telnet. Telnet throws a ‘Could not open connection to the host, on port 80: Connect failed’ error. I looked into google but not getting a clear answer. It would really help if someone solved this issue for me. I’m also putting in the code.
mysock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
cmd = 'GET http://data.pr4e.org/intro-short.txt HTTP/1.0\r\n\r\n'.encode()
data = mysock.recv(512)
if len(data) < 1: