Skip to content

extract_webcast_response_message

Extract the ProtoMessageFetchResult from a push frame. If compression is enabled on the WebSocket, then messages will come gzipped. This method will decompress the payload if necessary. The gzip format allows for less bandwidth usage, at the cost of a slight CPU increase for message decompression.

Extract the ProtoMessageFetchResult from a push frame. If compression is enabled on the WebSocket, then messages will come gzipped. This method will decompress the payload if necessary. The gzip format allows for less bandwidth usage, at the cost of a slight CPU increase for message decompression.

def extract_webcast_response_message(
push_frame: WebcastPushFrame,
logger: logging.Logger = TikTokLiveLogHandler.get_logger(),
) -> ProtoMessageFetchResult
  • push_frame (WebcastPushFrame) — Push frame to extract from
  • logger (logging.Logger, default TikTokLiveLogHandler.get_logger()) — Logger to use for logging

ProtoMessageFetchResult — ProtoMessageFetchResult The extracted response

from TikTokLive.client.ws.ws_utils import extract_webcast_response_message

TikTokLive/client/ws/ws_utils.py:76