⭐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
v3.1.1
sansanacb100552d69
diff --git a/README-EN.md b/README-EN.mdindex d7ac1c82ce..9e1199b95a 100644--- a/README-EN.md+++ b/README-EN.md@@ -13,7 +13,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://work.weixin.qq.com/)@@ -251,19 +251,15 @@ Transform from "algorithm recommendation captivity" to "actively getting the inf- **Major Version Upgrade**: Upgrading from v1.x to v2.y, recommend deleting existing fork and re-forking to save effort and avoid config conflicts-### 2025/11/20 - v3.1.0+### 2025/11/22 - v3.1.1-- **Added Personal WeChat Push Support**: WeWork application can push to personal WeChat without installing WeWork APP-- Supports two message formats: `markdown` (WeWork group bot) and `text` (personal WeChat app)-- Added `WEWORK_MSG_TYPE` environment variable configuration, supporting GitHub Actions, Docker, docker-compose and other deployment methods-- `text` mode automatically strips Markdown syntax for clean plain text push-- See "Personal WeChat Push" configuration in Quick Start+- **Fixed data anomaly crash issue**: Resolved `'float' object has no attribute 'lower'` error encountered by some users in GitHub Actions environment+- Added dual protection mechanism: Filter invalid titles (None, float, empty strings) at data acquisition stage, with type checking at function call sites+- Enhanced system stability to ensure normal operation even when data sources return abnormal formats**Upgrade Instructions** (GitHub Fork Users):-- Required updates: `main.py`, `config/config.yaml`-- Optional update: `.github/workflows/crawler.yml` (if using GitHub Actions)-- Recommended: Use minor version upgrade method - copy and replace the files above-+- Required update: `main.py`+- Recommended: Use minor version upgrade method - copy and replace the file above### 2025/11/18 - mcp-v1.0.2@@ -275,6 +271,19 @@ Transform from "algorithm recommendation captivity" to "actively getting the inf<details><summary><strong>👉 Click to expand: Historical Updates</strong></summary>+### 2025/11/20 - v3.1.0++- **Added Personal WeChat Push Support**: WeWork application can push to personal WeChat without installing WeWork APP+- Supports two message formats: `markdown` (WeWork group bot) and `text` (personal WeChat app)+- Added `WEWORK_MSG_TYPE` environment variable configuration, supporting GitHub Actions, Docker, docker-compose and other deployment methods+- `text` mode automatically strips Markdown syntax for clean plain text push+- See "Personal WeChat Push" configuration in Quick Start++**Upgrade Instructions** (GitHub Fork Users):+- Required updates: `main.py`, `config/config.yaml`+- Optional update: `.github/workflows/crawler.yml` (if using GitHub Actions)+- Recommended: Use minor version upgrade method - copy and replace the files above+### 2025/11/12 - v3.0.5- Fixed email sending SSL/TLS port configuration logic errordiff --git a/README.md b/README.mdindex ecafa61afc..5cacfd25a8 100644--- a/README.md+++ b/README.md@@ -13,7 +13,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://work.weixin.qq.com/)@@ -315,21 +315,17 @@ GitHub 一键 Fork 即可使用,无需编程基础。- **大版本升级**:从 v1.x 升级到 v2.y,建议删除现有 fork 后重新 fork,这样更省力且避免配置冲突-### 2025/11/20 - v3.1.0+### 2025/11/22 - v3.1.1-- **新增个人微信推送支持**:企业微信应用可推送到个人微信,无需安装企业微信 APP-- 支持两种消息格式:`markdown`(企业微信群机器人)和 `text`(个人微信应用)-- 新增 `WEWORK_MSG_TYPE` 环境变量配置,支持 GitHub Actions、Docker、docker-compose 等多种部署方式-- `text` 模式自动清除 Markdown 语法,提供纯文本推送效果-- 详见快速开始中的「个人微信推送」配置说明+- **修复数据异常导致的崩溃问题**:解决部分用户在 GitHub Actions 环境中遇到的 `'float' object has no attribute 'lower'` 错误+- 新增双重防护机制:在数据获取阶段过滤无效标题(None、float、空字符串),同时在函数调用处添加类型检查+- 提升系统稳定性,确保在数据源返回异常格式时仍能正常运行**升级说明**(GitHub Fork 用户):-- 必须更新:`main.py`、`config/config.yaml`-- 可选更新:`.github/workflows/crawler.yml`(如使用 GitHub Actions 部署)+- 必须更新:`main.py`- 建议使用小版本升级方式:复制替换上述文件-### 2025/11/18 - mcp-v1.0.2**MCP 模块更新:**@@ -339,6 +335,19 @@ GitHub 一键 Fork 即可使用,无需编程基础。<details><summary>👉 点击展开:<strong>历史更新</strong></summary>+### 2025/11/20 - v3.1.0++- **新增个人微信推送支持**:企业微信应用可推送到个人微信,无需安装企业微信 APP+- 支持两种消息格式:`markdown`(企业微信群机器人)和 `text`(个人微信应用)+- 新增 `WEWORK_MSG_TYPE` 环境变量配置,支持 GitHub Actions、Docker、docker-compose 等多种部署方式+- `text` 模式自动清除 Markdown 语法,提供纯文本推送效果+- 详见快速开始中的「个人微信推送」配置说明++**升级说明**(GitHub Fork 用户):+- 必须更新:`main.py`、`config/config.yaml`+- 可选更新:`.github/workflows/crawler.yml`(如使用 GitHub Actions 部署)+- 建议使用小版本升级方式:复制替换上述文件+### 2025/11/12 - v3.0.5- 修复邮件发送 SSL/TLS 端口配置逻辑错误diff --git a/main.py b/main.pyindex 5080b919c8..e3c09ccad8 100644--- a/main.py+++ b/main.py@@ -20,7 +20,7 @@ import requestsimport yaml-VERSION = "3.1.0"+VERSION = "3.1.1"# === SMTP邮件配置 ===@@ -527,7 +527,11 @@ class DataFetcher:data = json.loads(response)results[id_value] = {}for index, item in enumerate(data.get("items", []), 1):- title = item["title"]+ title = item.get("title")+ # 跳过无效标题(None、float、空字符串)+ if title is None or isinstance(title, float) or not str(title).strip():+ continue+ title = str(title).strip()url = item.get("url", "")mobile_url = item.get("mobileUrl", "")@@ -949,6 +953,12 @@ def matches_word_groups(title: str, word_groups: List[Dict], filter_words: List[str]) -> bool:"""检查标题是否匹配词组规则"""+ # 防御性类型检查:确保 title 是有效字符串+ if not isinstance(title, str):+ title = str(title) if title is not None else ""+ if not title.strip():+ return False+# 如果没有配置词组,则匹配所有标题(支持显示全部新闻)if not word_groups:return True@@ -1152,8 +1162,8 @@ def count_word_frequency(source_url = title_data.get("url", "")source_mobile_url = title_data.get("mobileUrl", "")- # 找到匹配的词组- title_lower = title.lower()+ # 找到匹配的词组(防御性转换确保类型安全)+ title_lower = str(title).lower() if not isinstance(title, str) else title.lower()for group in word_groups:required_words = group["required"]normal_words = group["normal"]diff --git a/version b/versionindex a0cd9f0ccb..50e47c89ca 100644--- a/version+++ b/version@@ -1 +1 @@-3.1.0\ No newline at end of file+3.1.1\ No newline at end of file