Session Snapshot
定期保存会话状态,支持断点续作和历史回溯。
下载 358
从ColdCore数据库中获取最少使用且余额充足的Apify API密钥,支持自动轮换。
openclaw skills install @aces1up/apify-keys命令、参数、文件名以原文为准
从 ColdCore 数据库获取轮换的 Apify API 密钥。密钥按最少使用时间(Least Recently Used)策略轮换,并进行余额检查。
获取下一个可用的 API 密钥:
python3 ~/.openclaw/workspace/skills/apify-keys/scripts/get_key.py以 JSON 格式获取密钥(便于管道传递给其他脚本):
python3 ~/.openclaw/workspace/skills/apify-keys/scripts/get_key.py --json检查指定密钥的余额:
python3 ~/.openclaw/workspace/skills/apify-keys/scripts/get_key.py --check-balance --key "apify_api_xxxxx"列出所有可用密钥及其余额:
python3 ~/.openclaw/workspace/skills/apify-keys/scripts/get_key.py --listscrape_sm_accounts 表中处于激活状态的 Apify 账户last_used 时间戳最久远的账户(即最少使用的密钥)last_used 字段更新为当前时间戳脚本从以下环境变量读取数据库凭据(若未设置则使用默认值):
COLDCORE_HOST — MySQL 主机地址COLDCORE_USER — MySQL 用户名COLDCORE_PASS — MySQL 密码COLDCORE_DB — 数据库名称(默认值:lead_generator)默认模式: 仅输出 API 密钥字符串(便于直接管道传递)
apify_api_xxxxx**JSON 模式(--json):**
{"id": 68, "api_key": "apify_api_xxxxx", "email": "user@example.com", "balance": 4.95}需要 Apify 访问权限的其他技能应调用此脚本获取密钥:
APIFY_KEY=$(python3 ~/.openclaw/workspace/skills/apify-keys/scripts/get_key.py)
# 然后在 API 请求中使用 $APIFY_KEY或在 Python 中使用:
import subprocess
import json
import os
result = subprocess.run(
["python3", os.path.expanduser("~/.openclaw/workspace/skills/apify-keys/scripts/get_key.py"), "--json"],
capture_output=True, text=True
)
key_data = json.loads(result.stdout)
api_key = key_data["api_key"]已收录 1 个 Skill