Repository navigation
Conversation
InnerTube honours the fields parameter of Google APIs. The watch page response is now limited to its contents and engagement panels, which drops the top bar, the player overlays and the tracking data, about a third of it. The comments extractor requested the same page again only to find its continuation token: it now asks for the main column alone, without the related videos, about ten times smaller. A server that ignores the parameter answers with the whole response, which is parsed as before.
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
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.
InnerTube honours the
fieldsparameter of Google APIs, so a response can be limited to the keys we actually read.Two uses here:
nextonly readscontentsandengagementPanels. Asking for those drops the top bar, the player overlays and the tracking data: 56 kB to 40 kB compressed.nextagain only to find its continuation token. It now asks for the main column alone, without the related videos: 56 kB to 6 kB.If the server ever ignores the parameter it answers with the whole response, which is parsed like before.
The official web client doesn't send
fields, so these requests don't look exactly like its own. I only used it onnext, not onplayer.I also tried it on the comments continuation (no gain, the response is already only payload) and tried
nextwith other clients (MWEB is half the size but needs another parser, ANDROID and IOS answer 2.4 MB, none is faster).Validation:
./gradlew :extractor:buildpasses.