1
0
Fork 0

[cleanup] Use format_field where applicable

This commit is contained in:
pukkandan 2022-01-21 13:27:40 +05:30
commit e0ddbd02bd
No known key found for this signature in database
GPG key ID: 0F00D95A001F4698
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'),
}