跳到主要内容
知仓学习社ZHICANG

video-downloader

Download YouTube videos with customizable quality and format options. Use this skill when the user asks to download, save, or grab YouTube videos. S…

执行命令严重 0 · 高危 5davepoon/buildwithclaude

它会碰到什么

扫了多少2 个文本文件,11 KB
它会碰到什么执行命令
命中总数5 处
命中统计严重 0 · 高 5 · 中 0 · 低 0
逐条看命中(5 条严重或高危)
  • scripts/download_video.py:43exec-spawn
    subprocess.run(
  • scripts/download_video.py:59exec-spawn
    subprocess.run(
  • scripts/download_video.py:71exec-spawn
    subprocess.run(
  • scripts/download_video.py:137exec-spawn
    result = subprocess.run(
  • scripts/download_video.py:226exec-spawn
    subprocess.run(cmd, check=True)

这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。

技能内容

YouTube Video Downloader

Download YouTube videos with full control over quality and format settings.

Quick Start

The simplest way to download a video:

python scripts/download_video.py "https://www.youtube.com/watch?v=VIDEO_ID"

This downloads the video in best available quality as MP4 to /mnt/user-data/outputs/.

Options

Quality Settings

Use -q or --quality to specify video quality:

  • best (default): Highest quality available
  • 1080p: Full HD
  • 720p: HD
  • 480p: Standard definition
  • 360p: Lower quality
  • worst: Lowest quality available

Example:

python scripts/download_video.py "URL" -q 720p

Format Options

Use -f or --format to specify output format (video downloads only):

  • mp4 (default): Most compatible
  • webm: Modern format
  • mkv: Matroska container

Example:

python scripts/download_video.py "URL" -f webm

Audio Only

Use -a or --audio-only to download only audio as MP3:

python scripts/download_video.py "URL" -a

Custom Output Directory

Use -o or --output to specify a different output directory:

python scripts/download_video.py "URL" -o /path/to/directory

Complete Examples

  1. Download video in 1080p as MP4:
python scripts/download_video.py "https://www.youtube.com/watch?v=dQw4w9WgXcQ" -q 1080p
  1. Download audio only as MP3:
python scripts/download_video.py "https://www.youtube.com/watch?v=dQw4w9WgXcQ" -a
  1. Download in 720p as WebM to custom directory:
python scripts/download_video.py "https://www.youtube.com/watch?v=dQw4w9WgXcQ" -q 720p -f webm -o /custom/path

Supported URLs

  • HTTPS onlyhttp:// links are rejected.
  • YouTube hosts only — allowed hostnames include youtube.com (and subdomains such as www, m, music), youtu.be, and youtube-nocookie.com (including www). Other sites are rejected.

yt-dlp installation

The script does not install packages into your system Python (no --break-system-packages).

  1. If yt-dlp is on your PATH, it is used.
  2. Otherwise it creates a local virtualenv at video-downloader/.venv, installs yt-dlp there with pip, and runs that binary.
  3. If venv creation or install fails, follow the printed message or install globally, for example: pipx install yt-dlp, brew install yt-dlp, or your OS package manager.

The .venv directory is gitignored and stays inside the skill folder.

How It Works

The skill uses yt-dlp, a robust YouTube downloader that:

  • Resolves yt-dlp via PATH or the skill-local .venv as described above
  • Fetches video information before downloading
  • Selects the best available streams matching your criteria
  • Merges video and audio streams when needed
  • Supports a wide range of YouTube video formats

Important Notes

  • Downloads are saved to /mnt/user-data/outputs/ by default
  • Video filename is automatically generated from the video title
  • Only single videos are downloaded (playlists are skipped by default)
  • Higher quality videos may take longer to download and use more disk space

想直接用这个技能?

本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。

它属于哪个仓库

星标★ 3,470
本站分层T1
该仓技能数381
原文件路径plugins/all-skills/skills/video-downloader/SKILL.md

同一个仓库里的其他技能

看这个仓库的全部 381 个技能