1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-09-03 00:25:08 +00: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

@ -7,6 +7,7 @@ from ..compat import (
)
from ..utils import (
ExtractorError,
format_field,
int_or_none,
qualities,
)
@ -95,7 +96,7 @@ class FlickrIE(InfoExtractor):
owner = video_info.get('owner', {})
uploader_id = owner.get('nsid')
uploader_path = owner.get('path_alias') or uploader_id
uploader_url = 'https://www.flickr.com/photos/%s/' % uploader_path if uploader_path else None
uploader_url = format_field(uploader_path, template='https://www.flickr.com/photos/%s/')
return {
'id': video_id,