Options are a cookie-style string, so we parse with SimpleCookie from the stdlib.
Options are a cookie-style string, so we parse with SimpleCookie from the stdlib.
Accepts any string→string mapping so this works with raw dicts as well as
websockets’ Headers / httpx Headers objects.
Signature
Section titled “Signature”def extract_websocket_options(headers: Mapping[str, str]) -> dict[str, str]Parameters
Section titled “Parameters”headers(Mapping[str, str])
Returns
Section titled “Returns”dict[str, str]
Import
Section titled “Import”from TikTokLive.client.ws.ws_utils import extract_websocket_options