How to use puppeteer to dump WebSocket data

后端 未结 3 850
南笙
南笙 2020-12-14 03:30

I want to get websocket data in this page https://upbit.com/exchange?code=CRIX.UPBIT.KRW-BTC, its websocket URL is dynamic and only valid during the first connection, the se

3条回答
  •  孤街浪徒
    2020-12-14 03:39

    I don't think puppeteer has support for this yet, but the lower-level protocol does here: https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-webSocketFrameSent and https://chromedevtools.github.io/devtools-protocol/tot/Network#type-WebSocketResponse. This means that you could implement this yourself in a library if you wanted too.

提交回复
热议问题