mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-03-10 11:00:07 +01:00
[ie/radiko] Extract performers as cast
instead of artist
The site refers to radio show hosts as performers Authored by: bashonly
This commit is contained in:
parent
ba1b02ee2c
commit
d1f458961d
@ -162,10 +162,8 @@ class RadikoBaseIE(InfoExtractor):
|
||||
return formats
|
||||
|
||||
def _extract_performers(self, prog):
|
||||
performers = traverse_obj(prog, (
|
||||
'pfm/text()', ..., {lambda x: re.split(r'[//、 ,,]', x)}, ..., {str.strip}))
|
||||
# TODO: change 'artist' fields to 'artists' and return traversal list instead of str
|
||||
return ', '.join(performers) or None
|
||||
return traverse_obj(prog, (
|
||||
'pfm/text()', ..., {lambda x: re.split(r'[//、 ,,]', x)}, ..., {str.strip})) or None
|
||||
|
||||
|
||||
class RadikoIE(RadikoBaseIE):
|
||||
@ -194,7 +192,7 @@ class RadikoIE(RadikoBaseIE):
|
||||
return {
|
||||
'id': video_id,
|
||||
'title': try_call(lambda: prog.find('title').text),
|
||||
'artist': self._extract_performers(prog),
|
||||
'cast': self._extract_performers(prog),
|
||||
'description': clean_html(try_call(lambda: prog.find('info').text)),
|
||||
'uploader': try_call(lambda: station_program.find('.//name').text),
|
||||
'uploader_id': station,
|
||||
@ -253,7 +251,7 @@ class RadikoRadioIE(RadikoBaseIE):
|
||||
return {
|
||||
'id': station,
|
||||
'title': title,
|
||||
'artist': self._extract_performers(prog),
|
||||
'cast': self._extract_performers(prog),
|
||||
'description': description,
|
||||
'uploader': station_name,
|
||||
'uploader_id': station,
|
||||
|
Loading…
x
Reference in New Issue
Block a user