-
Notifications
You must be signed in to change notification settings - Fork 22
feat(bilibili): 增强哔哩哔哩图文动态解析 #444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- 支持解析哔哩哔哩图文动态内容,并将动态和图文信息合并为统 一接口。同时修复了代码格式化问题,优化了部分函数参数 换行以提高可读性。 - Bug: 字体资源被持续占用未释放 Fixes fllesser#433 - Bug: B站动态解析缺少图片资源 Fixes fllesser#443 - Bug: 动态解析错误 Fixes fllesser#442
Codecov Report❌ Patch coverage is
|
移除重复的opus测试函数,将测试数据合并到dynamic测试中, 统一测试逻辑并优化代码结构,提高测试效率。
移除了对动态解析结果中标题字段的非空断言, 保留了作者字段的断言以确保基本功能正常
| @handle("/BV", r"bilibili\.com(?:/video)?/(?P<bvid>BV[0-9a-zA-Z]{10})(?:\?p=(?P<page_num>\d{1,3}))?") | ||
| @handle( | ||
| "/BV", | ||
| r"bilibili\.com(?:/video)?/(?P<bvid>BV[0-9a-zA-Z]{10})(?:\?p=(?P<page_num>\d{1,3}))?", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里为什么要换行
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
格式化插件自动的
| @handle("/av", r"bilibili\.com(?:/video)?/av(?P<avid>\d{6,})(?:\?p=(?P<page_num>\d{1,3}))?") | ||
| @handle( | ||
| "/av", | ||
| r"bilibili\.com(?:/video)?/av(?P<avid>\d{6,})(?:\?p=(?P<page_num>\d{1,3}))?", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同
|
没改吗 |
|
改什么 |
|
comment 没看到吗 |
合并内容: 1. 原项目的增强功能: - is_article() 检测 - 自动识别文章类型动态 - 统一的 parse_bilibili_api_opus() 处理 - DynamicMajor.desc 字段支持 - 依赖更新 (urllib3, yt-dlp等) 2. 我们项目的保留修复: - 转发动态完整修复 (区分 current_info/content_source) - Draw 类型支持 (普通图文动态) - 容错处理 (_major 方法) - 更多的字段默认值 3. 冲突解决策略: - bilibili/__init__.py: 保留转发逻辑 + 合入 is_article() 检测 - bilibili/dynamic.py: 合并 draw + desc 字段 - 其他文件: 采用原项目的更新 相关 PR: - upstream fllesser#444: feat(bilibili): 增强哔哩哔哩图文动态解析 - upstream fllesser#445: fix(nga, tiktok): 更新解析器的处理规则 - upstream fllesser#448: fix(helper): enhance helper to simpify code - upstream fllesser#449-451: 依赖和 CI 更新 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
一接口。同时修复了代码格式化问题,优化了部分函数参数 换行以提高可读性。
Fixes Bug: 字体资源被持续占用未释放 #433
Fixes Bug: B站动态解析缺少图片资源 #443
Fixes Bug: 动态解析错误 #442