用途:把 Twitch 的频道、游戏/分类、战队解析出来,并获取直播状态、剪辑、VOD、VOD 聊天回放、日程与搜索结果,输出规范化 JSON,全部经由 Crawlora API,无需 Twitch 开发者应用、OAuth 或自建爬虫。
主要能力与接口:频道资料与直播状态用 /twitch/channel login=<login>;频道剪辑 /twitch/clips login=<login>;VOD /twitch/videos login=<login>;日程 /twitch/schedule channel=<login>;VOD 聊天回放 /twitch/vod-comments video=<id>;战队名单 /twitch/team team=<slug>;发现类接口 /twitch/search query=<text>、/twitch/top-games、/twitch/streams game=<slug>。频道 login 即为小写 URL slug,例如 twitch.tv/caedrel 对应 caedrel,调用前需小写。
使用方式:先在 https://crawlora.net 获取免费 Crawlora API key(每月 2000 积分,无需信用卡),在运行 helper 前设置环境变量 CRAWLORA_API_KEY;helper 从环境读取该变量并请求 https://api.crawlora.net/api/v1,缺失或无效 key 返回 401。所有请求都通过 scripts/crawlora.sh,以避免 key 出现在命令行参数中。示例:scripts/crawlora.sh /twitch/channel login=caedrel | jq '.';scripts/crawlora.sh /twitch/top-games limit=10 | jq '.';scripts/crawlora.sh /twitch/vod-comments video=1234567890 offset=0 | jq '.'。VOD 聊天回放通过把 offset 设为最后一条评论的 offset_seconds 反复请求来翻页,没有单独的页令牌。完整端点方法、路径与参数见 reference/endpoints.md。
适用场景:主播速览(直播状态+剪辑+日程);VOD 关键时刻查找(先取 VOD id,再按 offset 分页扫聊天反应);分类浏览(热门游戏后列出该分类下按观看数排序的直播);按名称搜索频道或分类;查战队成员及谁正在直播。
限制:仅公开数据,来自 Twitch 公开页面/GraphQL 表面,须遵守 Twitch 条款。按成功计费,仅 2xx 计费,免费额度每月 2000 积分。key 只存于 CRAWLORA_API_KEY,禁止硬编码、放入查询参数或提交。频道无日程时 /twitch/schedule 返回空 segments 列表而非报错;/twitch/search 来自搜索建议表面,为有上限的候选列表(limit 最大 30),非完整分页结果页。其余未在资料中说明的事项暂未提供。