DEV Community

drake
drake

Posted on

wss(websocket)也有ja3,如何过?

依赖:https://github.com/lexiforest/curl_cffi?tab=readme-ov-file
该工具能够过ja3,并且支持websocket

Image description
具体调用方式:

非常简单
如果已经安装过的,一定要注意更新,老版本不支持websocket,pip install curl_cffi --upgrade

from curl_cffi.requests import Session, WebSocket

def on_message(ws: WebSocket, message):
    print(message)

with Session() as s:
    ws = s.ws_connect(
        "wss://api.gemini.com/v1/marketdata/BTCUSD",
        on_message=on_message,
    )
    ws.run_forever()
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up