1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2025-01-06 05:07:54 +01:00

Avoid breaking if thumbnail is missing

This commit is contained in:
Francesco Frassinelli 2020-03-18 00:02:14 +01:00
parent 0a21514afc
commit 79f4944f58

View File

@ -533,13 +533,16 @@ class RaiPlayRadioBaseIE(InfoExtractor):
for attrs in self.parse_list(webpage):
title = attrs['data-title'].strip()
audio_url = urljoin(url, attrs['data-mediapolis'])
yield {
entry = {
'url': audio_url,
'id': attrs['data-uniquename'].lstrip('ContentItem-'),
'title': title,
'ext': 'mp3',
'thumbnail': urljoin(url, attrs['data-image']),
'language': 'it'}
'language': 'it',
}
if 'data-image' in attrs:
entry['thumbnail'] = urljoin(url, attrs['data-image'])
yield entry
def get_playlist(self, *args, **kwargs):
return list(self.get_playlist_iter(*args, **kwargs))