From 74907a81835435f881424b41729cc71cb9d50056 Mon Sep 17 00:00:00 2001 From: Jesus E Date: Sun, 28 May 2023 21:45:20 -0400 Subject: Music list extraction: read from SONG field This one is used when there is no corresponding YouTube video for the track --- youtube/yt_data_extract/watch_extraction.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'youtube/yt_data_extract/watch_extraction.py') diff --git a/youtube/yt_data_extract/watch_extraction.py b/youtube/yt_data_extract/watch_extraction.py index 2158fec..cfda4fa 100644 --- a/youtube/yt_data_extract/watch_extraction.py +++ b/youtube/yt_data_extract/watch_extraction.py @@ -250,7 +250,9 @@ def _extract_from_music_renderer(renderer_content): row = row.get('infoRowRenderer', {}) title = extract_str(row.get('title')) data = extract_str(row.get('defaultMetadata')) - if title == 'ARTIST': + if title == 'SONG': + song['title'] = data + elif title == 'ARTIST': song['artist'] = data elif title == 'ALBUM': song['album'] = data -- cgit v1.2.3