You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When fetching transcripts for certain YouTube videos, the library raises PoTokenRequired instead of returning the transcript. This happens even for videos that clearly have captions visible in the YouTube UI and accessible when browsing normally.
The exception is raised for videos whose caption track baseUrl (inside ytInitialPlayerResponse.captions.playerCaptionsTracklistRenderer.captionTracks) contains the &exp=xpe query parameter. When this parameter is present, YouTube's timedtext endpoint returns an empty HTTP 200 response body for any programmatic request — including requests that carry valid session cookies from a logged-in browser.
Expected behaviour
api.fetch() returns transcript segments, or raises a specific exception with documented guidance on how to work around the PoToken requirement.
Actual behaviour
youtube_transcript_api._errors.PoTokenRequired
No documented way to supply a PoToken exists. Passing a requests.Session pre-loaded with valid YouTube cookies does not help, because the PoToken is not a cookie — it is a cryptographic proof-of-origin token generated at runtime by the YouTube player JavaScript and appended as a query parameter (&pot=...) to the URL.
Additional context
Affects only videos whose captionTracks[].baseUrl already contains &exp=xpe.
Distinct from IpBlocked / RequestBlocked: those indicate server-side IP banning; this is a client-side authentication requirement that no amount of IP rotation resolves.
The transcript IS accessible by clicking "Open transcript" in the YouTube UI in a real logged-in browser — the browser's player JS generates the PoToken transparently.
Closed issue No Element Found on v1.1.0 #454 reported a similar symptom. Reopening because the root cause remains unresolved as of v1.2.4.
Requested fix / workaround
Document how to provide a PoToken to the library, OR
Implement automatic PoToken generation (as some yt-dlp forks do via Botguard), OR
Fall back to an alternative transcript-fetching strategy when exp=xpe is detected in the base URL (e.g. use the InnerTube /browse endpoint or parse the transcript panel response instead of the timedtext direct URL).
Description
When fetching transcripts for certain YouTube videos, the library raises
PoTokenRequiredinstead of returning the transcript. This happens even for videos that clearly have captions visible in the YouTube UI and accessible when browsing normally.Environment
Steps to reproduce
The exception is raised for videos whose caption track
baseUrl(insideytInitialPlayerResponse.captions.playerCaptionsTracklistRenderer.captionTracks) contains the&exp=xpequery parameter. When this parameter is present, YouTube's timedtext endpoint returns an empty HTTP 200 response body for any programmatic request — including requests that carry valid session cookies from a logged-in browser.Expected behaviour
api.fetch()returns transcript segments, or raises a specific exception with documented guidance on how to work around the PoToken requirement.Actual behaviour
No documented way to supply a PoToken exists. Passing a
requests.Sessionpre-loaded with valid YouTube cookies does not help, because the PoToken is not a cookie — it is a cryptographic proof-of-origin token generated at runtime by the YouTube player JavaScript and appended as a query parameter (&pot=...) to the URL.Additional context
captionTracks[].baseUrlalready contains&exp=xpe.IpBlocked/RequestBlocked: those indicate server-side IP banning; this is a client-side authentication requirement that no amount of IP rotation resolves.Requested fix / workaround
exp=xpeis detected in the base URL (e.g. use the InnerTube/browseendpoint or parse the transcript panel response instead of the timedtext direct URL).