Skip to content

Commit

Permalink
Merge pull request #172 from David-JonesDVN/master
Browse files Browse the repository at this point in the history
Update ctoken offset field due to YouTube changes
  • Loading branch information
user234683 committed May 26, 2023
2 parents bc51240 + 2363b1c commit 942dda7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions youtube/channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@

# added an extra nesting under the 2nd base64 compared to v4
# added tab support
# 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':
Expand All @@ -58,7 +59,7 @@ def channel_ctoken_v5(channel_id, page, sort, tab, view=1):
proto.string(2,
b"ST:"
+ proto.unpadded_b64encode(
proto.string(2, offset)
proto.uint(1, offset)
)
)
)
Expand Down

0 comments on commit 942dda7

Please sign in to comment.