Why am I getting 'getaddrinfo failed' while connecting to remote server?

246 views Asked by At

I am using the socket module in python to connect to a remote server at https://vedant-chatroom.glitch.me/chat.html?user=python. This is my code (test.py):

import socket
web_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
web_socket.connect(("https://vedant-chatroom.glitch.me/chat.html?user=python", 443))

After running I get:

Traceback (most recent call last):
  File "test.py", line 4, in <module>
    web_socket.connect(("https://vedant-chatroom.glitch.me/chat.html?user=python", 443))
socket.gaierror: [Errno 11001] getaddrinfo failed

The remote server is a Node based server which is using the sockets.io package and express.

0

There are 0 answers