From a0a59daf5a1470f1777e83fa5f39d122934b6051 Mon Sep 17 00:00:00 2001 From: James Bunton Date: Sun, 31 Aug 2014 20:59:25 +1000 Subject: [PATCH] webdl: sanify HLS filenames --- common.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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") -- 2.39.2