mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-04 13:13:36 +01:00
[rh:websockets] Support websockets 14.0+ (#11616)
Authored by: coletdjnz
This commit is contained in:
parent
e0f1ae813b
commit
c7316373c0
@ -52,7 +52,7 @@ default = [
|
|||||||
"pycryptodomex",
|
"pycryptodomex",
|
||||||
"requests>=2.32.2,<3",
|
"requests>=2.32.2,<3",
|
||||||
"urllib3>=1.26.17,<3",
|
"urllib3>=1.26.17,<3",
|
||||||
"websockets>=13.0,<14",
|
"websockets>=13.0",
|
||||||
]
|
]
|
||||||
curl-cffi = [
|
curl-cffi = [
|
||||||
"curl-cffi==0.5.10; os_name=='nt' and implementation_name=='cpython'",
|
"curl-cffi==0.5.10; os_name=='nt' and implementation_name=='cpython'",
|
||||||
|
@ -216,6 +216,8 @@ def handle(self):
|
|||||||
protocol = websockets.ServerProtocol()
|
protocol = websockets.ServerProtocol()
|
||||||
connection = websockets.sync.server.ServerConnection(socket=self.request, protocol=protocol, close_timeout=0)
|
connection = websockets.sync.server.ServerConnection(socket=self.request, protocol=protocol, close_timeout=0)
|
||||||
connection.handshake()
|
connection.handshake()
|
||||||
|
for message in connection:
|
||||||
|
if message == 'socks_info':
|
||||||
connection.send(json.dumps(self.socks_info))
|
connection.send(json.dumps(self.socks_info))
|
||||||
connection.close()
|
connection.close()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user