Last active
June 6, 2025 09:15
-
-
Save unrevised6419/a3995cc9f8c4f0f566a4c3f208c74247 to your computer and use it in GitHub Desktop.
youtube transcript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript: (() => { | |
/* First open YT Transcript Panel, then copy paste this snippet into the console */ | |
let linesEl = [...document.querySelector('#segments-container').children]; | |
let linesTextIrregular = linesEl.map(el => el.textContent.trim()); | |
let linesText = linesTextIrregular.map(l => l.split('\n').map(s => s.trim()).filter(Boolean).join(' ')); | |
let paragraph = linesText.join('\n'); | |
navigator.clipboard.writeText(paragraph); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment