aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Taylor <user234683@users.noreply.github.com>2020-12-16 07:49:20 -0800
committerJesús <heckyel@hyperbola.info>2020-12-16 20:46:53 -0500
commit3fa5a55f570887a05de14a76e5e31bb56605280f (patch)
tree6f53d162599ae514d5177d30f1e53a5caf50191d
parentb53fd2c0042b492af512f7dfc9e100035d03eee0 (diff)
downloadyt-local-3fa5a55f570887a05de14a76e5e31bb56605280f.tar.lz
yt-local-3fa5a55f570887a05de14a76e5e31bb56605280f.tar.xz
yt-local-3fa5a55f570887a05de14a76e5e31bb56605280f.zip
Fix channel search by using new protobuf format
Fixes 'Unknown Error' Closes #42 Signed-off-by: Jesús <heckyel@hyperbola.info>
-rw-r--r--youtube/channel.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/youtube/channel.py b/youtube/channel.py
index 6f40965..97afa6e 100644
--- a/youtube/channel.py
+++ b/youtube/channel.py
@@ -187,7 +187,8 @@ def get_number_of_videos_general(base_url):
def get_channel_search_json(channel_id, query, page):
- params = proto.string(2, 'search') + proto.string(15, str(page))
+ offset = proto.unpadded_b64encode(proto.uint(3, (page-1)*30))
+ params = proto.string(2, 'search') + proto.string(15, offset)
params = proto.percent_b64encode(params)
ctoken = proto.string(2, channel_id) + proto.string(3, params) + proto.string(11, query)
ctoken = base64.urlsafe_b64encode(proto.nested(80226972, ctoken)).decode('ascii')