From a0c3ca0159136d17eefa129176ae1904110238b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= Date: Tue, 14 Sep 2021 15:58:13 -0500 Subject: Usage hqdefault thumbnail in related videos --- youtube/yt_data_extract/common.py | 5 +++-- 1 file changed, 3 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 f97597c..6067662 100644 --- a/youtube/yt_data_extract/common.py +++ b/youtube/yt_data_extract/common.py @@ -275,8 +275,9 @@ def extract_item_info(item, additional_info={}): ['descriptionText'], ['descriptionSnippet'], ['detailedMetadataSnippets', 0, 'snippetText'], )) - info['thumbnail'] = normalize_url(multi_deep_get(item, - ['thumbnail', 'thumbnails', 0, 'url'], # videos + info['thumbnail'] = normalize_url(multi_deep_get( + item, + ['thumbnail', 'thumbnails', 2, 'url'], # videos ['thumbnails', 0, 'thumbnails', 0, 'url'], # playlists ['thumbnailRenderer', 'showCustomThumbnailRenderer', 'thumbnail', 'thumbnails', 0, 'url'], # shows )) -- cgit v1.2.3