diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-01-21 13:27:40 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-01-21 13:27:40 +0530 |
commit | e0ddbd02bd1c365b95bb88eaa6e4e0238faf35eb (patch) | |
tree | 8035bea649dee8e517380a8c3d6dc31a0436c2c3 /yt_dlp/extractor/line.py | |
parent | 0bfc53d05c7ecd7762313f0cd8578c46cd916519 (diff) |
[cleanup] Use format_field where applicable
Diffstat (limited to 'yt_dlp/extractor/line.py')
-rw-r--r-- | yt_dlp/extractor/line.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/yt_dlp/extractor/line.py b/yt_dlp/extractor/line.py index e1d5f21e1..24e04edb5 100644 --- a/yt_dlp/extractor/line.py +++ b/yt_dlp/extractor/line.py @@ -5,6 +5,7 @@ from __future__ import unicode_literals from .common import InfoExtractor from ..compat import compat_str from ..utils import ( + format_field, int_or_none, js_to_json, str_or_none, @@ -121,7 +122,7 @@ class LineLiveBaseIE(InfoExtractor): 'timestamp': int_or_none(item.get('createdAt')), 'channel': channel.get('name'), 'channel_id': channel_id, - 'channel_url': 'https://live.line.me/channels/' + channel_id if channel_id else None, + 'channel_url': format_field(channel_id, template='https://live.line.me/channels/%s'), 'duration': int_or_none(item.get('archiveDuration')), 'view_count': int_or_none(item.get('viewerCount')), 'comment_count': int_or_none(item.get('chatCount')), |