mirror of
https://github.com/yt-dlp/yt-dlp
synced 2025-07-02 20:12:53 -05:00
Update to ytdl-commit-de39d128
[extractor/ceskatelevize] Back-port extractor from yt-dlp
de39d1281c
Closes #5361, Closes #4634, Closes #5210
This commit is contained in:
@ -685,7 +685,8 @@ def sanitize_filename(s, restricted=False, is_id=NO_DEFAULT):
|
||||
return '\0_'
|
||||
return char
|
||||
|
||||
if restricted and is_id is NO_DEFAULT:
|
||||
# Replace look-alike Unicode glyphs
|
||||
if restricted and (is_id is NO_DEFAULT or not is_id):
|
||||
s = unicodedata.normalize('NFKC', s)
|
||||
s = re.sub(r'[0-9]+(?::[0-9]+)+', lambda m: m.group(0).replace(':', '_'), s) # Handle timestamps
|
||||
result = ''.join(map(replace_insane, s))
|
||||
|
Reference in New Issue
Block a user