精确描述每个渠道的能力层次

核心修改:
- GitHub: 零配置=公开仓库可读可搜,配置 gh/token 后=Fork、Issue、PR、Review 全部可用
- Reddit: 三层能力——Exa 搜索(免费)→代理读帖子→OAuth Bot 高级操作(发帖等)
- 小红书: 必须配 Cookie,没有降级方案,明确说明
- B站: 本地可用/服务器需代理,区分清楚
- Twitter: 零配置可读推文,birdx+Cookie 解锁搜索发推

每个渠道的 check() 方法都改为自定义逻辑,精确反映当前环境的实际能力。
This commit is contained in:
Panniantong
2026-02-24 09:25:46 +01:00
parent 2098dacd37
commit 38bf407c3a
5 changed files with 34 additions and 19 deletions
+5 -3
View File
@@ -27,10 +27,12 @@ class GitHubChannel(Channel):
return h
def check(self, config=None):
import shutil
token = config.get("github_token") if config else None
if token:
return "ok", "已认证,可访问私有仓库"
return "ok", "公开仓库可用。配置 github_token 可访问私有仓库"
has_gh = shutil.which("gh")
if token or has_gh:
return "ok", "完整可用(读取、搜索、Fork、Issue、PR 等)"
return "ok", "公开仓库可读可搜。配置 gh CLI 或 github_token 可解锁 Fork、Issue、PR 等操作"
def can_handle(self, url: str) -> bool:
domain = urlparse(url).netloc.lower()