From 5f3b90ad45993f99bf2813ef2fefaa3a59a2694f Mon Sep 17 00:00:00 2001 From: Astound Date: Mon, 22 Jan 2024 06:29:42 +0800 Subject: Fix channel about tab --- youtube/proto.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'youtube/proto.py') diff --git a/youtube/proto.py b/youtube/proto.py index d8b1fcd..924e983 100644 --- a/youtube/proto.py +++ b/youtube/proto.py @@ -141,6 +141,17 @@ base64_enc_funcs = { def _make_protobuf(data): + ''' + Input: Recursive list of protobuf objects or base-64 encodings + Output: Protobuf bytestring + Each protobuf object takes the form [wire_type, field_number, field_data] + If a string protobuf has a list/tuple of length 2, this has the form + (base64 type, data) + The base64 types are + - base64 means a base64 encode with equals sign paddings + - base64s means a base64 encode without padding + - base64p means a url base64 encode with equals signs replaced with %3D + ''' # must be dict mapping field_number to [wire_type, value] if isinstance(data, dict): new_data = [] -- cgit v1.2.3