feat(reddit): honest tiering — OpenCLI / rdt-cli, no zero-config path
- live-verified 2026-06: anonymous .json endpoints are 403-blocked (all variants) and the official API closed self-service registration in 2025-11 — so the channel now says plainly: every Reddit backend needs a logged-in session, mainland China needs a proxy - backends = [OpenCLI, rdt-cli]: OpenCLI rides the browser session (desktop preferred); rdt-cli stays for servers and existing installs (upstream unmaintained since 2026-03, noted in the ok message) - install: desktop routes to OpenCLI, server installs rdt-cli from the pinned git source (split out as _install_rdt_cli) - skill/references/social.md: Reddit section rewritten as two backend command groups + a PRAW note scoped to users who already hold pre-2025-11 credentials (explicitly not recommended for new users) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -180,25 +180,43 @@ user = ch.get_user("Livid")
|
||||
|
||||
> **节点列表**: https://www.v2ex.com/planes
|
||||
|
||||
## Reddit (rdt-cli)
|
||||
## Reddit(多后端,必须登录态)
|
||||
|
||||
**Reddit 没有零配置路径**:匿名 `.json` 端点已被封(403),官方 API 自 2025-11 起人工审批基本不批。两个后端都靠登录态,先跑 `agent-reach doctor --json` 看 reddit 的 `active_backend`。中国大陆访问需代理。
|
||||
|
||||
### 后端 A:OpenCLI(桌面首选,复用浏览器登录态)
|
||||
|
||||
```bash
|
||||
# 搜索帖子
|
||||
rdt search "query" --limit 10
|
||||
opencli reddit search "query" -f yaml
|
||||
|
||||
# 读帖子全文 + 评论
|
||||
rdt read POST_ID
|
||||
opencli reddit read POST_ID -f yaml
|
||||
|
||||
# 浏览 subreddit
|
||||
rdt sub python --limit 20
|
||||
# 浏览 subreddit / 热门 / Popular
|
||||
opencli reddit subreddit LocalLLaMA -f yaml
|
||||
opencli reddit hot -f yaml
|
||||
opencli reddit popular -f yaml
|
||||
|
||||
# 浏览热门
|
||||
rdt popular --limit 10
|
||||
|
||||
# 浏览 /r/all
|
||||
rdt all --limit 10
|
||||
# subreddit 元信息(订阅数、简介)
|
||||
opencli reddit subreddit-info LocalLLaMA -f yaml
|
||||
```
|
||||
|
||||
> **安装**: `pipx install 'git+https://github.com/public-clis/rdt-cli.git'`(PyPI 版本暂时落后,需从 GitHub 装 v0.4.2+)。需要先登录(`rdt login`)才能搜索和阅读。
|
||||
> 需要登录的功能:`rdt feed --subs-only`(订阅列表)、`rdt saved`(收藏)。
|
||||
> 要求 Chrome 打开且浏览器里登录过 reddit.com。
|
||||
|
||||
### 后端 B:rdt-cli(存量/服务器备选,上游 2026-03 起停更)
|
||||
|
||||
```bash
|
||||
rdt search "query" --limit 10 # 搜索帖子
|
||||
rdt read POST_ID # 读帖子全文 + 评论
|
||||
rdt sub python --limit 20 # 浏览 subreddit
|
||||
rdt popular --limit 10 # 浏览热门
|
||||
rdt all --limit 10 # 浏览 /r/all
|
||||
```
|
||||
|
||||
> **安装**: `pipx install 'git+https://github.com/public-clis/rdt-cli.git'`(PyPI 版本落后,需从 GitHub 装 v0.4.2+)。先 `rdt login` 才能搜索和阅读(服务器无浏览器时手动写 Cookie,见 doctor 提示)。
|
||||
> 建议使用 `--yaml` 输出,对 AI agent 更友好。
|
||||
|
||||
### 高级选项:官方 API + PRAW(仅限已有凭证的用户)
|
||||
|
||||
2025-11 前注册过 Reddit script app(持有 client_id/client_secret)的用户可以用 PRAW 走官方 API(100 QPM 免费)。新申请需人工审批且个人项目基本不批,**不要推荐新用户走这条路**。
|
||||
|
||||
Reference in New Issue
Block a user