-
Notifications
You must be signed in to change notification settings - Fork 79
Feature innertube captions #240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
alive4ever
wants to merge
14
commits into
user234683:master
Choose a base branch
from
alive4ever:feature-innertube-captions
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Feature innertube captions #240
alive4ever
wants to merge
14
commits into
user234683:master
from
alive4ever:feature-innertube-captions
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user234683
requested changes
Aug 22, 2025
Owner
user234683
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late review. Have a few comments
Add settings to get caption from get_transcript innertube api. Disabled by default.
Add bbpb (i.e. blackboxprotobuf) as requirements to encode protobuf for innertube caption.
Add innertube_caption submodule to enable fetching captions via innertube get_caption api. No support for translated captions for now.
Add support to get captions via innertube api.
Add test for vtt_body and retry using footer continuation.
Will use the built-in proto module.
Use built-in proto submodule instead of bbpb to generate innertube caption request params.
Avoid url-quoting twice of params.
Set use_innertube_for_captions to True to get captions working.
Use deep_get from yt_data_extract to access nested dict items to provide safe extraction of its value. Also rewrite vtt part construction to use f-string.
3ccde56 to
9a10217
Compare
Set text/vtt as mimetype for get_caption()
Fix missing newline at the end of vtt chunk running text.
Add a workaround to get non innertube captions working, i.e. when use_innertube_for_captions is disabled.
Return 302 redirect to /api/timedtext when accessing /watch/transcript/ endpoint.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add ability to obtain captions from
get_transcriptinnertube api instead of using captionbaseUrlofplayerresponse.The feature is behind new settings:
use_innertube_for_captions, which is set toFalseby default.The protobuf encoded
paramsforget_transcriptis crafted using blackboxprotobuf module due to its lightweight size and easy-to-use.Currently only manual and auto generated captions are supported. There is no support for translated captions, so request for translated captions will return the caption in its original language.
This will hopefully fix #239