MCPcopy Create free account
hub / github.com/Tron521/codex-console-temp / _parse_cookie_str

Function _parse_cookie_str

src/core/openai/payment.py:700–714  ·  view source on GitHub ↗

将 'key=val; key2=val2' 格式解析为 Playwright cookie 列表

(cookies_str: str, domain: str)

Source from the content-addressed store, hash-verified

698
699
700def _parse_cookie_str(cookies_str: str, domain: str) -> list:
701 """将 'key=val; key2=val2' 格式解析为 Playwright cookie 列表"""
702 cookies = []
703 for part in cookies_str.split(";"):
704 part = part.strip()
705 if "=" not in part:
706 continue
707 name, _, value = part.partition("=")
708 cookies.append({
709 "name": name.strip(),
710 "value": value.strip(),
711 "domain": domain,
712 "path": "/",
713 })
714 return cookies
715
716
717def _open_url_system_browser(url: str) -> bool:

Callers 1

_launchFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected