aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2015-11-22 06:29:39 +0600
committerSergey M․ <dstftw@gmail.com>2015-11-22 06:29:39 +0600
commit3e12bc583af9d5abf5f144ed6e092c59f4b83fdf (patch)
tree520780a4f535f0aceea8d07a6e48437f910adf0c
parente568c2233e7b4b27c9a5c56322ab7633a5f0b1f7 (diff)
[utils] Improve determine_ext (Closes #7593)
-rw-r--r--youtube_dl/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py
index bff59eb73..7dab60bb8 100644
--- a/youtube_dl/utils.py
+++ b/youtube_dl/utils.py
@@ -922,7 +922,7 @@ def unified_strdate(date_str, day_first=True):
def determine_ext(url, default_ext='unknown_video'):
if url is None:
return default_ext
- guess = url.partition('?')[0].rpartition('.')[2]
+ guess = url.partition('?')[0].rpartition('.')[2].rstrip('/')
if re.match(r'^[A-Za-z0-9]+$', guess):
return guess
else: