1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-10-04 14:05:10 -04:00

[cleanup] Use format_field where applicable

This commit is contained in:
pukkandan
2022-01-21 13:27:40 +05:30
parent 0bfc53d05c
commit e0ddbd02bd
26 changed files with 59 additions and 52 deletions

View File

@@ -6,6 +6,7 @@ from .common import InfoExtractor
from ..utils import (
clean_html,
ExtractorError,
format_field,
get_element_by_class,
int_or_none,
parse_iso8601,
@@ -160,7 +161,7 @@ class VidioIE(VidioBaseIE):
'uploader': user.get('name'),
'timestamp': parse_iso8601(video.get('created_at')),
'uploader_id': username,
'uploader_url': 'https://www.vidio.com/@' + username if username else None,
'uploader_url': format_field(username, template='https://www.vidio.com/@%s'),
'channel': channel.get('name'),
'channel_id': str_or_none(channel.get('id')),
'view_count': get_count('view_count'),
@@ -291,5 +292,5 @@ class VidioLiveIE(VidioBaseIE):
'uploader': user.get('name'),
'timestamp': parse_iso8601(stream_meta.get('start_time')),
'uploader_id': username,
'uploader_url': 'https://www.vidio.com/@' + username if username else None,
'uploader_url': format_field(username, template='https://www.vidio.com/@%s'),
}