From 6a922a86dbe88133a9ed7c3e06f6881eea485b27 Mon Sep 17 00:00:00 2001 From: Johan Andersson Date: Thu, 22 Aug 2019 18:09:25 +0200 Subject: [PATCH] barnkanalen: dont crash on show page --- lib/svtplay_dl/service/barnkanalen.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/svtplay_dl/service/barnkanalen.py b/lib/svtplay_dl/service/barnkanalen.py index 55b5365..3cbb19e 100644 --- a/lib/svtplay_dl/service/barnkanalen.py +++ b/lib/svtplay_dl/service/barnkanalen.py @@ -43,6 +43,10 @@ class Barnkanalen(Svtplay): return janson = json.loads(match.group(1))["context"]["dispatcher"]["stores"]["ApplicationStateStore"]["data"] + if "episodeModel" not in janson["categoryStateCache"]["karaktarer"]: + yield ServiceError("No videos found") + return + janson["video"] = janson["categoryStateCache"]["karaktarer"]["episodeModel"] if "title" not in janson["video"]: