1
0
mirror of https://github.com/yt-dlp/yt-dlp synced 2025-12-17 14:45:42 +07:00

[utils] Streap leading dots

Fixes #2865, closes #5087
This commit is contained in:
Philipp Hagemeister
2015-03-02 19:07:17 +01:00
parent 76c73715fb
commit a7440261c5
2 changed files with 4 additions and 0 deletions

View File

@@ -305,6 +305,7 @@ def replace_insane(char):
result = result[2:]
if result.startswith('-'):
result = '_' + result[len('-'):]
result = result.lstrip('.')
if not result:
result = '_'
return result