I am currently trying to connect to socketIO server, as in this JavaScript:
var socket = io('https://beta.glws.org')
This is the part of Python that does not work:
from socketIO_client import SocketIO, BaseNamespace
s = SocketIO('https://beta.glws.org', 80,
verify=False,
headers={'Sec-WebSocket-Key': 'BtvJh6zvB4ILSo0sqIOntQ=='},
cookies={'io': 'SCdIBbDOGDXhUBOZAkhM',
'gat': '1',
'ga': 'GA1.2.1442748168.1463601401'
},
)
Cookies and headers are downloaded from debugging from the production site, but the result is the same as without them.
Result with debug level logging:
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): beta.glws.org
WARNING:root:beta.glws.org:80/socket.io [waiting for connection] [SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:590)
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (2): beta.glws.org
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (3): beta.glws.org
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (4): beta.glws.org
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (5): beta.glws.org
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (6): beta.glws.org
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (7): beta.glws.org
What am I doing wrong? Why is he launching so many new https connections?
source
share