From 1ec914d3705dd6d9d44adb0fa33496a8de5d8f44 Mon Sep 17 00:00:00 2001 From: Johan Andersson Date: Sun, 14 Mar 2021 00:09:09 +0100 Subject: [PATCH] svtplay: dont crash on non-existing video --- lib/svtplay_dl/service/svtplay.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/svtplay_dl/service/svtplay.py b/lib/svtplay_dl/service/svtplay.py index 2b4018a..ddcbb43 100644 --- a/lib/svtplay_dl/service/svtplay.py +++ b/lib/svtplay_dl/service/svtplay.py @@ -72,7 +72,7 @@ class Svtplay(Service, MetadataThumbMixin): for data_entry in janson["props"]["urqlState"].values(): entry = json.loads(data_entry["data"]) for key, data in entry.items(): - if key == "detailsPage" and "moreDetails" in data: + if key == "detailsPage" and data and "moreDetails" in data: video_data = data vid = data["video"]["svtId"] break