feat: add Xiaohongshu source and Reddit public fallback

- add xiaohongshu/xhs source path via xiaohongshu-mcp HTTP API\n- add Reddit public JSON fallback when OpenAI auth is unavailable\n- update diagnostics/UI rendering for new source availability states\n- harden Xiaohongshu availability probe to reduce false negatives\n- include source status reporting for Xiaohongshu
This commit is contained in:
YJLi-new
2026-03-05 20:54:33 +08:00
parent db75f9e341
commit 788514ce8e
6 changed files with 523 additions and 75 deletions
+14
View File
@@ -502,6 +502,20 @@ def render_source_status(report: schema.Report, source_info: dict = None) -> str
lines.append(f" ✅ Instagram: {len(report.instagram)} reels ({with_captions} with captions)")
# Hide when zero results
# Xiaohongshu (from Web source bucket)
xhs_count = 0
if report.web:
xhs_count = sum(
1 for w in report.web
if getattr(w, "source_domain", "").lower().endswith("xiaohongshu.com")
)
if xhs_count > 0:
lines.append(f" ✅ Xiaohongshu: {xhs_count} notes")
else:
reason = source_info.get("xiaohongshu_skip_reason")
if reason:
lines.append(f" ⚡ Xiaohongshu: {reason}")
# Hacker News
if report.hackernews_error:
lines.append(f" ❌ HN: error - {report.hackernews_error}")