From 4e556efa3dc81dfc9924c0aedae95051fcc1b2d4 Mon Sep 17 00:00:00 2001 From: James Taylor Date: Sun, 22 Aug 2021 22:48:30 -0700 Subject: Fix comments extraction due to new response continuation key name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jesús --- youtube/yt_data_extract/common.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'youtube/yt_data_extract') diff --git a/youtube/yt_data_extract/common.py b/youtube/yt_data_extract/common.py index 713fc0c..ca999ba 100644 --- a/youtube/yt_data_extract/common.py +++ b/youtube/yt_data_extract/common.py @@ -542,8 +542,12 @@ def extract_items(response, item_types=_item_types, elif 'onResponseReceivedEndpoints' in response: for endpoint in response.get('onResponseReceivedEndpoints', []): items, ctoken = extract_items_from_renderer_list( - deep_get(endpoint, 'appendContinuationItemsAction', - 'continuationItems', default=[]), + multi_deep_get( + endpoint, + ['reloadContinuationItemsCommand', 'continuationItems'], + ['appendContinuationItemsAction', 'continuationItems'], + default=[] + ), item_types=item_types, ) if items: -- cgit v1.2.3