Twitter Video Download
Download videos from Twitter/X posts using yt-dlp.
Setup
CODEBLOCK0
Usage in OpenClaw
Just tell me:
"Download this Twitter video: https://x.com/xxx/status/xxx"
Or specify a save location:
"Download video to D:\Videos: https://x.com/xxx/status/xxx"
I will automatically call this skill to execute the download.
Command Line Usage
CODEBLOCK1
Options
- -
-o, --output <path>: Output directory (default: current directory) - INLINECODE1 : Custom filename (without extension)
- INLINECODE2 : Video quality (best/bestvideo/worst)
Examples
CODEBLOCK2
Security Notes
- - No shell execution: Uses spawn with
shell: false for security - URL validation: Only accepts twitter.com and x.com URLs
- Filename sanitization: Prevents path traversal attacks
- Proxy validation: Validates proxy URL format before use
- yt-dlp: Uses the well-known, trusted yt-dlp library
Notes
- - Supports twitter.com and x.com links
- Supports GIF download (converted to MP4)
- Proxy is required for China users, otherwise SSL connection error will occur
- Videos are saved in MP4 format
💖 If this skill is useful for you, please give it a star on ClawHub to show your support! It helps others discover this skill too.
Twitter 视频下载
使用 yt-dlp 从 Twitter/X 帖子下载视频。
环境配置
bash
安装 yt-dlp
pip install yt-dlp
配置代理(中国用户必选)
Twitter/X 为海外服务,需要代理才能访问
请替换为你的代理地址
setx PROXY_URL http://你的代理地址:端口
在 OpenClaw 中使用
只需告诉我:
下载这个推特视频:https://x.com/xxx/status/xxx
或指定保存位置:
下载视频到 D:\Videos:https://x.com/xxx/status/xxx
我将自动调用此技能执行下载。
命令行使用
bash
进入技能目录
cd [技能目录]\scripts
设置代理环境变量(替换为你的代理)
set PROXY_URL=http://你的代理地址:端口
下载视频
node download.mjs https://twitter.com/用户名/status/123456789
指定输出目录
node download.mjs https://twitter.com/用户名/status/123456789 --output D:\Downloads
指定文件名
node download.mjs https://twitter.com/用户名/status/123456789 --filename 我的视频
选项
- - -o, --output <路径>:输出目录(默认:当前目录)
- -f, --filename <名称>:自定义文件名(不含扩展名)
- -q, --quality <质量>:视频质量(best/bestvideo/worst)
示例
node download.mjs https://x.com/用户名/status/123456789 --output D:\Downloads
安全说明
- - 无 shell 执行:使用 spawn 且 shell: false 确保安全
- URL 验证:仅接受 twitter.com 和 x.com 的链接
- 文件名清理:防止路径遍历攻击
- 代理验证:使用前验证代理 URL 格式
- yt-dlp:使用业界知名且可信的 yt-dlp 库
注意事项
- - 支持 twitter.com 和 x.com 链接
- 支持 GIF 下载(转换为 MP4 格式)
- 中国用户必须使用代理,否则会出现 SSL 连接错误
- 视频以 MP4 格式保存
💖 如果此技能对你有用,请在 ClawHub 上给它点个星以示支持!这也能帮助其他人发现这个技能。