1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-27 21:54:17 +01:00

download_http: add an extension if we cant find one

This commit is contained in:
Johan Andersson 2013-03-10 14:24:09 +01:00 committed by Olof Johansson
parent 9f176d4cc4
commit 9251429dca

View File

@ -33,6 +33,8 @@ def download_http(options, url):
extension = re.search("(\.[a-z0-9]+)$", url) extension = re.search("(\.[a-z0-9]+)$", url)
if extension: if extension:
options.output = options.output + extension.group(1) options.output = options.output + extension.group(1)
else:
options.output = "%s.mp4" % options.output
log.info("Outfile: %s", options.output) log.info("Outfile: %s", options.output)
file_d = open(options.output, "wb") file_d = open(options.output, "wb")
else: else: