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-youtube-transcripts

v1.0.7

Published

An n8n node for extracting YouTube video transcripts and subtitles using yt-dlp

Readme

n8n-nodes-youtube-transcripts

一个用于提取 YouTube 视频字幕和转录的 n8n 自定义节点。

功能特点

  • 🎯 自动检测字幕:智能检测视频是否有可用字幕
  • 🌍 多语言支持:支持多种语言的字幕提取
  • 📝 多种格式:支持纯文本、SRT、VTT 格式输出
  • 🔧 基于 yt-dlp:使用强大的 yt-dlp 工具进行下载
  • 简单易用:直接输入 YouTube URL 即可获取字幕

安装

前置条件

  1. 确保您的系统已安装 yt-dlp
# 使用 pip 安装
pip install yt-dlp

# 或使用 Homebrew (macOS)
brew install yt-dlp

安装节点

npm install n8n-nodes-youtube-transcripts

使用方法

  1. 添加节点:在 n8n 工作流中添加 "YouTube Transcripts" 节点

  2. 配置参数

    • YouTube URL: 输入要处理的 YouTube 视频链接
    • Language Priority: 设置语言优先级(如:zh,en,zh-CN)
    • Include Auto-Generated: 是否包含自动生成的字幕
    • Output Format: 选择输出格式(纯文本/SRT/VTT)
  3. 运行工作流:节点会自动检测字幕并返回结果

输出数据

成功时返回:

{
  "videoId": "视频ID",
  "title": "视频标题",
  "url": "原始URL",
  "transcript": "字幕内容",
  "format": "输出格式",
  "hasSubtitles": true
}

无字幕时返回:

{
  "error": "No subtitles available for this video",
  "hasSubtitles": false
}

配置选项

Language Priority

支持的语言代码示例:

  • zh - 中文
  • en - 英文
  • zh-CN - 简体中文
  • zh-TW - 繁体中文
  • ja - 日文
  • ko - 韩文

Output Format

  • Plain Text: 纯文本格式,去除时间戳
  • SRT: 标准 SubRip 格式,包含时间戳
  • VTT: WebVTT 格式,包含时间戳

错误处理

节点会处理以下错误情况:

  • 无效的 YouTube URL
  • 视频不存在或无法访问
  • 无可用字幕
  • yt-dlp 工具未安装

示例工作流

{
  "nodes": [
    {
      "name": "YouTube Transcripts",
      "type": "n8n-youtube-transcripts",
      "parameters": {
        "youtubeUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
        "languagePriority": "zh,en",
        "includeAutoGenerated": true,
        "outputFormat": "txt"
      }
    }
  ]
}

开发

构建项目

npm run build

开发模式

npm run dev

许可证

MIT License

贡献

欢迎提交 Issue 和 Pull Request!

支持

如果您遇到问题或有建议,请:

  1. 查看 Issues
  2. 创建新的 Issue
  3. 或发送邮件至项目维护者

注意: 此工具仅用于合法的内容提取,请遵守相关法律法规和平台服务条款。