JimmySadek/video-fetcher-to-markdown
youtube-fetcher
VerifiedRetrieve transcripts from YouTube, Instagram, TikTok, X, Vimeo and other video sites, summarize or analyze what was said (and shown on screen), or save an Obsidian-ready Markdown knowledge-base note with captions or a Whisper transcript, creator metadata, frames, language, and source provenance. Use for a video URL, video ID or local video file when the request needs spoken content, on-screen text, or an archival note. A bare video link defaults to saving a note.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 12.0 KB |
| agents/openai.yaml | config | 258 B |
| assets/banner.png | binary | 1.5 MB |
| scripts/browser_media_links.js | script | 2.7 KB |
| scripts/fetch_media.py | script | 28.5 KB |
| scripts/fetch_transcript.pyexecutable | script | 34.0 KB |
scripts/browser_media_links.js
View on GitHub// Browser fallback for fetch_media.py: run this in the page of a video the site will not hand to yt-dlp
// (for example an Instagram reel without a login). It returns the best direct audio and video links the
// page already knows about. Download both at once with curl: the links are signed and expire.
// Instagram serves picture and sound separately (DASH); other sites often give one combined file ("video").
// Sites that stream in pieces expose a playlist instead ("stream", .m3u8 or .mpd): pass that URL to
// fetch_media.py with --source-url set to the page, and yt-dlp downloads the pieces.
(() => {
const html = document.documentElement.innerHTML;
// Pages embed links JSON-escaped, sometimes twice: \/ for /, & for &, % for %, < for <.
const unescape = s => s
.replace(/\\+u([0-9a-fA-F]{4})/g, (_, hex) => String.fromCharCode(parseInt(hex, 16)))
.replace(/\\+\//g, '/')
.replace(/&/g, '&');
const clean = u => unescape(u).split(/[<"'\s]/)[0].replace(/\\+$/, '');
const found = pattern => (html.match(pattern) || []).map(clean);
const network = performance.getEntriesByType('resource').map(e => e.name);
const strip = u => {
try { const x = new URL(u); x.searchParams.delete('bytestart'); x.searchParams.delete('byteend'); return x.toString(); }
catch (e) { return null; }
};
const files = [...new Set([
...found(/https:(?:\\*\/){2}[^"'\s]+?\.mp4[^"'\s]*/g),
...network.filter(u => /\.mp4$/.test(u.split('?')[0])),
...[...document.querySelectorAll('video[src], video source[src]')].map(v => v.src).filter(u => /^https?:/.test(u)),
].map(strip).filter(Boolean))];
// Instagram and Facebook describe each rendition in a base64 "efg" parameter (vencode_tag, bitrate).
const tag = u => {
try { const e = new URL(u).searchParams.get('efg'); return JSON.parse(atob(e.replace(/-/g, '+').replace(/_/g, '/'))); }
catch (e) { return {}; }
};
const items = files.map(u => ({ u, t: tag(u) }));
const isAudio = i => /audio/i.test(i.t.vencode_tag || '');
const best = list => list.sort((a, b) => (b.t.bitrate || 0) - (a.t.bitrate || 0))[0];
const audio = best(items.filter(isAudio));
const video = best(items.filter(i => !isAudio(i)));
const streams = [...new Set([
...found(/https:(?:\\*\/){2}[^"'\s]+?\.(?:m3u8|mpd)[^"'\s]*/g),
...network.filter(u => /\.(m3u8|mpd)$/.test(u.split('?')[0])),
])];
const meta = p => (document.querySelector(`meta[property="${p}"]`) || {}).content || '';
return {
found: items.length,
audio: audio ? audio.u : null,
video: video ? video.u : null,
stream: streams.find(u => /master|playlist|manifest/i.test(u)) || streams[0] || null,
title: meta('og:title') || document.title,
description: meta('og:description'),
page: location.href,
};
})()
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| add-product-e2e-evalpaperclipai/paperclipAdd or extend a Paperclip full-stack runner E2E workflow, fixture, matcher, or report evidence path for local or Daytona execution. | Stars: 115k | Updated | Claude CodeCodex | Verified | Install |
| add-runner-evalpaperclipai/paperclipAdd or extend a Paperclip Runner protocol evaluation definition, roster, assertion, or report fixture with provenance and narrow validation. | Stars: 115k | Updated | Claude CodeCodex | Verified | Install |
| diagnose-why-work-stoppedpaperclipai/paperclipCompatibility entry point for failed, stalled, looping, or over-recovered Paperclip work. Use fix-failed-paperclip-run for the full diagnosis, regression, repair, real verification, and green-PR workflow; honor an explicitly requested diagnosis-only scope. | Stars: 115k | Updated | Claude CodeCodex | Verified | Install |
| fix-failed-paperclip-runpaperclipai/paperclipDiagnose and fix failed, stuck, slow, or incorrectly blocked Paperclip tasks and runs. Use with a task/run URL or failure report to trace the root cause, prove a regression red then green, check second-order effects, verify the real workflow, and deliver a PR with passing checks. | Stars: 115k | Updated | Claude CodeCodex | Verified | Install |