yt-dlp: When downloading thumbnails: 404 errors printed out until a valid thumbnail URL is reached
Checklist
- I’m reporting a bug unrelated to a specific site
- I’ve verified that I’m running yt-dlp version 2021.10.22. (update instructions)
- I’ve checked that all provided URLs are alive and playable in a browser
- I’ve checked that all URLs and arguments with special characters are properly quoted or escaped
- I’ve searched the bugtracker for similar issues including closed ones. DO NOT post duplicates
- I’ve read the guidelines for opening an issue
Description
When downloading the thumbnail for certain videos, mainly those that DON’T have maxresdefault thumbnails, yt-dlp cycles through several possible thumbnail URL’s before it reaches one which is downloadable. Each time, it prints out “Downloading thumbnail…” and then a 404 error.
I’d rather not have multiple lines of errors, especially since I generate log-files for download sessions, which I then go back and examine for errors.
Can we please do away with the “Downloading video thumbnail” and 404 error printouts for invalid thumbnail URLs? Just print out lines pertaining to the valid thumbnail URL.
Example:
yt-dlp --no-overwrites --write-thumbnail --skip-download "gMLjkt87ICo"
[youtube] gMLjkt87ICo: Downloading webpage
[youtube] gMLjkt87ICo: Downloading android player API JSON
[info] gMLjkt87ICo: Downloading 1 format(s): 244+251
[info] Downloading video thumbnail ...
WARNING: Unable to download video thumbnail: HTTP Error 404: Not Found
[info] Downloading video thumbnail ...
WARNING: Unable to download video thumbnail: HTTP Error 404: Not Found
[info] Downloading video thumbnail ...
WARNING: Unable to download video thumbnail: HTTP Error 404: Not Found
[info] Downloading video thumbnail ...
WARNING: Unable to download video thumbnail: HTTP Error 404: Not Found
[info] Downloading video thumbnail ...
[info] Writing video thumbnail to: Milton Friedman Schools Young Idealist - 2 (Stanford) [gMLjkt87ICo].webp
Verbose log
[debug] Command-line config: ['-v', '--no-overwrites', '--write-thumbnail', '--skip-download', 'gMLjkt87ICo']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, err utf-8, pref UTF-8[debug] yt-dlp version 2021.10.22 (zip)
[debug] Python version 3.8.10 (CPython 64bit) - Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-glibc2.29
[debug] exe versions: ffmpeg n4.4-154-g79c114e1b2-20210923
[debug] Optional libraries: keyring, sqlite
[debug] Proxy map: {}
[debug] [youtube] Extracting URL: gMLjkt87ICo
[youtube] gMLjkt87ICo: Downloading webpage
[youtube] gMLjkt87ICo: Downloading android player API JSON
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, codec:vp9.2, lang
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec:vp9.2(10), acodec, lang, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] gMLjkt87ICo: Downloading 1 format(s): 244+251
[info] Downloading video thumbnail ...
WARNING: Unable to download video thumbnail: HTTP Error 404: Not Found
[info] Downloading video thumbnail ...
WARNING: Unable to download video thumbnail: HTTP Error 404: Not Found
[info] Downloading video thumbnail ...
WARNING: Unable to download video thumbnail: HTTP Error 404: Not Found
[info] Downloading video thumbnail ...
WARNING: Unable to download video thumbnail: HTTP Error 404: Not Found
[info] Downloading video thumbnail ...
[info] Writing video thumbnail to: Milton Friedman Schools Young Idealist - 2 (Stanford) [gMLjkt87ICo].webp
About this issue
- Original URL
- State: open
- Created 3 years ago
- Comments: 18 (8 by maintainers)
If we keep the warnings, I’d suggest at least adding which thumbnail it’s trying right now, because right now it may seem like it’s just retrying the same thumbnail multiple times in case of a random error.
they arent errors, they are warnings. if u dont want warnings, use
--no-warn