twitter-downloader
Original:🇺🇸 English
Translated
1 scriptsChecked / no sensitive code detected
Download videos from X (Twitter) posts using twmd — a fast, API-less downloader
7installs
Sourcecrazynomad/skills
Added on
NPX Install
npx skill4agent add crazynomad/skills twitter-downloaderTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →X / Twitter Video Downloader (twmd)
Download videos from individual X (Twitter) posts using , an API-less Go-based downloader.
twmdWhen 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 or
https://x.com/username/status/123456https://twitter.com/username/status/123456
Usage
Basic Syntax
bash
python scripts/download_tweet.py "TWEET_URL" [OPTIONS]Common Scenarios
Download video from a tweet:
bash
python scripts/download_tweet.py "https://x.com/username/status/1234567890"Specify output directory:
bash
python scripts/download_tweet.py "https://x.com/username/status/1234567890" -o ~/Downloads/twitterDownload in specific quality:
bash
python scripts/download_tweet.py "https://x.com/username/status/1234567890" -q 720Print video URL without downloading:
bash
python scripts/download_tweet.py "https://x.com/username/status/1234567890" --url-onlyArguments
| Argument | Description | Default |
|---|---|---|
| X/Twitter post URL (required) | - |
| Output directory | Current directory |
| Video quality: | |
| Print video direct URL without downloading | False |
| Path to cookies file (for private/restricted content) | None |
Dependencies
bash
pip install yt-dlpNo additional setup needed. handles public X/Twitter posts without cookies or API keys.
yt-dlpOutput Structure
OutputDir/
└── <tweet_id>.mp4 # Downloaded video filetwmdAuthentication (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 as a Netscape-format
x.comfile.txt - Pass the file with :
--cookies
bash
python scripts/download_tweet.py "URL" --cookies ~/x-cookies.txtClaude Integration
When user provides an X/Twitter post URL and wants to download its video:
-
Check if yt-dlp is installed:bash
yt-dlp --version -
Install if missing:bash
pip install yt-dlp -
Execute download:bash
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: — X/Twitter frequently changes its API.
pip install -U yt-dlpQ: The tweet has no video?
A: Try to check what media yt-dlp can find. Image-only tweets will not yield a video URL.
--url-onlyQ: Need to download from a private account?
A: Export browser cookies (see Authentication section above) and pass with .
--cookiesQ: 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.).