From 72f04e3b4712623ddb59f4439cbc1100a20fa660 Mon Sep 17 00:00:00 2001 From: Johan Andersson Date: Sun, 1 Feb 2015 09:09:37 +0100 Subject: [PATCH] =?UTF-8?q?svtplay:=20don=E2=80=99t=20crash=20when=20we=20?= =?UTF-8?q?can=E2=80=99t=20get=20any=20HLS=20streams?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/svtplay_dl/service/svtplay.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/svtplay_dl/service/svtplay.py b/lib/svtplay_dl/service/svtplay.py index cd5e8c2..0c06ea1 100644 --- a/lib/svtplay_dl/service/svtplay.py +++ b/lib/svtplay_dl/service/svtplay.py @@ -79,8 +79,9 @@ class Svtplay(Service, OpenGraphThumbMixin): if parse.path.find("m3u8") > 0: streams = hlsparse(i["url"]) - for n in list(streams.keys()): - yield HLS(copy.copy(options), streams[n], n) + if streams: + for n in list(streams.keys()): + yield HLS(copy.copy(options), streams[n], n) elif parse.path.find("f4m") > 0: match = re.search(r"\/se\/secure\/", i["url"]) if not match: