aboutsummaryrefslogtreecommitdiffstats
path: root/youtube
diff options
context:
space:
mode:
authorJames Taylor <user234683@users.noreply.github.com>2021-08-22 22:48:30 -0700
committerJesús <heckyel@hyperbola.info>2021-08-23 18:40:52 -0500
commit4e556efa3dc81dfc9924c0aedae95051fcc1b2d4 (patch)
treea7a2cfa8ae7b54c68dbc7d650b0d2a32b540ea80 /youtube
parent740aea68f6cc51fb055cfaf76b8bc651034cc56e (diff)
downloadyt-local-4e556efa3dc81dfc9924c0aedae95051fcc1b2d4.tar.lz
yt-local-4e556efa3dc81dfc9924c0aedae95051fcc1b2d4.tar.xz
yt-local-4e556efa3dc81dfc9924c0aedae95051fcc1b2d4.zip
Fix comments extraction due to new response continuation key name
Signed-off-by: Jesús <heckyel@hyperbola.info>
Diffstat (limited to 'youtube')
-rw-r--r--youtube/yt_data_extract/common.py8
1 files changed, 6 insertions, 2 deletions
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: