From 5d5322587414dcc12572a6e854fbfe072b7e63b6 Mon Sep 17 00:00:00 2001 From: Jesus E Date: Sun, 18 Jun 2023 13:55:07 -0400 Subject: Fix pagination --- youtube/channel.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'youtube/channel.py') diff --git a/youtube/channel.py b/youtube/channel.py index f79db88..4f0d768 100644 --- a/youtube/channel.py +++ b/youtube/channel.py @@ -36,7 +36,7 @@ generic_cookie = (('Cookie', 'VISITOR_INFO1_LIVE=ST1Ti53r4fU'),) # changed offset field to uint id 1 def channel_ctoken_v5(channel_id, page, sort, tab, view=1): new_sort = (2 if int(sort) == 1 else 1) - offset = str(30*(int(page) - 1)) + offset = 30*(int(page) - 1) if tab == 'videos': tab = 15 elif tab == 'shorts': @@ -85,7 +85,7 @@ def channel_ctoken_v5(channel_id, page, sort, tab, view=1): # https://github.com/user234683/youtube-local/issues/151 def channel_ctoken_v4(channel_id, page, sort, tab, view=1): new_sort = (2 if int(sort) == 1 else 1) - offset = 30*(int(page) - 1) + offset = str(30*(int(page) - 1)) pointless_nest = proto.string(80226972, proto.string(2, channel_id) + proto.string(3, -- cgit v1.2.3