From aa57ace7420bcbb4712d8aab0736f00115634c4a Mon Sep 17 00:00:00 2001 From: Jesus E Date: Sun, 28 May 2023 21:42:13 -0400 Subject: Fix music list extraction Closes #160 --- youtube/yt_data_extract/common.py | 3 +++ 1 file changed, 3 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 2e59109..fcefbf7 100644 --- a/youtube/yt_data_extract/common.py +++ b/youtube/yt_data_extract/common.py @@ -296,6 +296,9 @@ def extract_item_info(item, additional_info={}): if primary_type == 'video': info['id'] = item.get('videoId') + if not info['id']: + info['id'] = deep_get(item,'navigationEndpoint', 'watchEndpoint', + 'videoId') info['view_count'] = extract_int(item.get('viewCountText')) # dig into accessibility data to get view_count for videos marked as recommended, and to get time_published -- cgit v1.2.3