← 返回
未分类 中文

Clip Media

Extract media (videos, photos, GIFs, audio) from social media URLs using yt-dlp. Supports 1,872+ platforms including YouTube, TikTok, Instagram, X/Twitter, F...
使用yt-dlp从社交媒体URL提取媒体(视频、照片、GIF、音频)。支持1872+平台,包括YouTube、TikTok、Instagram、X/Twitter、Facebook等。
jlacroix82 jlacroix82 来源
未分类 clawhub v0.3.1 3 版本 100000 Key: 无需
★ 2
Stars
📥 337
下载
💾 1
安装
3
版本
#latest

概述

Clip

⚠️ Security warnings before use:

  • Files over 50 MB require --confirm-upload to upload to public third-party hosts (tmpfiles.org, transfer.sh)
  • Browser cookie access (--cookies-from-browser) exposes active session tokens for any platform you're logged into
  • Never use with private, paid, confidential, copyrighted, or regulated content unless you explicitly intend external transmission

How It Works

  1. User shares a URL from any supported platform
  2. Run the extraction script
  3. Script downloads the media (or just analyzes it)
  4. Returns the file path (under 50 MB) or a cloud link (over 50 MB)
  5. Agent sends the media to the user

⚠️ Before any extraction: Confirm the content is not private, paid, or sensitive. Files over 50 MB are uploaded to public temp hosts — the script now shows a pre-upload warning and supports --no-upload to skip it entirely.

Command

node /home/jarvis/.openclaw/workspace/skills/clip/extract.js <url> [options]

Options

FlagDescription
-------------------
--output-dir Save location (default: /tmp/media-share)
--titleReturn title/description only, no download
--infoReturn full metadata as JSON
--testValidate URL without downloading
--uploadForce cloud upload even for small files
--confirm-uploadRequired for any public cloud upload — explicit opt-in
--cloud=Cloud provider: tmpfiles or transfer
--no-direct-sendAlways return path, never auto-send
--no-uploadSkip cloud upload entirely — always return local path
--list-sitesShow supported platforms
--list-typesShow what media a URL contains

Examples

# Download media (fastest path)
node /home/jarvis/.openclaw/workspace/skills/clip/extract.js "https://www.youtube.com/watch?v=dQw4w9WgXcQ"

# Get title only (no download, instant)
node /home/jarvis/.openclaw/workspace/skills/clip/extract.js "https://www.instagram.com/p/abc123/" --title

# Check what's in a URL before downloading
node /home/jarvis/.openclaw/workspace/skills/clip/extract.js "https://www.tiktok.com/@user/video/123" --list-types

# Show supported sites
node /home/jarvis/.openclaw/workspace/skills/clip/extract.js --list-sites

Supported Platforms

yt-dlp: 1,872 extractors — covers essentially every major media platform on the internet.

Quick reference (most common):

YouTube, TikTok, Instagram, X/Twitter, Facebook, Reddit, Twitch, Vimeo, Dailymotion, Rumble, Peertube, Bilibili, Niconico, SoundCloud, Bandcamp, Pinterest, Imgur, Tumblr, Flickr, Bluesky, Telegram, Kick, Odysee, CNN, BBC, Al Jazeera, TED, Khan Academy, Udemy, Crunchyroll, HiDive, and 1,800+ more.

File Size Handling

  • Under 50 MB → Returns local file path (agent sends via chat)
  • Over 50 MB → Requires --confirm-upload to upload to temp cloud storage, returns download link
  • Over 50 MB without --confirm-upload → Returns local path only, blocks upload with clear message
  • Over 50 MB + --upload → Forces cloud upload even for smaller files (still requires --confirm-upload)

Cloud Providers

⚠️ Both providers are public and third-party. Uploaded files are accessible to anyone with the link.

ProviderMax SizeNotes
---------------------------
tmpfiles50 MBSimple, no signup, auto-delete
transferUnlimitedtransfer.sh, 30-day retention

Pre-upload warning: Files over 50 MB require --confirm-upload for any public cloud upload. Without it, the script returns the local path only and blocks the upload with a clear message. Use --no-upload to always save locally without prompts.

Authentication

⚠️ Browser cookie access exposes active session tokens for every platform you're logged into.

Some platforms require cookies for full access:

PlatformNeeds cookies?
-------------------------
InstagramSometimes (private content, full resolution)
X / TwitterSometimes (rate limits, some content)
PatreonYes (paid content)
OnlyFansYes
Fanvue / FanslyYes
Netflix / HBO / Disney+Via browser cookies
YouTubeRarely (age-restricted content)

If cookies are needed:

  • Use --cookies-from-browser chrome as a last resort — it exposes ALL platform session tokens in that browser
  • Warn the user that this could enable unauthorized account access if the machine is compromised
  • Prefer manual cookie paste or API keys when available
  • Never use --cookies-from-browser with paid/sensitive platforms unless the user explicitly consents to the risk
  • Consider exporting cookies from only the specific browser/profile needed, not the default one

How It Works (Under the Hood)

  1. Analyze: yt-dlp --dump-json detects the platform and media type
  2. Download: yt-dlp -o grabs the highest quality version
  3. Route: Under 50 MB → return path. Over 50 MB → upload to cloud → return link
  4. Fallback: If download fails, returns title/description so the agent can inform the user

Dependencies

  • yt-dlp (installed) — 1,872 extractors
  • ffmpeg (installed) — format conversion
  • curl (installed) — cloud uploads

Error Handling

When a URL returns no media, the script returns the title/description. The agent should:

  • Inform the user what was found
  • Suggest trying --cookies-from-browser chrome if the platform may require auth
  • Note that geo-blocked content cannot be bypassed

Notes

  • Rate limits may apply on some platforms — add delays between calls
  • Some platforms (Instagram, X) work better with cookies
  • If a URL returns no media, return the title/description to the user instead
  • The generic extractor handles many embedded video players not explicitly listed

版本历史

共 3 个版本

  • v0.3.1 当前
    2026-06-14 19:50 安全 安全
  • v0.3.0
    2026-06-06 06:57 安全 安全
  • v0.1.0
    2026-05-26 18:22 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

data-analysis

Tavily 搜索

jacky1n7
通过 Tavily API 进行网页搜索(Brave 替代方案)。当用户要求搜索网页、查找来源或链接,且 Brave 网页搜索不可用时使用。
★ 273 📥 100,242
data-analysis

Data Analysis

ivangdavila
{"answer":"数据分析与可视化。查询数据库、生成报告、自动化电子表格,将原始数据转化为清晰可行的见解。适用于:(1) 您……"}
★ 208 📥 68,455
ai-agent

Memory Router

jlacroix82
OpenClaw 技能,自动分层臃肿的 MEMORY.md,生成智能的每次会话清单,仅路由关键信息——上下文缩减 70-85%,零性能下降。
★ 3 📥 665