Skip to content

Instantly share code, notes, and snippets.

@dannyow
Last active July 23, 2024 23:36
Show Gist options
  • Save dannyow/04c2b8170e672ffcef350613da4f58f3 to your computer and use it in GitHub Desktop.
Save dannyow/04c2b8170e672ffcef350613da4f58f3 to your computer and use it in GitHub Desktop.
Extract chapters from YT playlist with yt-dlp and jq
# Extract chapters from YT playlist
# Each chapter will be printed out as a valid markdown link to the chapter, with its title
yt-dlp --dump-json https://www.youtube.com/playlist\?list\=$PLAYLIST_ID | jq --raw-output '.id as $id | .chapters[] | "[\(.title)](https://youtu.be/watch?v=\($id)&t=\(.start_time))"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment