彙總加密貨幣新聞
概述
透過 RSS feed 從超過 50 個權威來源彙總加密貨幣新聞,支援即時掃描、幣種/分類篩選與相關性評分。
先決條件
- 已安裝 Python 3.8+
- 相依套件:
pip install feedparser requests - 需有網路連線以存取 RSS feed
操作說明
-
評估使用者意圖 - 決定所需篩選條件:
- 一般新聞:無需篩選,使用預設值
- 特定幣種:提取代號(BTC、ETH 等)
- 特定分類:提取分類(defi、nft、regulatory 等)
- 特定時間範圍:提取時間區間(1h、4h、24h、7d)
-
使用適當的篩選條件執行彙總工具:
# 預設掃描(前 20 則、過去 24 小時、按相關性排序) python ${CLAUDE_SKILL_DIR}/scripts/news_aggregator.py # 特定幣種掃描 python ${CLAUDE_SKILL_DIR}/scripts/news_aggregator.py --coin BTC --period 4h # 依分類篩選 python ${CLAUDE_SKILL_DIR}/scripts/news_aggregator.py --category defi --top 30 # 多重篩選 python ${CLAUDE_SKILL_DIR}/scripts/news_aggregator.py --coin ETH --category defi --period 24h --top 15 -
匯出結果以供後續處理:
python ${CLAUDE_SKILL_DIR}/scripts/news_aggregator.py --format json --output news.json -
向使用者呈現結果:
- 顯示來源、標題、時效與相關性評分
- 若存在影響市場的關鍵詞,則加以標示
- 提供完整文章的連結
- 摘要呈現後設資訊(已檢查的來源、找到的文章數)
輸出
表格依相關性評分(0-100)排序,評分依據為市場關鍵詞偵測、來源權威性與時效性:
==============================================================================
加密貨幣新聞彙總工具 更新時間:2026-01-14 15:30
==============================================================================
熱門加密貨幣新聞(24 小時內)
------------------------------------------------------------------------------
排名 來源 標題 時效 評分
------------------------------------------------------------------------------
1 CoinDesk 比特幣突破 10 萬美元歷史新高 2h 95.0
2 The Block 美國 SEC 批准以太坊 ETF 4h 92.5
3 Decrypt Solana DeFi TVL 暴漲 6h 78.3
------------------------------------------------------------------------------
摘要:顯示 20 則新聞 | 掃描來源:50 個 | 符合條件:187 則
==============================================================================
錯誤處理
| 錯誤 | 原因 | 解決方案 |
|---|---|---|
| 網路逾時 | RSS feed 無法連線 | 使用快取資料;跳過無法存取的來源 |
| 解析錯誤 | RSS 格式錯誤 | 跳過該項目;繼續處理有效文章 |
| 無結果 | 篩選條件過於嚴格 | 建議放寬篩選條件 |
| 無效幣種 | 未知代號 | 列出相似的合法代號 |
請參閱 ${CLAUDE_SKILL_DIR}/references/errors.md 以取得完整的錯誤處理方式。
範例
常見新聞監控情境的篩選模式:
# 最新加密貨幣新聞(預設)
python ${CLAUDE_SKILL_DIR}/scripts/news_aggregator.py
# 過去 4 小時的比特幣新聞
python ${CLAUDE_SKILL_DIR}/scripts/news_aggregator.py --coin BTC --period 4h
# DeFi 分類新聞
python ${CLAUDE_SKILL_DIR}/scripts/news_aggregator.py --category defi
# 僅高相關性新聞
python ${CLAUDE_SKILL_DIR}/scripts/news_aggregator.py --min-score 70 --top 10
# 多個幣種
python ${CLAUDE_SKILL_DIR}/scripts/news_aggregator.py --coins BTC,ETH,SOL
資源
${CLAUDE_SKILL_DIR}/references/implementation.md- CLI 選項、分類、JSON 格式、進階篩選${CLAUDE_SKILL_DIR}/references/errors.md- 完整的錯誤處理${CLAUDE_SKILL_DIR}/references/examples.md- 詳細的使用範例${CLAUDE_SKILL_DIR}/config/sources.yaml- 完整的來源註冊表- CoinDesk RSS:https://www.coindesk.com/arc/outboundfeeds/rss/
- feedparser 文件:https://feedparser.readthedocs.io/