[redditr] Ignore "default" thumbnails (closes #20030)
This commit is contained in:
parent
da668a23bd
commit
7d227ec4db
@ -67,6 +67,17 @@ class RedditRIE(InfoExtractor):
|
|||||||
'format': 'bestvideo',
|
'format': 'bestvideo',
|
||||||
'skip_download': True,
|
'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',
|
'url': 'https://www.reddit.com/r/videos/comments/6rrwyj',
|
||||||
'only_matching': True,
|
'only_matching': True,
|
||||||
@ -115,11 +126,15 @@ class RedditRIE(InfoExtractor):
|
|||||||
else:
|
else:
|
||||||
age_limit = None
|
age_limit = None
|
||||||
|
|
||||||
|
thumbnail = data.get('thumbnail')
|
||||||
|
if thumbnail == 'default':
|
||||||
|
thumbnail = None
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'_type': 'url_transparent',
|
'_type': 'url_transparent',
|
||||||
'url': video_url,
|
'url': video_url,
|
||||||
'title': data.get('title'),
|
'title': data.get('title'),
|
||||||
'thumbnail': data.get('thumbnail'),
|
'thumbnail': thumbnail,
|
||||||
'timestamp': float_or_none(data.get('created_utc')),
|
'timestamp': float_or_none(data.get('created_utc')),
|
||||||
'uploader': data.get('author'),
|
'uploader': data.get('author'),
|
||||||
'like_count': int_or_none(data.get('ups')),
|
'like_count': int_or_none(data.get('ups')),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user