]> code.delx.au - webdl/commitdiff
Return false instead of throwing exception when missing HLS stream
authorJames Bunton <jamesbunton@delx.net.au>
Tue, 26 May 2015 21:44:45 +0000 (07:44 +1000)
committerJames Bunton <jamesbunton@delx.net.au>
Tue, 26 May 2015 21:44:45 +0000 (07:44 +1000)
brightcove.py

index e52e15cff1f28c21a2e82dc6568154592082f502..7bb57372572840fdb7173288b7a7177370f22d80 100644 (file)
@@ -26,7 +26,8 @@ class BrightcoveVideoNode(Node):
         doc = grab_json(desc_url, 3600)
         video_url = doc["HLSURL"]
         if not video_url:
         doc = grab_json(desc_url, 3600)
         video_url = doc["HLSURL"]
         if not video_url:
-            raise Exception("No HLS stream available for: " + self.title)
+            print("No HLS stream available for: " + self.title)
+            return False
 
         filename = self.title + ".ts"
         return download_hls(filename, video_url)
 
         filename = self.title + ".ts"
         return download_hls(filename, video_url)