[cleanup] Misc

This commit is contained in:
pukkandan 2022-09-10 03:46:54 +05:30
parent 941e881e1f
commit deae7c1711
No known key found for this signature in database
GPG key ID: 7EEE9E1E817D0A39
5 changed files with 15 additions and 11 deletions

View file

@ -1247,9 +1247,11 @@ class YoutubeDL:
delim = '\n' if '#' in flags else ', '
value, fmt = delim.join(map(str, variadic(value, allowed_types=(str, bytes)))), str_fmt
elif fmt[-1] == 'j': # json
value, fmt = json.dumps(value, default=_dumpjson_default, indent=4 if '#' in flags else None), str_fmt
value, fmt = json.dumps(
value, default=_dumpjson_default,
indent=4 if '#' in flags else None, ensure_ascii=False), str_fmt
elif fmt[-1] == 'h': # html
value, fmt = escapeHTML(value), str_fmt
value, fmt = escapeHTML(str(value)), str_fmt
elif fmt[-1] == 'q': # quoted
value = map(str, variadic(value) if '#' in flags else [value])
value, fmt = ' '.join(map(compat_shlex_quote, value)), str_fmt