aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/utils.py
diff options
context:
space:
mode:
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2013-07-12 21:52:59 +0200
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2013-07-12 22:08:49 +0200
commitcbdbb7666540ba07ab7e4a3a7bc34759bf0ca6d9 (patch)
tree10fbbf7c9f35f2d1975c8b8dc44f3954646bbf17 /youtube_dl/utils.py
parent6543f0dca5e04530450fac5a64efa5d9ee294b1b (diff)
Use determine_ext when saving the thumbnail
Urls that contain a query produced filenames with wrong extensions
Diffstat (limited to 'youtube_dl/utils.py')
-rw-r--r--youtube_dl/utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py
index 532ca585d..cf2ea654e 100644
--- a/youtube_dl/utils.py
+++ b/youtube_dl/utils.py
@@ -650,12 +650,12 @@ def unified_strdate(date_str):
pass
return upload_date
-def determine_ext(url):
+def determine_ext(url, default_ext=u'unknown_video'):
guess = url.partition(u'?')[0].rpartition(u'.')[2]
if re.match(r'^[A-Za-z0-9]+$', guess):
return guess
else:
- return u'unknown_video'
+ return default_ext
def date_from_str(date_str):
"""