youtube-to-ebook: The Anti-SaaS Pipeline for the Slow Web
How a local Python daemon uses Claude 3.5 Sonnet to transform chaotic video feeds into curated, magazine-grade EPUBs.
- youtube-to-ebook acts as a local-first editorial desk that converts video transcripts into polished EPUBs.
- The system injects video descriptions into Claude 3.5 Sonnet to fix phonetic hallucinations and enforce a strict literary tone.
- By running as a local macOS daemon using the Supadata API, it bypasses aggressive cloud IP blocks from YouTube.
- The project prioritizes finished, readable offline products over raw Markdown knowledge graphs.
The Prompt is the Editor-in-Chief
Most transcription wrappers treat text as raw data. They summarize, extract, and dump words into a database. The youtube-to-ebook project takes a different approach. It acts as an automated editorial desk. Its goal is to produce a finished, literary product that you can read offline.
Convert YouTube videos into stylish EPUB ebooks, complete with polished transcripts and optional email delivery for effortless reading.
The most fascinating intellectual choice in the codebase is how it handles context. AI transcriptions are notorious for phonetic hallucinations. If a speaker mentions the math channel 3Blue1Brown, a raw transcript might read 'Mark Brown'. To solve this, the script passes the video description into Claude alongside the transcript to act as an anchor.
Surviving the Extraction War
Scraping YouTube is a brittle endeavor. Standard libraries are frequently rate-limited or blocked by Google. The project abandons native scraping in favor of the Supadata API. This offloads the proxy rotation and bot-detection bypass to a dedicated service.
It also employs a clever HTTP redirect hack to filter out YouTube Shorts. Instead of relying on flawed metadata, a simple requests.head call checks if the URL redirects. If it does, the script instantly discards the short-form content.
A Daemon, Not a Web App
This is deliberately not a cloud application. By running locally via macOS LaunchAgents, the tool avoids server costs and bypasses cloud IP blocks. It maintains a strict state using a local JSON file to ensure atomicity before emailing the final EPUB.
def mark_videos_processed(video_ids):
processed = load_processed_videos()
processed.update(video_ids)
with open("processed_videos.json", "w") as f:
json.dump(list(processed), f)
The Reader vs. The Note-Taker
The YouTube-to-text space is divided by philosophy. Tools like Ebrizzzz focus on Markdown for knowledge graphs and study notes. The youtube-to-ebook pipeline is built for the Slow Web reader who wants a finished, offline magazine delivered to their inbox.
| Feature | youtube-to-ebook | Ebrizzzz |
|---|---|---|
| Target Output | EPUB & Email | Markdown |
| Primary AI | Claude 3.5 Sonnet | Gemini |
| Extraction Method | Supadata API | Native API |
| Execution Environment | Local Daemon | Desktop App |
| Core Philosophy | Slow Web Reading | Knowledge Base Ingestion |