From b5c9339b2c2bf54de52352dc2460de81324856fc Mon Sep 17 00:00:00 2001 From: Olof Johansson Date: Thu, 29 Aug 2013 20:46:02 +0200 Subject: [PATCH] hls: support keys over https as well as http --- lib/svtplay_dl/fetcher/hls.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/svtplay_dl/fetcher/hls.py b/lib/svtplay_dl/fetcher/hls.py index b2abe6b..a30e14f 100644 --- a/lib/svtplay_dl/fetcher/hls.py +++ b/lib/svtplay_dl/fetcher/hls.py @@ -36,7 +36,8 @@ def download_hls(options, url, baseurl=None): except ImportError: log.error("You need to install pycrypto to download encrypted HLS streams") sys.exit(2) - match = re.search(r"URI=\"(http://.*)\"", keydata) + + match = re.search(r'URI="(https?://.*?)"', keydata) key = get_http_data(match.group(1)) rand = os.urandom(16) decryptor = AES.new(key, AES.MODE_CBC, rand)