mirror of
https://github.com/l1ving/youtube-dl
synced 2020-11-18 19:53:54 -08:00
Add -original quality thumbnail to soundcloud thumbnails
This commit is contained in:
parent
dc27fd8bb8
commit
8e06e62536
@ -217,8 +217,15 @@ class SoundcloudIE(InfoExtractor):
|
|||||||
if quiet:
|
if quiet:
|
||||||
self.report_extraction(name)
|
self.report_extraction(name)
|
||||||
thumbnail = info.get('artwork_url') or info.get('user', {}).get('avatar_url')
|
thumbnail = info.get('artwork_url') or info.get('user', {}).get('avatar_url')
|
||||||
|
thumbnails = []
|
||||||
if isinstance(thumbnail, compat_str):
|
if isinstance(thumbnail, compat_str):
|
||||||
thumbnail = thumbnail.replace('-large', '-t500x500')
|
thumbnail = thumbnail.replace('-large', '-original')
|
||||||
|
thumbnails.append({
|
||||||
|
'url': thumbnail.replace('-original', '-t500x500'),
|
||||||
|
'width': 500,
|
||||||
|
'height': 500
|
||||||
|
})
|
||||||
|
thumbnails.append({'url': thumbnail})
|
||||||
username = try_get(info, lambda x: x['user']['username'], compat_str)
|
username = try_get(info, lambda x: x['user']['username'], compat_str)
|
||||||
|
|
||||||
def extract_count(key):
|
def extract_count(key):
|
||||||
@ -231,6 +238,7 @@ class SoundcloudIE(InfoExtractor):
|
|||||||
'title': title,
|
'title': title,
|
||||||
'description': info.get('description'),
|
'description': info.get('description'),
|
||||||
'thumbnail': thumbnail,
|
'thumbnail': thumbnail,
|
||||||
|
'thumbnails': thumbnails,
|
||||||
'duration': int_or_none(info.get('duration'), 1000),
|
'duration': int_or_none(info.get('duration'), 1000),
|
||||||
'webpage_url': info.get('permalink_url'),
|
'webpage_url': info.get('permalink_url'),
|
||||||
'license': info.get('license'),
|
'license': info.get('license'),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user