mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-12-09 16:25:09 +01: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:
parent
a349d4d641
commit
db4678e448
12 changed files with 385 additions and 201 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue