]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/arnes.py
Allow extractors to specify section_start/end for clips
[yt-dlp.git] / yt_dlp / extractor / arnes.py
index c0032fcab972e2192fd479cfa3f671ca83dcc5f1..c80ce223377810053c8792f937720035dc22acd0 100644 (file)
@@ -1,12 +1,10 @@
-# coding: utf-8
-from __future__ import unicode_literals
-
 from .common import InfoExtractor
 from ..compat import (
     compat_parse_qs,
     compat_urllib_parse_urlparse,
 )
 from ..utils import (
+    format_field,
     float_or_none,
     int_or_none,
     parse_iso8601,
@@ -92,7 +90,7 @@ def _real_extract(self, url):
             'timestamp': parse_iso8601(video.get('creationTime')),
             'channel': channel.get('name'),
             'channel_id': channel_id,
-            'channel_url': self._BASE_URL + '/?channel=' + channel_id if channel_id else None,
+            'channel_url': format_field(channel_id, None, f'{self._BASE_URL}/?channel=%s'),
             'duration': float_or_none(video.get('duration'), 1000),
             'view_count': int_or_none(video.get('views')),
             'tags': video.get('hashtags'),