Why Fetching YouTube Transcripts Fails: What 6 Real Failures Taught Me A developer building VidScope, a tool that analyzes YouTube videos from their transcripts, audited failed analyses and found 6 of 24 attempts (about 25%) failed, with four of the six caused not by IP bans but by code that only requested French and English captions. The fix lists all available transcripts, prefers manual over auto-generated captions, and falls back to any language, while a separate issue involves YouTube auto-dubbed audio tracks whose generated subtitles can be translations of a dub rather than the speaker's original words. The developer detects the original track by reading audio track IDs from the player response via a requests hook, noting the .4 suffix pattern is observed rather than documented. I build VidScope https://www.vidscope.fr , a tool that analyzes a YouTube video from its transcript. The first thing that goes wrong in a tool like this is not the AI. It is getting the transcript. I went through every failed analysis in my logs. Over the period I looked at, 6 of 24 attempts failed about 25% . I expected IP bans. Here is what the six really were: IpBlocked , even through a residential proxy. Four failures out of six had nothing to do with rate limiting. My code only looked for French and English. This is a small sample from one product, so treat the numbers as an illustration, not a benchmark. I use youtube-transcript-api https://github.com/jdepoix/youtube-transcript-api version 1.2.4 when I wrote this . It is an unofficial library: it reads the same data the YouTube player reads. It can break whenever YouTube changes something, and automated access may go against YouTube's terms of service. Read them before building a product on it. Also, if you copy older tutorials, note that the old YouTubeTranscriptApi.list transcripts video id static call no longer exists in 1.x. You instantiate the class and call api.list video id . My first version asked for fr or en and gave up otherwise. The fix is to list what exists and decide afterwards: python from youtube transcript api import YouTubeTranscriptApi, NoTranscriptFound api = YouTubeTranscriptApi transcript list = api.list video id Manual captions first, then auto-generated available = sorted transcript list, key=lambda t: t.is generated try: transcript = transcript list.find transcript "fr", "en" except NoTranscriptFound: if not available: raise transcript = available 0 any language beats no transcript snippets = transcript.fetch Then tell the downstream model which language it is reading. A modern LLM reads Turkish or Hindi fine, as long as you do not pretend it is English. This one surprised me. YouTube can offer auto-dubbed audio tracks, and each dubbed track comes with its own auto-generated subtitles. If you pick the first generated transcript, you may get a translation of a dub , which means quotes the speaker never said. The player response lists the audio tracks. In what I observed, the IDs look like fr-FR.10 or en-US.4 , and the original track is the one ending in .4 . This is something I observed on real videos, not documented behavior, so I keep a fallback if the pattern is missing. The library does not expose the audio tracks, so I read them from the response as it passes through, with a requests hook, without any extra request: php import requests def watch audio tracks session: requests.Session - list str : audio ids: list str = def read resp, args, kwargs : if "/youtubei/" not in resp.url: return try: tracks = resp.json "captions" "playerCaptionsTracklistRenderer" "audioTracks" audio ids : = t.get "audioTrackId" or "" for t in tracks except ValueError, LookupError, TypeError, AttributeError : pass no captions, or the format changed: let the library deal with it session.hooks "response" .append read return audio ids Then the original language is the track ending in .4 . With no dubbing, there is a single auto-generated language and that is the spoken one: php def lang code: str - str: return code.split "-" 0 .lower "en-US" - "en" def original language transcripts, audio ids : for audio id in audio ids: code, , kind = audio id.rpartition "." if code and kind == "4": return lang code spoken = {lang t.language code for t in transcripts if t.is generated} return spoken.pop if len spoken == 1 else None I wrote unit tests for the cases where the answer is ambiguous no audio info, several generated languages, a response with an unexpected shape . That code is the most fragile part of the whole pipeline, and it is the part where a silent wrong answer is worst. Disabled subtitles, a private video, an age restriction: retrying will never help, and the user should get a clear message. An IP block, on the other hand, often goes away on the next attempt from a different IP. python from youtube transcript api import AgeRestricted, InvalidVideoId, IpBlocked, NoTranscriptFound, RequestBlocked, TranscriptsDisabled, VideoUnavailable, VideoUnplayable, YouTubeRequestFailed, def is transient exc: Exception - bool: return isinstance exc, IpBlocked, RequestBlocked, YouTubeRequestFailed, requests.exceptions.RequestException The loop is deliberately boring. Five attempts, a fresh session each time, and a rotating residential proxy that gives a new IP per attempt: for attempt in range 5 : session = requests.Session if proxy url: session.proxies = {"http": proxy url, "https": proxy url} api = YouTubeTranscriptApi http client=session try: ... pick the transcript and fetch it return result except TranscriptsDisabled: raise RuntimeError "Subtitles are disabled by the author." except VideoUnavailable, VideoUnplayable, AgeRestricted, InvalidVideoId : raise RuntimeError "This video is private, removed, age-restricted or the link is invalid." except Exception as e: if is transient e and attempt < 4: continue new session, new IP break There is no exponential backoff here, and that is on purpose: the proxy changes the IP on every attempt, so waiting buys nothing. If you scrape from a single IP, the answer is different, and backoff with jitter is the right tool. I did not need it, so I will not pretend I measured it. Before this loop, a failure was a generic "no transcript available", whatever the cause. Now the user sees one of three messages: the author disabled subtitles , the video is not accessible , or YouTube is temporarily blocking requests, try again in a minute . Two visitors in my logs retried the same video twice and then left. A clear message would have helped them more than a retry button.