⭐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
v2.2.0
sansan49059c11d9dd
diff --git a/main.py b/main.pyindex 0b4eaa3496..6a6bda8929 100644--- a/main.py+++ b/main.py@@ -15,7 +15,7 @@ import requestsimport yaml-VERSION = "2.1.2"+VERSION = "2.2.0"# === 配置管理 ===@@ -1509,6 +1509,7 @@ def render_html_content(<meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>热点新闻分析</title>+ <script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js" integrity="sha512-BNaRQnYJYiPSqHHDb58B0yaPfCu+Wgds8Gp/gU33kqBtgNS4tSPHuGibyoeqMV/TJlSKda6FXzoEyYGjTe+vXA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script><style>* { box-sizing: border-box; }body {@@ -1534,6 +1535,33 @@ def render_html_content(color: white;padding: 32px 24px;text-align: center;+ position: relative;+ }++ .save-btn {+ position: absolute;+ top: 16px;+ right: 16px;+ background: rgba(255, 255, 255, 0.2);+ border: 1px solid rgba(255, 255, 255, 0.3);+ color: white;+ padding: 8px 16px;+ border-radius: 6px;+ cursor: pointer;+ font-size: 13px;+ font-weight: 500;+ transition: all 0.2s ease;+ backdrop-filter: blur(10px);+ }++ .save-btn:hover {+ background: rgba(255, 255, 255, 0.3);+ border-color: rgba(255, 255, 255, 0.5);+ transform: translateY(-1px);+ }++ .save-btn:active {+ transform: translateY(0);}.header-title {@@ -1837,22 +1865,63 @@ def render_html_content(font-family: 'SF Mono', Consolas, monospace;}+ .footer {+ margin-top: 32px;+ padding: 20px 24px;+ background: #f8f9fa;+ border-top: 1px solid #e5e7eb;+ text-align: center;+ }++ .footer-content {+ font-size: 13px;+ color: #6b7280;+ line-height: 1.4;+ }++ .footer-link {+ color: #4f46e5;+ text-decoration: none;+ font-weight: 500;+ transition: color 0.2s ease;+ }++ .footer-link:hover {+ color: #7c3aed;+ text-decoration: underline;+ }++ .project-name {+ font-weight: 600;+ color: #374151;+ }+@media (max-width: 480px) {body { padding: 12px; }.header { padding: 24px 20px; }.content { padding: 20px; }+ .footer { padding: 16px 20px; }.header-info { grid-template-columns: 1fr; gap: 12px; }.news-header { gap: 6px; }.news-content { padding-right: 45px; }.news-item { gap: 8px; }.new-item { gap: 8px; }.news-number { width: 20px; height: 20px; font-size: 12px; }+ .save-btn {+ position: static;+ margin-bottom: 16px;+ display: block;+ width: fit-content;+ margin-left: auto;+ margin-right: auto;+ }}</style></head><body><div class="container"><div class="header">+ <button class="save-btn" onclick="saveAsImage()">保存为图片</button><div class="header-title">热点新闻分析</div><div class="header-info"><div class="info-item">@@ -2082,7 +2151,95 @@ def render_html_content(html += """</div>++ <div class="footer">+ <div class="footer-content">+ 由 <span class="project-name">TrendRadar</span> 生成 ·+ <a href="https://github.com/sansan0/TrendRadar" target="_blank" class="footer-link">+ GitHub 开源项目+ </a>+ </div>+ </div></div>++ <script>+ async function saveAsImage() {+ const button = document.querySelector('.save-btn');+ const originalText = button.textContent;++ try {+ button.textContent = '生成中...';+ button.disabled = true;+ window.scrollTo(0, 0);++ // 等待页面稳定+ await new Promise(resolve => setTimeout(resolve, 200));++ // 截图前隐藏按钮+ button.style.visibility = 'hidden';++ // 再次等待确保按钮完全隐藏+ await new Promise(resolve => setTimeout(resolve, 100));++ const container = document.querySelector('.container');++ // 获取容器的精确位置和尺寸+ const rect = container.getBoundingClientRect();+ const computedStyle = window.getComputedStyle(container);++ const canvas = await html2canvas(container, {+ backgroundColor: '#ffffff',+ scale: 1.5,+ useCORS: true,+ allowTaint: false,+ imageTimeout: 10000,+ removeContainer: false,+ foreignObjectRendering: false,+ logging: false,+ width: container.offsetWidth,+ height: container.offsetHeight,+ x: 0,+ y: 0,+ scrollX: 0,+ scrollY: 0,+ windowWidth: window.innerWidth,+ windowHeight: window.innerHeight+ });++ button.style.visibility = 'visible';++ const link = document.createElement('a');+ const now = new Date();+ const filename = `TrendRadar_热点新闻分析_${now.getFullYear()}${String(now.getMonth() + 1).padStart(2, '0')}${String(now.getDate()).padStart(2, '0')}_${String(now.getHours()).padStart(2, '0')}${String(now.getMinutes()).padStart(2, '0')}.png`;++ link.download = filename;+ link.href = canvas.toDataURL('image/png', 1.0);++ // 触发下载+ document.body.appendChild(link);+ link.click();+ document.body.removeChild(link);++ button.textContent = '保存成功!';+ setTimeout(() => {+ button.textContent = originalText;+ button.disabled = false;+ }, 2000);++ } catch (error) {+ button.style.visibility = 'visible';+ button.textContent = '保存失败';+ setTimeout(() => {+ button.textContent = originalText;+ button.disabled = false;+ }, 2000);+ }+ }++ document.addEventListener('DOMContentLoaded', function() {+ window.scrollTo(0, 0);+ });+ </script></body></html>"""diff --git a/readme.md b/readme.mdindex ed91679435..e5e5a9f00e 100644--- a/readme.md+++ b/readme.md@@ -7,7 +7,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://work.weixin.qq.com/)[](https://telegram.org/)@@ -25,7 +25,7 @@> 遇到问题提 issues,或【硅基茶水间】公众号留言<details>-<summary>👉 点击查看<strong>致谢名单</strong> (当前 <strong>🔥18🔥</strong> 位)</summary>+<summary>👉 点击查看<strong>致谢名单</strong> (当前 <strong>🔥19🔥</strong> 位)</summary>### 数据支持@@ -45,6 +45,7 @@| 点赞人 | 金额 | 日期 | 备注 || :-------------------------: | :----: | :----: | :-----------------------: |+| **昊 | 5 | 2025.9.17 | || *号 | 1 | 2025.9.15 | || T*T | 2 | 2025.9.15 | 点赞 || *家 | 10 | 2025.9.10 | |@@ -133,7 +134,7 @@GitHub 一键 Fork 即可使用,无需编程基础。-> 30秒部署: GitHub Pages(网页浏览)+> 30秒部署: GitHub Pages(网页浏览)支持一键保存成图片,随时分享给他人>> 1分钟部署: 企业微信(手机通知)@@ -230,14 +231,23 @@ GitHub 一键 Fork 即可使用,无需编程基础。>> 下一次**新功能**,大概会是 ai 分析功能(大概(●'◡'●)-### 2025/09/13 - v2.1.2+### 2025/09/17 - v2.2.0-- 解决钉钉的推送容量限制导致的新闻推送失败问题(采用分批推送)+- 新增一键保存新闻图片功能,让你轻松分享关注的热点+**使用说明**:+- 适用场景:当你按照教程开启了网页版功能后(GitHub Pages)+- 使用方法:用手机或电脑打开该网页链接,点击页面顶部的"保存为图片"按钮+- 实际效果:系统会自动将当前的新闻报告制作成一张精美图片,保存到你的手机相册或电脑桌面+- 分享便利:你可以直接把这张图片发给朋友、发到朋友圈,或分享到工作群,让别人也能看到你发现的重要资讯<details><summary><strong>👉 历史更新</strong></summary>+### 2025/09/13 - v2.1.2++- 解决钉钉的推送容量限制导致的新闻推送失败问题(采用分批推送)+### 2025/09/04 - v2.1.1- 修复docker在某些架构中无法正常运行的问题diff --git a/version b/versionindex 8f9174b4dd..e3a4f19336 100644--- a/version+++ b/version@@ -1 +1 @@-2.1.2\ No newline at end of file+2.2.0\ No newline at end of file