From: James Bunton Date: Sun, 31 Aug 2014 10:59:25 +0000 (+1000) Subject: webdl: sanify HLS filenames X-Git-Url: https://code.delx.au/webdl/commitdiff_plain/a0a59daf5a1470f1777e83fa5f39d122934b6051 webdl: sanify HLS filenames --- diff --git a/common.py b/common.py index accd6dd..2f2cf5f 100644 --- a/common.py +++ b/common.py @@ -316,13 +316,14 @@ def download_hls_fetch_segment(outf, segment_url): pass def download_hls(filename, m3u8_master_url, hack_url_func=None): + filename = sanify_filename(filename) + print "Downloading: %s" % filename + if hack_url_func is None: hack_url_func = lambda url: url tmpdir = tempfile.mkdtemp(prefix="webdl-hls") - print "Downloading: %s" % filename - try: best_stream_url = download_hls_get_stream(hack_url_func(m3u8_master_url)) ts_file = open(filename, "w")