mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2025-01-08 14:17:54 +01:00
Avoid breaking if thumbnail is missing
This commit is contained in:
parent
0a21514afc
commit
79f4944f58
@ -533,13 +533,16 @@ class RaiPlayRadioBaseIE(InfoExtractor):
|
|||||||
for attrs in self.parse_list(webpage):
|
for attrs in self.parse_list(webpage):
|
||||||
title = attrs['data-title'].strip()
|
title = attrs['data-title'].strip()
|
||||||
audio_url = urljoin(url, attrs['data-mediapolis'])
|
audio_url = urljoin(url, attrs['data-mediapolis'])
|
||||||
yield {
|
entry = {
|
||||||
'url': audio_url,
|
'url': audio_url,
|
||||||
'id': attrs['data-uniquename'].lstrip('ContentItem-'),
|
'id': attrs['data-uniquename'].lstrip('ContentItem-'),
|
||||||
'title': title,
|
'title': title,
|
||||||
'ext': 'mp3',
|
'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):
|
def get_playlist(self, *args, **kwargs):
|
||||||
return list(self.get_playlist_iter(*args, **kwargs))
|
return list(self.get_playlist_iter(*args, **kwargs))
|
||||||
|
Loading…
Reference in New Issue
Block a user