KeH4L分享一个 CPA 的 Codex 转 sub2api 的 py 脚本 中发帖

如图所示:


[image]
[image]


在 L 站 和 Github 上找了一圈都没找到想要的,干脆直接让 AI 做一个了。分享出来吧
放在
from __future__ import annotations

import base64
import json
from datetime import datetime, timedelta, timezone
from pathlib import Path
from typing import Any
from urllib import error, request


AUTHS_DIR = Path(__file__).resolve().parent / "auths"
FILE_PATTERN = "codex-*.json" # 匹配 codex- 开头的 JSON 文件
API_URL = "htt...