diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-04-29 00:31:34 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-04-29 07:41:39 +0530 |
commit | bfec31bec8bff7d5ca0625a52359b48517089430 (patch) | |
tree | 478e37349cfe3bcabd5c57c6209332d348517a06 | |
parent | 1d485a1a799bbeeb2faea0595676ca7d4c0f3716 (diff) | |
download | hypervideo-pre-bfec31bec8bff7d5ca0625a52359b48517089430.tar.lz hypervideo-pre-bfec31bec8bff7d5ca0625a52359b48517089430.tar.xz hypervideo-pre-bfec31bec8bff7d5ca0625a52359b48517089430.zip |
[youtube] De-prioritize auto-generated thumbnails
Closes #3112
-rw-r--r-- | yt_dlp/extractor/youtube.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/yt_dlp/extractor/youtube.py b/yt_dlp/extractor/youtube.py index 078f49696..037d1d967 100644 --- a/yt_dlp/extractor/youtube.py +++ b/yt_dlp/extractor/youtube.py @@ -3402,13 +3402,13 @@ class YoutubeIE(YoutubeBaseInfoExtractor): original_thumbnails = thumbnails.copy() # The best resolution thumbnails sometimes does not appear in the webpage - # See: https://github.com/ytdl-org/youtube-dl/issues/29049, https://github.com/yt-dlp/yt-dlp/issues/340 + # See: https://github.com/yt-dlp/yt-dlp/issues/340 # List of possible thumbnails - Ref: <https://stackoverflow.com/a/20542029> thumbnail_names = [ - 'maxresdefault', 'hq720', 'sddefault', 'sd1', 'sd2', 'sd3', - 'hqdefault', 'hq1', 'hq2', 'hq3', '0', - 'mqdefault', 'mq1', 'mq2', 'mq3', - 'default', '1', '2', '3' + # While the *1,*2,*3 thumbnails are just below their correspnding "*default" variants + # in resolution, these are not the custom thumbnail. So de-prioritize them + 'maxresdefault', 'hq720', 'sddefault', 'hqdefault', '0', 'mqdefault', 'default', + 'sd1', 'sd2', 'sd3', 'hq1', 'hq2', 'hq3', 'mq1', 'mq2', 'mq3', '1', '2', '3' ] n_thumbnail_names = len(thumbnail_names) thumbnails.extend({ |