twitter-downloader
X / Twitter Video Downloader (twmd)
Download videos from individual X (Twitter) posts using twmd, an API-less Go-based downloader.
When to Use
Use this skill when users:
- Provide an X/Twitter post URL and want to download its video
- Mention "下载推文视频", "download Twitter video", "save X video", "下载 X 视频"
- Share a link like
https://x.com/username/status/123456orhttps://twitter.com/username/status/123456
Usage
Basic Syntax
python scripts/download_tweet.py "TWEET_URL" [OPTIONS]
Common Scenarios
Download video from a tweet:
python scripts/download_tweet.py "https://x.com/username/status/1234567890"
Specify output directory:
python scripts/download_tweet.py "https://x.com/username/status/1234567890" -o ~/Downloads/twitter
Download in specific quality:
python scripts/download_tweet.py "https://x.com/username/status/1234567890" -q 720
Print video URL without downloading:
python scripts/download_tweet.py "https://x.com/username/status/1234567890" --url-only
Arguments
| Argument | Description | Default |
|---|---|---|
url |
X/Twitter post URL (required) | - |
-o, --output |
Output directory | Current directory |
-q, --quality |
Video quality: best, 1080, 720, 480 |
best |
--url-only |
Print video direct URL without downloading | False |
--cookies |
Path to cookies file (for private/restricted content) | None |
Dependencies
pip install yt-dlp
No additional setup needed. yt-dlp handles public X/Twitter posts without cookies or API keys.
Output Structure
OutputDir/
└── <tweet_id>.mp4 # Downloaded video file
twmd names files by tweet ID. The script reports the file path after download.
Authentication (Optional)
For private accounts or login-gated content, export cookies from your browser:
- Install a browser extension like "Get cookies.txt LOCALLY"
- Log in to X, then export cookies for
x.comas a Netscape-format.txtfile - Pass the file with
--cookies:
python scripts/download_tweet.py "URL" --cookies ~/x-cookies.txt
Claude Integration
When user provides an X/Twitter post URL and wants to download its video:
-
Check if yt-dlp is installed:
yt-dlp --version -
Install if missing:
pip install yt-dlp -
Execute download:
python twitter-downloader/scripts/download_tweet.py "TWEET_URL" -o ./output -
Report the downloaded file to the user with its path and size.
Common Issues
Q: Download fails with "Unable to extract" error?
A: Update yt-dlp first: pip install -U yt-dlp — X/Twitter frequently changes its API.
Q: The tweet has no video?
A: Try --url-only to check what media yt-dlp can find. Image-only tweets will not yield a video URL.
Q: Need to download from a private account?
A: Export browser cookies (see Authentication section above) and pass with --cookies.
Q: Why not just use youtube-downloader for Twitter URLs? A: You can — yt-dlp handles Twitter URLs too. This skill provides a Twitter-focused interface with cleaner prompts and no unneeded options (playlists, subtitles, etc.).
References
More from crazynomad/skills
doc-mindmap
文档智能整理助手 - 批量转换办公文档为 Markdown,本地模型生成摘要,三维度软链接分类
202file-organizer
Mac 智能文件整理助手,专注整理下载文件夹中的办公文档,避免误移动代码文件
99pdf-to-images
Convert PDF files into a series of images (PNG/JPG) using ImageMagick
71youtube-downloader
Download videos from YouTube and 1000+ other sites using yt-dlp
67disk-cleaner
Mac 智能磁盘清理助手,基于 Mole (https://github.com/tw93/Mole) 的用户友好包装器
43file-master
Mac 文件管理大师 - 将磁盘清理、文件整理、文档分析串成「清 → 理 → 知」三阶段工作流
39