Turn a YouTube channel's latest videos into a magazine-style EPUB - fetch videos (filtering out Shorts), extract transcripts, and rewrite them into polished articles.
---
name: YouTube to Ebook
description: Transform YouTube videos into beautifully formatted, magazine-style ebook articles with transcripts, packaged as an EPUB. Use when the user wants to turn channel videos into readable articles or an ebook for any device.
---
A Python pipeline that converts a channel's latest videos into polished articles and packages them as an EPUB.
## Workflow
1. Set up a project folder and configure access: a YouTube Data API key and an Anthropic API key in `.env`, plus a `channels.txt` list (Python 3.8+).
2. Fetch the latest videos per channel via the channel's uploads playlist (`playlistItems`) for true chronological order, filtering out Shorts by checking whether the `/shorts/` URL resolves.
3. Extract transcripts with `YouTubeTranscriptApi().fetch(video_id)`, adding ~2s delays between requests to avoid rate limits.
4. Rewrite each transcript into a polished magazine-style article using Claude.
5. Package the articles into an EPUB. Run the whole pipeline with `python main.py` (or `--channels` to edit the list, `dashboard.py` for the web UI).
Full skill & source: https://github.com/zarazhangrui/youtube-to-ebook/tree/main