aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2015-01-11 17:40:45 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2015-01-11 17:40:45 +0100
commit2aeb06d6dc8c615cf98b7d21ad152bb393726b8a (patch)
tree8fe88b4b0bc706ca1ef065c0519093431883e17f /youtube_dl
parent4340decad25e264863e27538847e17918b4c1ae2 (diff)
[utils] Improve colon handling (Fixes #4683)
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/utils.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py
index 42f0b07ce..deaf71803 100644
--- a/youtube_dl/utils.py
+++ b/youtube_dl/utils.py
@@ -287,6 +287,8 @@ def sanitize_filename(s, restricted=False, is_id=False):
return '_'
return char
+ # Handle timestamps
+ s = re.sub(r'[0-9]+(?::[0-9]+)+', lambda m: m.group(0).replace(':', '_'), s)
result = ''.join(map(replace_insane, s))
if not is_id:
while '__' in result: