]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/radlive.py
[cleanup] Use format_field where applicable
[yt-dlp.git] / yt_dlp / extractor / radlive.py
index 2de7ab04a94cb25a6933d63ad6e9672607eaf762..dc98973056fd05e35c55fea1caa2eea4f0ec11f1 100644 (file)
@@ -1,6 +1,12 @@
 import json
 
-from ..utils import ExtractorError, traverse_obj, try_get, unified_timestamp
+from ..utils import (
+    ExtractorError,
+    format_field,
+    traverse_obj,
+    try_get,
+    unified_timestamp
+)
 from .common import InfoExtractor
 
 
@@ -74,7 +80,7 @@ def _real_extract(self, url):
             'release_timestamp': release_date,
             'channel': channel.get('name'),
             'channel_id': channel_id,
-            'channel_url': f'https://rad.live/content/channel/{channel_id}' if channel_id else None,
+            'channel_url': format_field(channel_id, template='https://rad.live/content/channel/%s'),
 
         }
         if content_type == 'episode':