360 Secure SkillHub
360 安全技能中心

Youtube Downloader

接收用户提供的 YouTube 链接,调用仓库内 Bash 脚本下载最高画质 MP4,以 label、视频 ID 和时间戳命名后保存到宿主工作区的 assets/videos 目录;registry.json 追加记录类型、来源、videoId、label、文件名、完整路径、原链接、下载时间与文件大小。不支持直播流,私密或已删除视频会失败,年龄限制视频可能需要 cookies。

honeybee1130
honeybee1130
热度 76.34
最近更新 2026-05-11 17:27:04
分类:自动化依赖:代码执行 / 读写文件 / 第三方 API应用场景:工作流 / 自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add yt-downloader
Metadata
name
youtube-downloader
description
Download YouTube videos as MP4 at highest quality. Use when user sends a YouTube URL and wants to download/save it. Triggers on YouTube links (youtube.com, youtu.be) with download intent. Stores videos as assets with labels and registers them for the dashboard.

YouTube Downloader

Download YouTube videos as high-quality MP4 files and register them as assets.

Usage

When user sends a YouTube URL to download:

bash ~/. openclaw/workspace/skills/youtube-downloader/scripts/download.sh "YOUTUBE_URL" "label"

Parameters:

  • YOUTUBE_URL - Full YouTube URL (youtube.com/watch, youtu.be, youtube.com/shorts)
  • label - Short descriptive label (e.g., "honey-b-interview", "og-event-recap")

Example

User: "download this https://youtube.com/watch?v=abc123 and label it event-recap"

bash ~/.openclaw/workspace/skills/youtube-downloader/scripts/download.sh "https://youtube.com/watch?v=abc123" "event-recap"

Output

  • Video location: ~/.openclaw/workspace/assets/videos/{label}_{videoId}_{timestamp}.mp4
  • Registry: ~/.openclaw/workspace/assets/registry.json - JSON log of all downloaded assets

Registry Format

Each download adds an entry:

{
  "type": "video",
  "source": "youtube",
  "videoId": "abc123",
  "label": "event-recap",
  "filename": "event-recap_abc123_20260201_234500.mp4",
  "path": "/full/path/to/file.mp4",
  "url": "https://youtube.com/watch?v=abc123",
  "downloadedAt": "2026-02-01T23:45:00Z",
  "filesize": "150M"
}

Quality

Downloads best available quality:

  • Video: Highest resolution (up to 4K)
  • Audio: Best quality, merged
  • Format: MP4 (h264 + aac)

Limitations

  • No live streams
  • Private/deleted videos will fail
  • Age-restricted may need cookies