Track bundled vendor runtime sources
Some checks failed
CI / main (push) Has been cancelled
CI / release-e2e (push) Has been cancelled

This commit is contained in:
2026-07-07 10:05:50 +08:00
parent fbe179ab53
commit 52636c91ae
2111 changed files with 1850012 additions and 14 deletions

View File

@@ -0,0 +1,27 @@
# -*- coding: utf-8 -*-
"""RSS — check if feedparser is available."""
from .base import Channel
class RSSChannel(Channel):
name = "rss"
description = "RSS/Atom 订阅源"
backends = ["feedparser"]
tier = 0
def can_handle(self, url: str) -> bool:
return any(x in url.lower() for x in ["/feed", "/rss", ".xml", "atom"])
def check(self, config=None):
try:
import feedparser # noqa: F401
except ImportError:
self.active_backend = None
return "off", "feedparser 未安装。安装pip install feedparser"
except Exception as e:
# 已安装但导入期崩溃(半残安装/版本冲突)→ 重装处方
self.active_backend = None
return "error", f"feedparser 导入失败:{e}\n修复pip install --force-reinstall feedparser"
self.active_backend = self.backends[0]
return "ok", "可读取 RSS/Atom 源"