From 7d227ec4db5745fd84efc4f0532ab376f747f902 Mon Sep 17 00:00:00 2001 From: Jakub Wilk Date: Fri, 26 Apr 2019 11:23:46 +0200 Subject: [PATCH] [redditr] Ignore "default" thumbnails (closes #20030) --- youtube_dl/extractor/reddit.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/youtube_dl/extractor/reddit.py b/youtube_dl/extractor/reddit.py index 7b0aa6232..f2fc82593 100644 --- a/youtube_dl/extractor/reddit.py +++ b/youtube_dl/extractor/reddit.py @@ -67,6 +67,17 @@ class RedditRIE(InfoExtractor): 'format': 'bestvideo', 'skip_download': True, }, + }, { + 'url': 'https://www.reddit.com/r/gifs/comments/au27kt/not_today/', + 'info_dict': { + 'id': 'xl0duc2uvei21', + 'ext': 'mp4', + 'upload_date': '20190224', + 'title': 'NOT TODAY', + 'timestamp': 1550968443.0, + 'uploader': 'dfghjk231', + 'thumbnail': None, + } }, { 'url': 'https://www.reddit.com/r/videos/comments/6rrwyj', 'only_matching': True, @@ -115,11 +126,15 @@ class RedditRIE(InfoExtractor): else: age_limit = None + thumbnail = data.get('thumbnail') + if thumbnail == 'default': + thumbnail = None + return { '_type': 'url_transparent', 'url': video_url, 'title': data.get('title'), - 'thumbnail': data.get('thumbnail'), + 'thumbnail': thumbnail, 'timestamp': float_or_none(data.get('created_utc')), 'uploader': data.get('author'), 'like_count': int_or_none(data.get('ups')),