yt-dlp-downloader by mapleshaw/yt-dlp-downloader-skill
npx skills add https://github.com/mapleshaw/yt-dlp-downloader-skill --skill yt-dlp-downloader使用 yt-dlp 从数千个网站下载视频。
下载前,请验证依赖项是否已安装:
# 检查 yt-dlp
which yt-dlp || echo "yt-dlp not installed. Install with: pip install yt-dlp"
# 检查 ffmpeg(音频提取和格式合并所需)
which ffmpeg || echo "ffmpeg not installed. Install with: brew install ffmpeg"
如果未安装,请先安装它们:
pip install yt-dlp
brew install ffmpeg # macOS
yt-dlp -P "~/Downloads/yt-dlp" "VIDEO_URL"
YouTube 经常因 403 错误而阻止直接下载。对于 YouTube,请始终使用浏览器 cookies:
yt-dlp -P "~/Downloads/yt-dlp" --cookies-from-browser chrome "YOUTUBE_URL"
支持的浏览器:chrome, firefox, , , ,
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
safariedgebraveoperayt-dlp -P "/path/to/save" -o "%(title)s.%(ext)s" "VIDEO_URL"
yt-dlp -P "~/Downloads/yt-dlp" "VIDEO_URL"
yt-dlp -P "~/Downloads/yt-dlp" -x --audio-format mp3 "VIDEO_URL"
yt-dlp -P "~/Downloads/yt-dlp" --write-subs --sub-langs all "VIDEO_URL"
720p:
yt-dlp -P "~/Downloads/yt-dlp" -f "bestvideo[height<=720]+bestaudio/best[height<=720]" "VIDEO_URL"
1080p:
yt-dlp -P "~/Downloads/yt-dlp" -f "bestvideo[height<=1080]+bestaudio/best[height<=1080]" "VIDEO_URL"
最佳可用质量:
yt-dlp -P "~/Downloads/yt-dlp" -f "bestvideo+bestaudio/best" "VIDEO_URL"
yt-dlp -F "VIDEO_URL"
然后通过 ID 下载特定格式:
yt-dlp -P "~/Downloads/yt-dlp" -f FORMAT_ID "VIDEO_URL"
# 下载整个播放列表
yt-dlp -P "~/Downloads/yt-dlp" -o "%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s" "PLAYLIST_URL"
# 下载特定范围(例如,第 1-5 项)
yt-dlp -P "~/Downloads/yt-dlp" -I 1:5 "PLAYLIST_URL"
yt-dlp -P "~/Downloads/yt-dlp" --write-thumbnail "VIDEO_URL"
当用户提供视频 URL 时:
识别平台 :
--cookies-from-browser chrome询问用户需求(如果未指定):
根据需求构建命令
使用 Shell 工具执行下载,并设置 required_permissions: ["all", "network"]
处理错误 :
--cookies-from-browser 重试-F 列出格式,然后选择报告结果 - 文件位置和任何错误
用户:"帮我下载这个视频 https://www.youtube.com/watch?v=xxx"
回复:
# YouTube - 使用 cookies 避免 403 错误
yt-dlp -P "~/Downloads/yt-dlp" --cookies-from-browser chrome "https://www.youtube.com/watch?v=xxx"
用户:"下载这个视频的音频 https://www.bilibili.com/video/xxx"
回复:
# Bilibili - 提取音频为 MP3
yt-dlp -P "~/Downloads/yt-dlp" -x --audio-format mp3 "https://www.bilibili.com/video/xxx"
用户:"下载这个 Twitter 视频 https://twitter.com/xxx/status/123"
回复:
# Twitter/X - 直接下载通常有效
yt-dlp -P "~/Downloads/yt-dlp" "https://twitter.com/xxx/status/123"
yt-dlp 支持数千个网站,包括:
| 错误 | 原因 | 解决方案 |
|---|---|---|
| HTTP 403 禁止访问 | YouTube 阻止未经身份验证的请求 | 使用 --cookies-from-browser chrome |
| 视频不可用 | 地区限制或私密视频 | 使用 cookies 或 VPN |
| 下载中断 | 网络问题 | 重试 - yt-dlp 会自动恢复 |
| 格式不可用 | 请求的格式不存在 | 使用 -F 列出格式 |
pip install yt-dlp
brew install ffmpeg # macOS
这是 YouTube 最常见的错误。对于 YouTube,请始终使用 cookies:
# YouTube 推荐方法
yt-dlp -P "~/Downloads/yt-dlp" --cookies-from-browser chrome "YOUTUBE_URL"
支持的浏览器:chrome, firefox, safari, edge, brave, opera
# 尝试使用浏览器 cookies
yt-dlp --cookies-from-browser chrome "VIDEO_URL"
# 或使用特定格式
yt-dlp -F "VIDEO_URL" # 先列出格式
yt-dlp -f FORMAT_ID "VIDEO_URL"
# 更新 yt-dlp 到最新版本
pip install -U yt-dlp
# 强制使用 IPv4(有时有助于解决连接问题)
yt-dlp -4 "VIDEO_URL"
--cookies-from-browser chromepip install -U yt-dlp-F每周安装次数
225
仓库
GitHub 星标数
168
首次出现
Jan 27, 2026
安全审计
安装于
opencode206
gemini-cli197
codex193
cursor188
github-copilot176
kimi-cli165
Download videos from thousands of websites using yt-dlp.
Before downloading, verify dependencies are installed:
# Check yt-dlp
which yt-dlp || echo "yt-dlp not installed. Install with: pip install yt-dlp"
# Check ffmpeg (required for audio extraction and format merging)
which ffmpeg || echo "ffmpeg not installed. Install with: brew install ffmpeg"
If not installed, install them first:
pip install yt-dlp
brew install ffmpeg # macOS
yt-dlp -P "~/Downloads/yt-dlp" "VIDEO_URL"
YouTube often blocks direct downloads with 403 errors. Always use browser cookies for YouTube:
yt-dlp -P "~/Downloads/yt-dlp" --cookies-from-browser chrome "YOUTUBE_URL"
Supported browsers: chrome, firefox, safari, edge, brave, opera
yt-dlp -P "/path/to/save" -o "%(title)s.%(ext)s" "VIDEO_URL"
yt-dlp -P "~/Downloads/yt-dlp" "VIDEO_URL"
yt-dlp -P "~/Downloads/yt-dlp" -x --audio-format mp3 "VIDEO_URL"
yt-dlp -P "~/Downloads/yt-dlp" --write-subs --sub-langs all "VIDEO_URL"
720p:
yt-dlp -P "~/Downloads/yt-dlp" -f "bestvideo[height<=720]+bestaudio/best[height<=720]" "VIDEO_URL"
1080p:
yt-dlp -P "~/Downloads/yt-dlp" -f "bestvideo[height<=1080]+bestaudio/best[height<=1080]" "VIDEO_URL"
Best available:
yt-dlp -P "~/Downloads/yt-dlp" -f "bestvideo+bestaudio/best" "VIDEO_URL"
yt-dlp -F "VIDEO_URL"
Then download specific format by ID:
yt-dlp -P "~/Downloads/yt-dlp" -f FORMAT_ID "VIDEO_URL"
# Download entire playlist
yt-dlp -P "~/Downloads/yt-dlp" -o "%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s" "PLAYLIST_URL"
# Download specific range (e.g., items 1-5)
yt-dlp -P "~/Downloads/yt-dlp" -I 1:5 "PLAYLIST_URL"
yt-dlp -P "~/Downloads/yt-dlp" --write-thumbnail "VIDEO_URL"
When user provides a video URL:
Identify the platform :
--cookies-from-browser chromeAsk what they want (if not specified):
Construct the command based on requirements
Execute the download using Shell tool with required_permissions: ["all", "network"]
Handle errors :
--cookies-from-browser-F to list formats, then selectUser: "帮我下载这个视频 https://www.youtube.com/watch?v=xxx"
Response:
# YouTube - use cookies to avoid 403 errors
yt-dlp -P "~/Downloads/yt-dlp" --cookies-from-browser chrome "https://www.youtube.com/watch?v=xxx"
User: "下载这个视频的音频 https://www.bilibili.com/video/xxx"
Response:
# Bilibili - extracting audio as MP3
yt-dlp -P "~/Downloads/yt-dlp" -x --audio-format mp3 "https://www.bilibili.com/video/xxx"
User: "下载这个 Twitter 视频 https://twitter.com/xxx/status/123"
Response:
# Twitter/X - direct download usually works
yt-dlp -P "~/Downloads/yt-dlp" "https://twitter.com/xxx/status/123"
yt-dlp supports thousands of sites including:
Full list: https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md
| Error | Cause | Solution |
|---|---|---|
| HTTP 403 Forbidden | YouTube blocks unauthenticated requests | Use --cookies-from-browser chrome |
| Video unavailable | Geo-restricted or private | Use cookies or VPN |
| Download interrupted | Network issues | Retry - yt-dlp auto-resumes |
| Format not available | Requested format doesn't exist | Use -F to list formats |
pip install yt-dlp
brew install ffmpeg # macOS
This is the most common YouTube error. Always use cookies for YouTube:
# Recommended approach for YouTube
yt-dlp -P "~/Downloads/yt-dlp" --cookies-from-browser chrome "YOUTUBE_URL"
Supported browsers: chrome, firefox, safari, edge, brave, opera
# Try with cookies from browser
yt-dlp --cookies-from-browser chrome "VIDEO_URL"
# Or use a specific format
yt-dlp -F "VIDEO_URL" # List formats first
yt-dlp -f FORMAT_ID "VIDEO_URL"
# Update yt-dlp to latest version
pip install -U yt-dlp
# Force IPv4 (sometimes helps with connection issues)
yt-dlp -4 "VIDEO_URL"
--cookies-from-browser chromepip install -U yt-dlp-F before downloading if unsureWeekly Installs
225
Repository
GitHub Stars
168
First Seen
Jan 27, 2026
Security Audits
Gen Agent Trust HubFailSocketPassSnykWarn
Installed on
opencode206
gemini-cli197
codex193
cursor188
github-copilot176
kimi-cli165
通过 LiteLLM 代理让 Claude Code 对接 GitHub Copilot 运行 | 高级变通方案指南
29,800 周安装
Report the result - file location and any errors