用途:批量抓取博客文章,用于监控竞品博客或跟踪行业更新。优先走 RSS/Atom 订阅,免费且无需 API Key;对 JS 重的站点可选 Apify 回退。
主要能力:默认 auto 模式会为每个 URL 自动发现订阅源,检查 HTML 的 <link rel="alternate"> 标签,并探测常见路径如 /feed、/rss、/atom.xml、/feed.xml、/rss.xml、/blog/feed、/index.xml;支持 RSS 2.0 与 Atom;在客户端按日期和关键词过滤。
使用方式:运行 python3 skills/blog-feed-monitor/scripts/scrape_blogs.py --urls "https://example.com/blog" --days 30。多站加关键词过滤:--urls "https://blog1.com,https://blog2.com" --keywords "AI,marketing" --output summary。强制 Apify:--mode apify。
常用参数:--urls(必填,逗号分隔)、--keywords(逗号分隔,OR 逻辑)、--days(默认 30)、--max-posts(默认 50)、--mode(auto/rss/apify)、--output(json 或 summary)、--token(Apify token,可用环境变量)、--timeout(Apify 运行上限,默认 300 秒)。
适用场景:监控竞品博客、跟踪行业文章与关键词。
限制:RSS 模式免费;Apify 模式使用 jupri/rss-xml-scraper,消耗少量 Apify 积分。该 Apify 回退 actor 近期未验证,可能需要更新;RSS 模式无需它即可稳定运行。