π¦ ClawHub
video-download
by @upupc
Download videos from 1800+ websites and generate subtitles using Faster Whisper AI. Use when user wants to download videos from YouTube, Bilibili, Twitter, T...
π‘ Examples
Download YouTube video:
python scripts/video_parser.py '{"urls":["https://www.youtube.com/watch?v=dQw4w9WgXcQ"],"output":"./my_videos"}'
Download Bilibili video:
python scripts/video_parser.py '{"urls":["https://www.bilibili.com/video/BV1xx411c7XD"],"output":"./downloads"}'
Download TikTok video:
python scripts/video_parser.py '{"urls":["https://www.tiktok.com/@username/video/1234567890"],"output":"./tiktok"}'
Download multiple videos from different sites:
python scripts/video_parser.py '{"urls":["https://www.youtube.com/watch?v=VIDEO1","https://www.bilibili.com/video/BV1xx","https://twitter.com/user/status/123"],"output":"./videos"}'
Download Twitch clip:
python scripts/video_parser.py '{"urls":["https://www.twitch.tv//channel/clip/ClipName"],"output":"./clips"}'
Download only (without transcription):
python scripts/video_parser.py '{"urls":["https://www.youtube.com/watch?v=VIDEO_ID"],"output":"./downloads","transcribe":false}'
Generate SRT subtitle:
python scripts/video_parser.py '{"urls":["https://www.youtube.com/watch?v=VIDEO_ID"],"output":"./downloads","subtitle_format":"srt"}'
Generate VTT subtitle:
python scripts/video_parser.py '{"urls":["https://www.youtube.com/watch?v=VIDEO_ID"],"output":"./downloads","subtitle_format":"vtt"}'
Download video with built-in subtitles:
python scripts/video_parser.py '{"urls":["https://www.youtube.com/watch?v=VIDEO_ID"],"output":"./downloads","download_subtitle":true}'
Download with custom Faster Whisper model:
python scripts/video_parser.py '{"urls":["https://www.youtube.com/watch?v=VIDEO_ID"],"output":"./downloads","model":"large"}'
Skip transcription if subtitle already exists:
python scripts/video_parser.py '{"urls":["https://www.youtube.com/watch?v=VIDEO_ID"],"output":"./downloads","overwrite_subtitle":false}'
Download video with Cookie:
python scripts/video_parser.py '{"urls":["https://www.youtube.com/watch?v=VIDEO_ID"],"output":"./downloads","cookie":"sid=xxx; token=yyy"}'
Download video with cookies from browser:
python scripts/video_parser.py '{"urls":["https://www.youtube.com/watch?v=VIDEO_ID"],"output":"./downloads","cookiesfrombrowser":"chrome"}'
Download video with cookie file:
python scripts/video_parser.py '{"urls":["https://www.youtube.com/watch?v=VIDEO_ID"],"output":"./downloads","cookiefile":"/path/to/cookies.txt"}'
Only download subtitles:
python scripts/video_parser.py '{"urls":["https://www.youtube.com/watch?v=VIDEO_ID"],"output":"./downloads","onlysubtitle":true,"cookiefile":"/path/to/cookies.txt"}'
cookiefile usage:
cookies.txt to your local machine.cookiefile to that local file path, for example:python scripts/video_parser.py '{"urls":["https://www.youtube.com/watch?v=VIDEO_ID"],"output":"./downloads","cookiefile":"/Users/yourname/Downloads/cookies.txt"}'
βοΈ Configuration
Ensure the following Python packages are installed:
yt-dlp - For downloading videos from any supported siteyt-dlp-ejs - External JavaScript for yt-dlp supporting many runtimesffmpeg-python - For audio extractionfaster-whisper - For speech-to-text transcription (faster and more memory-efficient than openai-whisper). Note: The first run will download models from HuggingFace (default: small, ~3GB). A VPN is required for mainland China users.tqdm - For progress bar display during transcriptionInstall via pip:
pip install yt-dlp yt-dlp-ejs ffmpeg-python faster-whisper tqdm
ffmpeg must also be installed on your system
π Tips & Best Practices
brew install ffmpeg (macOS) or your system's package managerTERMINAL
clawhub install video-download