From 3e12bc583af9d5abf5f144ed6e092c59f4b83fdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergey=20M=E2=80=A4?= Date: Sun, 22 Nov 2015 06:29:39 +0600 Subject: [PATCH] [utils] Improve determine_ext (Closes #7593) --- youtube_dl/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: