[cleanup] Minor fixes

Closes #2334
This commit is contained in:
pukkandan
2022-01-20 04:27:36 +05:30
parent fc5fa964c7
commit 6970b6005e
12 changed files with 26 additions and 22 deletions

View File

@@ -2682,7 +2682,7 @@ class YoutubeDL(object):
def _forceprint(self, tmpl, info_dict):
mobj = re.match(r'\w+(=?)$', tmpl)
if mobj and mobj.group(1):
tmpl = f'{tmpl[:-1]} = %({tmpl[:-1]})s'
tmpl = f'{tmpl[:-1]} = %({tmpl[:-1]})r'
elif mobj:
tmpl = '%({})s'.format(tmpl)
@@ -3486,7 +3486,7 @@ class YoutubeDL(object):
return None
return render_table(
self._list_format_headers('ID', 'Width', 'Height', 'URL'),
[[t['id'], t.get('width', 'unknown'), t.get('height', 'unknown'), t['url']] for t in thumbnails])
[[t.get('id'), t.get('width', 'unknown'), t.get('height', 'unknown'), t['url']] for t in thumbnails])
def render_subtitles_table(self, video_id, subtitles):
def _row(lang, formats):