diff options
author | Jesus E <heckyel@riseup.net> | 2023-05-28 21:42:13 -0400 |
---|---|---|
committer | Jesus E <heckyel@riseup.net> | 2023-05-28 21:42:13 -0400 |
commit | aa57ace7420bcbb4712d8aab0736f00115634c4a (patch) | |
tree | b475bda3b6ba4006b3611a931d310c8a57166914 /youtube/yt_data_extract/common.py | |
parent | 512798366c935f57cf4c583a1de6bcd9ab7bb680 (diff) | |
download | yt-local-aa57ace7420bcbb4712d8aab0736f00115634c4a.tar.lz yt-local-aa57ace7420bcbb4712d8aab0736f00115634c4a.tar.xz yt-local-aa57ace7420bcbb4712d8aab0736f00115634c4a.zip |
Fix music list extraction
Closes #160
Diffstat (limited to 'youtube/yt_data_extract/common.py')
-rw-r--r-- | youtube/yt_data_extract/common.py | 3 |
1 files changed, 3 insertions, 0 deletions
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 |