npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

n8n-nodes-tech-crawler

v1.0.4

Published

N8n nodes to crawl tech news articles from Chinese tech media platforms (Zhihu, CSDN, Woshipm, Toutiao)

Downloads

532

Readme

N8n 技术情报爬虫插件

一套完整的N8n爬虫节点集合,用于爬取主流中文技术媒体平台的文章内容。

🎯 支持的平台

本插件包含8个独立的爬虫节点,支持以下技术媒体平台:

  • 知乎 (Zhihu) - 技术问答和专栏文章
  • CSDN - 中国最大的IT技术社区
  • 搜狐 (Sohu) - 科技新闻和专栏
  • 人人都是产品经理 (Woshipm) - 产品和运营专业社区
  • 今日头条 (Toutiao) - 科技资讯聚合
  • 机器之心 (Jiqizhixin) - AI和机器学习资讯
  • 雷锋网 (Leiphone) - 智能科技媒体
  • AI科技评论 - AI领域专业评论

✨ 功能特性

双模式操作

每个爬虫节点都支持两种操作模式:

  1. 列表爬取模式 - 批量获取文章列表

    • 支持关键词搜索
    • 可配置爬取数量(1-50篇)
    • 返回标题、链接、作者、摘要等基础信息
  2. 详情爬取模式 - 获取完整文章内容

    • 提取文章正文内容
    • 获取发布时间、阅读量、点赞数等详细数据
    • 提取文章标签和分类

反爬虫机制

  • 随机User-Agent模拟真实浏览器
  • 可配置请求延迟避免触发限流
  • 失败自动重试机制(可配置重试次数)
  • 支持代理配置(可选)
  • Keep-Alive连接池优化

数据标准化

所有爬虫节点输出统一的数据格式:

{
  "title": "文章标题",
  "url": "文章链接",
  "author": "作者名称",
  "publishDate": "发布时间(ISO 8601格式)",
  "content": "文章正文内容",
  "summary": "文章摘要",
  "tags": ["标签1", "标签2"],
  "readCount": 阅读数,
  "likeCount": 点赞数,
  "commentCount": 评论数,
  "coverImage": "封面图URL",
  "source": "来源平台",
  "crawledAt": "爬取时间"
}

📦 安装

方式1:通过npm安装(推荐)

npm install n8n-nodes-tech-crawler

方式2:本地开发安装

# 克隆或下载本项目
cd n8n-nodes-tech-crawler

# 安装依赖
npm install

# 构建项目
npm run build

# 链接到n8n
npm link
cd ~/.n8n/custom
npm link n8n-nodes-tech-crawler

重启n8n

安装完成后,重启n8n即可在节点面板中看到新增的8个爬虫节点。

🚀 快速开始

示例1:爬取知乎搜索结果

  1. 添加"知乎文章爬虫"节点
  2. 配置参数:
    • 操作模式:列表爬取
    • 关键词:人工智能
    • 爬取数量:10
    • 请求延迟:1000毫秒
  3. 运行工作流,获取10篇相关文章

示例2:爬取CSDN文章详情

  1. 添加"CSDN文章爬虫"节点
  2. 配置参数:
    • 操作模式:详情爬取
    • 文章URL:https://blog.csdn.net/xxxxx
  3. 运行工作流,获取完整文章内容

示例3:批量爬取多个平台

创建一个工作流,使用多个爬虫节点并行爬取不同平台:

[Start] 
  ├─> [知乎爬虫] ─> [Merge]
  ├─> [CSDN爬虫] ─> [Merge]
  └─> [机器之心爬虫] ─> [Merge] ─> [保存到数据库]

⚙️ 配置说明

基础参数

| 参数名 | 类型 | 说明 | 默认值 | |--------|------|------|--------| | 操作模式 | 选择 | list(列表)/detail(详情) | list | | 关键词 | 字符串 | 搜索关键词(列表模式) | "" | | 文章URL | 字符串 | 文章链接(详情模式) | "" | | 爬取数量 | 数字 | 爬取文章数量(列表模式) | 10 | | 请求延迟 | 数字 | 请求间隔时间(毫秒) | 1000 |

高级选项

| 参数名 | 类型 | 说明 | 默认值 | |--------|------|------|--------| | 超时时间 | 数字 | 请求超时(毫秒) | 30000 | | 失败重试 | 布尔 | 是否启用重试 | true | | 最大重试次数 | 数字 | 重试次数 | 3 |

📖 使用场景

1. 技术情报收集

定期爬取多个平台的最新技术文章,建立技术情报库。

2. 内容监控

监控特定关键词的文章发布,及时了解行业动态。

3. 竞品分析

爬取竞品相关的文章和讨论,分析市场趋势。

4. 数据分析

收集大量文章数据,进行文本分析、情感分析等。

5. 内容聚合

将多个平台的优质内容聚合到一个地方。

⚠️ 注意事项

1. 合法合规

  • 请遵守各平台的robots.txt协议
  • 仅用于个人学习和研究用途
  • 不要用于商业用途或大规模爬取
  • 尊重原创作者的版权

2. 爬取频率

  • 建议设置合理的请求延迟(1-3秒)
  • 避免在短时间内大量请求
  • 注意各平台的反爬虫策略

3. 数据准确性

  • 网站结构可能随时变化,导致爬取失败
  • 某些内容可能需要登录才能访问
  • 动态加载的内容可能无法获取

4. 错误处理

  • 启用"失败时继续"选项处理单个失败
  • 检查n8n日志了解具体错误原因
  • 必要时调整超时时间和重试次数

🛠️ 开发和调试

本地开发

# 克隆项目
git clone <repository-url>
cd n8n-nodes-tech-crawler

# 安装依赖
npm install

# 开发模式(自动重新编译)
npm run dev

# 格式化代码
npm run format

# 代码检查
npm run lint

# 修复代码问题
npm run lintfix

目录结构

n8n-nodes-tech-crawler/
├── nodes/                      # 节点实现
│   ├── ZhihuCrawler/          # 知乎爬虫
│   ├── CsdnCrawler/           # CSDN爬虫
│   ├── SohuCrawler/           # 搜狐爬虫
│   ├── WoshipmCrawler/        # 人人都是产品经理
│   ├── ToutiaoCrawler/        # 今日头条
│   ├── JiqizhixinCrawler/     # 机器之心
│   ├── LeiphoneCrawler/       # 雷锋网
│   └── AiTechReviewCrawler/   # AI科技评论
├── utils/                      # 工具类
│   └── BaseCrawler.ts         # 基础爬虫类
├── docs/                       # 文档
├── package.json
├── tsconfig.json
├── gulpfile.js
└── README.md

🤝 贡献

欢迎提交问题和改进建议!

  1. Fork 本项目
  2. 创建特性分支 (git checkout -b feature/AmazingFeature)
  3. 提交更改 (git commit -m 'Add some AmazingFeature')
  4. 推送到分支 (git push origin feature/AmazingFeature)
  5. 开启 Pull Request

📝 更新日志

v1.0.0 (2026-01-29)

  • 🎉 首次发布
  • ✨ 支持8个主流技术媒体平台
  • 🚀 双模式操作(列表/详情)
  • 🛡️ 完善的反爬虫机制
  • 📊 统一的数据格式

📄 许可证

MIT License - 详见 LICENSE 文件

🔗 相关链接

💡 技术支持

如有问题或建议,请通过以下方式联系:


免责声明:本工具仅供学习和研究使用,使用者需自行承担使用本工具可能带来的风险和责任。开发者不对使用本工具导致的任何直接或间接损失负责。