Skip to content

fix: robust multi-client YouTube transcript provider#64

Merged
zarazhangrui merged 1 commit into
mainfrom
fix/robust-transcript-provider
Apr 1, 2026
Merged

fix: robust multi-client YouTube transcript provider#64
zarazhangrui merged 1 commit into
mainfrom
fix/robust-transcript-provider

Conversation

@zarazhangrui
Copy link
Copy Markdown
Collaborator

Summary

  • Replaces the single-client (Android-only) InnerTube transcript fetcher with a multi-client fallback chain: Android → Web → iOS
  • When YouTube blocks one client identity (bot detection, rate limiting), the provider automatically tries the next
  • Adds EU cookie consent handling for European users
  • Adds typed error codes (BOT_DETECTED, IP_BLOCKED, TRANSCRIPTS_DISABLED, etc.) for better debugging
  • Zero changes to the transcript API route — same interface, just a more resilient provider underneath

Why

Users reported "No transcript available" errors starting 2026-04-01. The current single-client approach is getting blocked by YouTube's bot detection on Vercel's datacenter IPs. The multi-client fallback makes this significantly more resilient.

Test plan

  • All 5 unit tests pass (including new test for client fallback on rate-limit)
  • Tested locally with Steve Jobs Stanford speech, Linear podcast, Lex Fridman podcast
  • Verified both XML caption formats parse correctly (millisecond <p> and second <text>)
  • Deploy to Vercel preview and test with production traffic

🤖 Generated with Claude Code

Replace the single-client (Android-only) InnerTube transcript fetcher
with a multi-client fallback chain: Android → Web → iOS.

When YouTube blocks one client identity (bot detection, rate limiting),
the provider automatically tries the next. Also adds EU cookie consent
handling and typed error codes for better debugging.

Fixes transcript fetching failures reported by users on 2026-04-01.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@SamuelZ12 SamuelZ12 temporarily deployed to fix/robust-transcript-provider - longcut PR #64 April 1, 2026 17:54 — with Render Destroyed
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
tldw Ready Ready Preview, Comment Apr 1, 2026 5:55pm

Request Review

@zarazhangrui zarazhangrui merged commit f700a2d into main Apr 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants