]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/radiko.py
[cleanup] Misc (#8968)
[yt-dlp.git] / yt_dlp / extractor / radiko.py
index 2b6405999520ab08a4548edd2f8f1376d7eeefd4..f0135827b665ab86897ac0b5540fe95c43d101a8 100644 (file)
@@ -162,10 +162,8 @@ def _extract_formats(self, video_id, station, is_onair, ft, cursor, auth_token,
         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 @@ def _real_extract(self, url):
         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 @@ def _real_extract(self, url):
         return {
             'id': station,
             'title': title,
-            'artist': self._extract_performers(prog),
+            'cast': self._extract_performers(prog),
             'description': description,
             'uploader': station_name,
             'uploader_id': station,