From a175a3242c82aa6c7ccd0cd473f9d26653e7fccb Mon Sep 17 00:00:00 2001 From: starmen1265 Date: Thu, 19 Mar 2026 23:46:08 +0800 Subject: [PATCH] fix(12-02): add deprecation warning to DeepAnalyzer - Add logging warning in DeepAnalyzer.__init__ - Warn that Bilibili video should use SRTProcessor instead - Keep functionality intact for Zhihu and other platforms Co-Authored-By: Claude Opus 4.6 --- kb_workflow/deep_analyzer/__init__.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/kb_workflow/deep_analyzer/__init__.py b/kb_workflow/deep_analyzer/__init__.py index 2f947ce..0052df9 100644 --- a/kb_workflow/deep_analyzer/__init__.py +++ b/kb_workflow/deep_analyzer/__init__.py @@ -129,6 +129,13 @@ class DeepAnalyzer: def __init__(self, ai_client: SimpleAIClient = None): self.ai_client = ai_client or SimpleAIClient() + # 弃用警告:B站视频应使用 SRTProcessor + import logging + logger = logging.getLogger(__name__) + logger.warning( + "DeepAnalyzer is deprecated for Bilibili video processing. " + "Use SRTProcessor instead." + ) def analyze(self, metadata: Dict[str, Any], content: Dict[str, Any], content_type: str = "video") -> AnalysisResult: """一次性调用 AI 生成完整分析报告