mirror of
https://source.netsyms.com/Mirrors/youtube-dl
synced 2024-11-19 03:25:32 +00:00
[YoutubeDL] Sanitize format_id (Closes #8494)
This commit is contained in:
parent
7fcea295c5
commit
e2effb08a4
@ -1288,6 +1288,9 @@ class YoutubeDL(object):
|
|||||||
|
|
||||||
if format.get('format_id') is None:
|
if format.get('format_id') is None:
|
||||||
format['format_id'] = compat_str(i)
|
format['format_id'] = compat_str(i)
|
||||||
|
else:
|
||||||
|
# Sanitize format_id from characters used in format selector expression
|
||||||
|
format['format_id'] = re.sub('[\s,/+\[\]()]', '_', format['format_id'])
|
||||||
format_id = format['format_id']
|
format_id = format['format_id']
|
||||||
if format_id not in formats_dict:
|
if format_id not in formats_dict:
|
||||||
formats_dict[format_id] = []
|
formats_dict[format_id] = []
|
||||||
|
Loading…
Reference in New Issue
Block a user