]> code.delx.au - webdl/commitdiff
More detailed error when SBS fails
authorJames Bunton <jamesbunton@delx.net.au>
Mon, 22 May 2017 08:22:45 +0000 (18:22 +1000)
committerJames Bunton <jamesbunton@delx.net.au>
Mon, 22 May 2017 08:22:45 +0000 (18:22 +1000)
sbs.py

diff --git a/sbs.py b/sbs.py
index 5304c4ca66d0f1f4d8189ad8d5161c6760d7c7af..619aea16044817c18a85cd41f49e84961d507097 100644 (file)
--- a/sbs.py
+++ b/sbs.py
@@ -73,6 +73,8 @@ class SbsRootNode(SbsNavNode):
         while True:
             url = append_to_qs(FULL_VIDEO_LIST, {"range": "%s-%s" % (offset, offset+amount)})
             data = grab_json(url)
+            if "entries" not in data:
+                raise Exception("Missing data in SBS response", data)
             entries = data["entries"]
             if len(entries) == 0:
                 break