feat(bilibili,twitter): yt-dlp exits bilibili; OpenCLI joins both
bilibili: - live-verified 2026-06: bilibili 412-blocks yt-dlp in every configuration (latest version, direct, proxied, warmed cookies) while bili-cli works fine without login — so yt-dlp no longer serves this channel (it remains the YouTube backend) - backends = [bili-cli, OpenCLI, B站搜索 API]: bili-cli covers search/hot/rank/video-detail/audio, OpenCLI adds subtitles through the browser session, the search API is the zero-dependency fallback - when a broken candidate is bypassed by a working fallback, its reinstall prescription is appended to the winning message instead of being swallowed - skill docs (social.md + video.md): "do NOT use yt-dlp for bilibili" warning, bili-cli/OpenCLI command groups, curl fallback recipe, B站 audio transcription path via `bili audio` + agent-reach transcribe twitter: - OpenCLI joins as the middle candidate [twitter-cli, OpenCLI, bird] - social.md: explicit 4-step search retry chain (retry → upgrade → OpenCLI → stable-command detour) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -8,7 +8,7 @@ from agent_reach.probe import probe_command
|
||||
class TwitterChannel(Channel):
|
||||
name = "twitter"
|
||||
description = "Twitter/X 推文"
|
||||
backends = ["twitter-cli", "bird CLI (legacy)"]
|
||||
backends = ["twitter-cli", "OpenCLI", "bird CLI (legacy)"]
|
||||
tier = 1
|
||||
|
||||
def can_handle(self, url: str) -> bool:
|
||||
@@ -24,6 +24,8 @@ class TwitterChannel(Channel):
|
||||
for backend in self.ordered_backends(config):
|
||||
if backend == "twitter-cli":
|
||||
result = self._check_twitter_cli()
|
||||
elif backend == "OpenCLI":
|
||||
result = self._check_opencli()
|
||||
elif backend == "bird CLI (legacy)":
|
||||
result = self._check_bird()
|
||||
else:
|
||||
@@ -84,6 +86,22 @@ class TwitterChannel(Channel):
|
||||
" twitter -v status 查看详细信息"
|
||||
)
|
||||
|
||||
def _check_opencli(self):
|
||||
"""OpenCLI candidate. None = not installed."""
|
||||
from agent_reach.backends import opencli_status
|
||||
|
||||
st = opencli_status()
|
||||
if not st.installed:
|
||||
return None
|
||||
if st.broken:
|
||||
return "error", st.hint
|
||||
if st.ready:
|
||||
return "ok", (
|
||||
"OpenCLI 可用(复用浏览器登录态)。用法:"
|
||||
"opencli twitter search/article/user-posts -f yaml"
|
||||
)
|
||||
return "warn", st.hint
|
||||
|
||||
def _check_bird(self):
|
||||
"""探测 bird/birdx(legacy 回退)。返回 None 表示均未安装,否则返回 (status, message)。"""
|
||||
last_failure = None
|
||||
|
||||
Reference in New Issue
Block a user