mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-30 16:00:45 -05:00
[youtube] Fix thumbnail URL
Closes: https://github.com/yt-dlp/yt-dlp/issues/233 https://github.com/ytdl-org/youtube-dl/issues/28023
This commit is contained in:
parent
9de3ea3126
commit
1988fab7e3
1 changed files with 5 additions and 0 deletions
|
@ -2057,6 +2057,11 @@ def feed_entry(name):
|
||||||
thumbnail_url = thumbnail.get('url')
|
thumbnail_url = thumbnail.get('url')
|
||||||
if not thumbnail_url:
|
if not thumbnail_url:
|
||||||
continue
|
continue
|
||||||
|
# Sometimes youtube gives a wrong thumbnail URL. See:
|
||||||
|
# https://github.com/yt-dlp/yt-dlp/issues/233
|
||||||
|
# https://github.com/ytdl-org/youtube-dl/issues/28023
|
||||||
|
if 'maxresdefault' in thumbnail_url:
|
||||||
|
thumbnail_url = thumbnail_url.split('?')[0]
|
||||||
thumbnails.append({
|
thumbnails.append({
|
||||||
'height': int_or_none(thumbnail.get('height')),
|
'height': int_or_none(thumbnail.get('height')),
|
||||||
'url': thumbnail_url,
|
'url': thumbnail_url,
|
||||||
|
|
Loading…
Reference in a new issue