Skip to content

feat: 新增 Instagram、Reddit、贴吧解析及卡片增强#556

Open
XianYuDaXian wants to merge 3 commits into
fllesser:masterfrom
XianYuDaXian:feat/instagram-reddit-tieba
Open

feat: 新增 Instagram、Reddit、贴吧解析及卡片增强#556
XianYuDaXian wants to merge 3 commits into
fllesser:masterfrom
XianYuDaXian:feat/instagram-reddit-tieba

Conversation

@XianYuDaXian

Copy link
Copy Markdown

概述

新增 Instagram、Reddit、百度贴吧解析,并包含下载/渲染与可选 LLM 翻译相关改动。

新增解析

平台 说明
Instagram yt-dlp + HTML 图集回退;og 作者/互动;parser_instagram_ck
Reddit 评论帖/短链/分享链;gallery 多图;Common 子版块头;parser_reddit_ck
贴吧 访客 mo/q/m;首楼正文;imgsrc 原图;互动行;可选 parser_tieba_ck

其他

  • 可选 LLM 翻译卡片 title/textparser_llm_translate_*
  • yt-dlp「Requested format is not available」格式回退
  • 贴吧视频优先 transcode-cae + Referer(修复部分 401)
  • 测试:test_instagram.pytest_reddit.pytest_urls.md 补充 Reddit
  • .gitignore 排除本地 *_out/、探测脚本

依赖与配置

  • Instagram 需 yt-dlp[all] 可选依赖)
  • PARSER_INSTAGRAM_CK / PARSER_REDDIT_CK / PARSER_TIEBA_CK、翻译相关配置项

- Instagram:yt-dlp/Reels,HTML 图集与 og 作者、互动文案回退

- Reddit:评论帖/短链/分享链,gallery 多图,Common 卡片子版块头

- 贴吧:访客 mo/q/m,imgsrc 原图与首楼正文,互动行(无喜欢数则不显示)

- yt-dlp:Requested format is not available 时回退 bestvideo+bestaudio

- 可选 LLM 翻译卡片 title/text(parser_llm_translate_*)

- 平台 logo 与 card 主题(instagram/tieba);extra_info 与 text 去重

- 测试 test_instagram/test_reddit;scripts 落盘与 TIEBA/INSTAGRAM 说明文档
chore: 扩展 .gitignore,排除本地探测脚本与落盘目录
@codecov

codecov Bot commented Jun 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 29.81844% with 1005 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/nonebot_plugin_parser/parsers/tieba.py 11.25% 410 Missing ⚠️
src/nonebot_plugin_parser/parsers/reddit.py 23.48% 277 Missing ⚠️
src/nonebot_plugin_parser/parsers/instagram.py 47.00% 177 Missing ⚠️
...c/nonebot_plugin_parser/renders/common/renderer.py 22.22% 77 Missing ⚠️
src/nonebot_plugin_parser/translate.py 30.30% 46 Missing ⚠️
src/nonebot_plugin_parser/renders/base.py 0.00% 8 Missing ⚠️
src/nonebot_plugin_parser/download/__init__.py 81.81% 4 Missing ⚠️
src/nonebot_plugin_parser/download/ytdlp.py 87.50% 4 Missing ⚠️
src/nonebot_plugin_parser/renders/common/assets.py 80.00% 2 Missing ⚠️
Files with missing lines Coverage Δ
src/nonebot_plugin_parser/config.py 91.13% <100.00%> (+1.99%) ⬆️
src/nonebot_plugin_parser/constants.py 100.00% <100.00%> (ø)
src/nonebot_plugin_parser/parsers/__init__.py 100.00% <100.00%> (ø)
src/nonebot_plugin_parser/parsers/base.py 95.03% <100.00%> (+3.60%) ⬆️
src/nonebot_plugin_parser/renders/common/assets.py 94.28% <80.00%> (-2.44%) ⬇️
src/nonebot_plugin_parser/download/__init__.py 94.89% <81.81%> (+3.08%) ⬆️
src/nonebot_plugin_parser/download/ytdlp.py 88.80% <87.50%> (-0.79%) ⬇️
src/nonebot_plugin_parser/renders/base.py 30.30% <0.00%> (-2.31%) ⬇️
src/nonebot_plugin_parser/translate.py 30.30% <30.30%> (ø)
...c/nonebot_plugin_parser/renders/common/renderer.py 75.00% <22.22%> (-15.38%) ⬇️
... and 3 more

... and 2 files with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant