-
Notifications
You must be signed in to change notification settings - Fork 0
Decoding Protobuf Objects
Show unavailable videos on browse
: wgYCCAA=
Continuation token for playlists on browse
: 4qmFsgJNEhpWTFVVQ3YxUGQyNG9QRXJ3NVM3ekpXbHRuURoUQ0FGNkJsQlVPa05IVWNJR0FnZ0GaAhhVVUN2MVBkMjRvUEVydzVTN3pKV2x0blE%3D
Here is a link to a cyberchef recipe to decode innertube protobuf objects.
Innertube will replace certain parts of the base64 encoding with different characters.
In the main continuation token, the base64 character =
(which is padding in base64) will be replaced with the URL encoding of =
, which is %3D
. Note that this is not a token used in a URL as far as I know.
In the params protobuf object, which is stored at index 3 in the main continuation token (and is coded in base64 initially), the =
is replaced the same way, and /
is replaced with _
. I assume this is again due to URL encoding.
The page protobuf object, which is stored at index 15 of the params object (and again it is initially coded in base64), is a bit odd. It has PT:
added to the beginning of the base64 encoded object. You can safely remove this to be able to decode the page object. Once it is coded, Innertube removes the =
character entirely (does NOT replace it), and replaces +
and /
with _
.
4qmFsgJNEhpWTFVVQ3YxUGQyNG9QRXJ3NVM3ekpXbHRuURoUQ0FGNkJsQlVPa05IVWNJR0FnZ0GaAhhVVUN2MVBkMjRvUEVydzVTN3pKV2x0blE=
{
"80226972": {
"2": "VLUUCv1Pd24oPErw5S7zJWltnQ",
"3": "CAF6BlBUOkNHUcIGAggA",
"35": "UUCv1Pd24oPErw5S7zJWltnQ"
}
}
CAF6BlBUOkNHUcIGAggA
{
"1": 1,
"15": "PT:CGQ",
"104": {
"1": 0
}
}
CGQ
{
"1": 100
}
!!This is not how it is encoded, it is just an idea of how data is formatted in the token!!
Also note: The page number in this is the last number of the video you will get in the playlist. If you set 100, you will get videos 1-100, not 100-200 like you would expect generally.
Assuming PageNumber is a multiple of 100, PageOffsetNumber is PageNumber % 100.
{
"UnknownRandomNumber": {
"browseId": "VLUUCv1Pd24oPErw5S7zJWltnQ",
"3": {
"PageOffsetNumber": 1,
"PageConfig": {
"PageNumber": 100
},
"UnknownSetting": {
"1": 0
}
},
"playlistId": "UUCv1Pd24oPErw5S7zJWltnQ"
}
}