From e549b5f67c4beff421a2b2b36f3b5031bfe8ed88 Mon Sep 17 00:00:00 2001 From: James Taylor Date: Fri, 5 Mar 2021 23:27:31 -0800 Subject: Channel: Allow going to next pages of playlists page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Uses previous and next buttons. Now can view more than just first page of playlists page Signed-off-by: Jesús --- youtube/yt_data_extract/common.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'youtube/yt_data_extract/common.py') diff --git a/youtube/yt_data_extract/common.py b/youtube/yt_data_extract/common.py index 57a84ed..2b394e6 100644 --- a/youtube/yt_data_extract/common.py +++ b/youtube/yt_data_extract/common.py @@ -450,6 +450,14 @@ def extract_items_from_renderer(renderer, item_types=_item_types): if key in item_types: items.append(renderer) + # ctoken sometimes placed in these renderers, e.g. channel playlists + elif key == 'continuationItemRenderer': + cont = deep_get( + value, 'continuationEndpoint', 'continuationCommand', 'token' + ) + if cont: + ctoken = cont + # has a list in it, add it to the iter stack elif get_nested_renderer_list_function(key): renderer_list, cont = get_nested_renderer_list_function(key)(value) -- cgit v1.2.3