⭐AI-driven public opinion & trend monitor with multi-platform aggregation, RSS, and smart alerts.🎯 告别信息过载,你的 AI 舆情监控助手与热点筛选工具!聚合多平台热点 + RSS 订阅,支持关键词精准筛选。AI 智能筛选新闻 + AI 翻译 + AI 分析简报直推手机,也支持接入 MCP 架构,赋能 AI 自然语言对话分析、情感洞察与趋势预测等。支持 Docker ,数据本地/云端自持。集成微信/飞书/钉钉/Telegram/邮件/ntfy/bark/slack 等渠道智能推送。
Python aibarkdata-analysisdockerhot-newsllmmailmcpmcp-servernewsntfypythonrsstrending-topicswechatwework
fix: 过滤 platforms.sources 中 enabled: false 的数据源,修复全局开关失效,升级至 v6.6.2/mcp-v4.0.4
sansanb109701b429b
diff --git a/README-EN.md b/README-EN.mdindex 8f6118f506..9245c20d60 100644--- a/README-EN.md+++ b/README-EN.md@@ -11,7 +11,7 @@ Deploy in <strong>30 seconds</strong> — Say goodbye to endless scrolling, only[](https://github.com/sansan0/TrendRadar/stargazers)[](https://github.com/sansan0/TrendRadar/network/members)[](LICENSE)-[](https://github.com/sansan0/TrendRadar)+[](https://github.com/sansan0/TrendRadar)[](https://github.com/sansan0/TrendRadar)[](https://github.com/sansan0/TrendRadar)[](https://github.com/sansan0/TrendRadar)diff --git a/README.md b/README.mdindex 7cec9536fa..a039d065fe 100644--- a/README.md+++ b/README.md@@ -12,7 +12,7 @@[](https://github.com/sansan0/TrendRadar/stargazers)[](https://github.com/sansan0/TrendRadar/network/members)[](LICENSE)-[](https://github.com/sansan0/TrendRadar)+[](https://github.com/sansan0/TrendRadar)[](https://github.com/sansan0/TrendRadar)[](https://github.com/sansan0/TrendRadar)[](https://github.com/sansan0/TrendRadar)diff --git a/mcp_server/__init__.py b/mcp_server/__init__.pyindex 5fb4f0246f..59ee4fe778 100644--- a/mcp_server/__init__.py+++ b/mcp_server/__init__.py@@ -5,4 +5,4 @@ TrendRadar MCP Server"""-__version__ = "4.0.3"+__version__ = "4.0.4"diff --git a/mcp_server/services/data_service.py b/mcp_server/services/data_service.pyindex 3d193aa871..7ad0f8c60b 100644--- a/mcp_server/services/data_service.py+++ b/mcp_server/services/data_service.py@@ -487,7 +487,7 @@ class DataService:"use_proxy": advanced_crawler.get("use_proxy", False),"request_interval": advanced_crawler.get("request_interval", 1),"retry_times": 3,- "platforms": [p["id"] for p in platforms_config.get("sources", [])]+ "platforms": [p["id"] for p in platforms_config.get("sources", []) if p.get("enabled", True)]}if section == "all" or section == "push":diff --git a/mcp_server/tools/system.py b/mcp_server/tools/system.pyindex 5264ae00f9..047f3f7c5c 100644--- a/mcp_server/tools/system.py+++ b/mcp_server/tools/system.py@@ -88,7 +88,7 @@ class SystemManagementTools:"热榜平台已禁用",suggestion="请检查 config/config.yaml 中的 platforms.enabled 配置")- all_platforms = platforms_config.get("sources", [])+ all_platforms = [p for p in platforms_config.get("sources", []) if p.get("enabled", True)]if not all_platforms:raise CrawlTaskError("配置文件中没有平台配置",diff --git a/mcp_server/utils/validators.py b/mcp_server/utils/validators.pyindex be46119112..fa454ee93c 100644--- a/mcp_server/utils/validators.py+++ b/mcp_server/utils/validators.py@@ -185,7 +185,7 @@ def get_supported_platforms() -> List[str]:config = yaml.safe_load(f)platforms_config = config.get('platforms', {})sources = platforms_config.get('sources', [])- _platforms_cache = [p['id'] for p in sources if 'id' in p]+ _platforms_cache = [p['id'] for p in sources if 'id' in p and p.get('enabled', True)]_platforms_config_mtime = current_mtimereturn _platforms_cacheexcept Exception as e:diff --git a/pyproject.toml b/pyproject.tomlindex 6573f29a30..6037e999b8 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -1,6 +1,6 @@[project]name = "trendradar"-version = "6.6.1"+version = "6.6.2"description = "TrendRadar - 热点新闻聚合与分析工具"requires-python = ">=3.12"dependencies = [diff --git a/trendradar/__init__.py b/trendradar/__init__.pyindex 016a2af3a7..1c452785fa 100644--- a/trendradar/__init__.py+++ b/trendradar/__init__.py@@ -9,5 +9,5 @@ TrendRadar - 热点新闻聚合与分析工具from trendradar.context import AppContext-__version__ = "6.6.1"+__version__ = "6.6.2"__all__ = ["AppContext", "__version__"]diff --git a/trendradar/__main__.py b/trendradar/__main__.pyindex 7a7cc39dba..347baa9e14 100644--- a/trendradar/__main__.py+++ b/trendradar/__main__.py@@ -1028,14 +1028,14 @@ class NewsAnalyzer:return False- def _initialize_and_check_config(self) -> None:- """通用初始化和配置检查"""+ def _initialize_and_check_config(self) -> bool:+ """通用初始化和配置检查。返回 True 表示可以继续执行。"""now = self.ctx.get_time()print(f"当前北京时间: {now.strftime('%Y-%m-%d %H:%M:%S')}")if not self.ctx.config["ENABLE_CRAWLER"]:print("爬虫功能已禁用(ENABLE_CRAWLER=False),程序退出")- return+ return Falsehas_notification = self._has_notification_configured()if not self.ctx.config["ENABLE_NOTIFICATION"]:@@ -1048,6 +1048,7 @@ class NewsAnalyzer:mode_strategy = self._get_mode_strategy()print(f"报告模式: {self.report_mode}")print(f"运行模式: {mode_strategy['description']}")+ return Truedef _crawl_data(self) -> Tuple[Dict, Dict, List]:"""执行数据爬取"""@@ -1706,7 +1707,8 @@ class NewsAnalyzer:def run(self) -> None:"""执行分析流程"""try:- self._initialize_and_check_config()+ if not self._initialize_and_check_config():+ returnmode_strategy = self._get_mode_strategy()diff --git a/trendradar/core/loader.py b/trendradar/core/loader.pyindex e472c71f1d..121f312cc2 100644--- a/trendradar/core/loader.py+++ b/trendradar/core/loader.py@@ -576,7 +576,7 @@ def load_config(config_path: Optional[str] = None) -> Dict[str, Any]:# 平台配置platforms_config = config_data.get("platforms", {})- config["PLATFORMS"] = platforms_config.get("sources", [])+ config["PLATFORMS"] = [p for p in platforms_config.get("sources", []) if p.get("enabled", True)]# RSS 配置config["RSS"] = _load_rss_config(config_data)diff --git a/uv.lock b/uv.lockindex f83139775d..184a00a017 100644--- a/uv.lock+++ b/uv.lock@@ -1996,7 +1996,7 @@ wheels = [[[package]]name = "trendradar"-version = "6.6.1"+version = "6.6.2"source = { editable = "." }dependencies = [{ name = "boto3" },diff --git a/version b/versionindex ba92e72f57..3eae443131 100644--- a/version+++ b/version@@ -1 +1 @@-6.6.1\ No newline at end of file+6.6.2\ No newline at end of filediff --git a/version_mcp b/version_mcpindex aa31e71b03..7d666cb219 100644--- a/version_mcp+++ b/version_mcp@@ -1 +1 @@-4.0.3\ No newline at end of file+4.0.4\ No newline at end of file