Safari Web Extension that captures the transcript visible in the YouTube transcript panel and makes it easy to copy, download, or preview.
- Scrapes every visible transcript segment (timestamp + text) from the transcript drawer.
- Automatically captures the video title, channel/creator, and page URL.
- One-click Markdown export ready for Obsidian – creators are wrapped in
[[double brackets]], timestamps stay inline. - Copy, open, or download the Markdown (Safari falls back gracefully when the downloads API is missing).
- Ships as an Xcode project ready for macOS Safari, with the raw web-extension sources kept alongside for Chrome/Chromium testing.
YTTranscriptGrabber/– Xcode project generated viasafari-web-extension-converter. All Safari-specific configuration lives here.Shared (Extension)/Resources/– Manifest, scripts, popup UI, and icons for the web extension target.Shared (App)/and platform-specific folders – Boilerplate app shells created by Xcode so you can build & run the extension container.
YTTranscriptGrabber-chrome/– The same extension assets in a Chromium-friendly layout (manifest v3). Useful for quick testing in Chrome/Edge.initial.txt– Original bootstrapping script that scaffolded the project (kept for provenance).
- Open
YTTranscriptGrabber/YTTranscriptGrabber.xcodeprojin Xcode 14 or later. - Select the YTTranscriptGrabber (macOS) scheme.
- Set your signing team (Project > Signing & Capabilities) if Xcode prompts.
- Build & Run (
⌘R). Xcode will launch the lightweight host app that prompts you to enable the extension. - Open Safari → Settings… → Extensions, enable YTTranscriptGrabber, and grant the requested permissions for
youtube.com.
- Navigate to a YouTube video and open the transcript (••• menu → Show transcript).
- Click the YTTranscriptGrabber toolbar button.
- Press Grab to pull the on-screen transcript and metadata (title, creator, link).
- The textarea fills with Markdown: the header lists
Creator: [[Name]], source URL, and capture time, followed by bullet-pointed transcript lines (- 00:00 …). - Use Copy, Download, or Show to export the Markdown.
- On Safari, the download action falls back to a save dialog because the
downloadsAPI is not available. On Chromium browsers, it uses the standard downloads API.
- On Safari, the download action falls back to a save dialog because the
- Open
chrome://extensions(or the equivalent in Edge/Brave). - Enable Developer mode.
- Click Load unpacked and choose the
YTTranscriptGrabber-chromefolder. - Pin the extension and test on any YouTube video with the transcript visible.
- The content script (
content.js) searches for#segments-containerand related transcript nodes and normalises whitespace for consistent output. - The popup (
popup.js) now feature-detects browser APIs to stay compatible with Safari’s WebExtension shims and formats Markdown with metadata. - If you make changes to files under
Shared (Extension)/Resources/, Xcode will package them automatically inside the Safari Web Extension target. - Re-run
initial.txtonly if you need to regenerate everything from scratch; otherwise edit the files in-place. - Custom icon art (
art/icon-*.png) is generated via a small Python script so you can tweak colours/shapes and regenerate as needed.
- You must open the transcript drawer for the scraper to detect segments.
- Safari currently warns that the
downloadspermission is unsupported. The extension handles this by providing a fallback download path, but Safari will still surface the warning during conversion/build.