Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YTTranscriptGrabber

Safari Web Extension that captures the transcript visible in the YouTube transcript panel and makes it easy to copy, download, or preview.

Features

  • 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.

Repository Layout

  • YTTranscriptGrabber/ – Xcode project generated via safari-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).

Build & Run on Safari (macOS)

  1. Open YTTranscriptGrabber/YTTranscriptGrabber.xcodeproj in Xcode 14 or later.
  2. Select the YTTranscriptGrabber (macOS) scheme.
  3. Set your signing team (Project > Signing & Capabilities) if Xcode prompts.
  4. Build & Run (⌘R). Xcode will launch the lightweight host app that prompts you to enable the extension.
  5. Open Safari → Settings…Extensions, enable YTTranscriptGrabber, and grant the requested permissions for youtube.com.

Using the Extension

  1. Navigate to a YouTube video and open the transcript (••• menu → Show transcript).
  2. Click the YTTranscriptGrabber toolbar button.
  3. Press Grab to pull the on-screen transcript and metadata (title, creator, link).
  4. The textarea fills with Markdown: the header lists Creator: [[Name]], source URL, and capture time, followed by bullet-pointed transcript lines (- 00:00 …).
  5. Use Copy, Download, or Show to export the Markdown.
    • On Safari, the download action falls back to a save dialog because the downloads API is not available. On Chromium browsers, it uses the standard downloads API.

Chrome / Chromium Testing (Optional)

  1. Open chrome://extensions (or the equivalent in Edge/Brave).
  2. Enable Developer mode.
  3. Click Load unpacked and choose the YTTranscriptGrabber-chrome folder.
  4. Pin the extension and test on any YouTube video with the transcript visible.

Development Notes

  • The content script (content.js) searches for #segments-container and 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.txt only 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.

Known Limitations

  • You must open the transcript drawer for the scraper to detect segments.
  • Safari currently warns that the downloads permission is unsupported. The extension handles this by providing a fallback download path, but Safari will still surface the warning during conversion/build.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages