aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Christopher Rosell <chrippa@tanuki.se>2012-09-11 12:33:18 +0200
committerGravatar Christopher Rosell <chrippa@tanuki.se>2012-09-11 12:33:18 +0200
commita3c1bf9f04cefb58cd19a1fc8e007a4b190e4b7c (patch)
treec7fea3a8b187792f7b052713d00c99a41dd2098e
parentd88fb6795877f6d04941f528a4ce05b450d2711b (diff)
livestreamer.plugins.justintv: Verify stream info.
-rw-r--r--src/livestreamer/cli.py2
-rw-r--r--src/livestreamer/plugins/justintv.py3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/livestreamer/cli.py b/src/livestreamer/cli.py
index 24b5c85..6a886e5 100644
--- a/src/livestreamer/cli.py
+++ b/src/livestreamer/cli.py
@@ -137,7 +137,7 @@ def check_output(output, force):
try:
out = open(output, "wb")
except IOError as err:
- exit(("Failed to open file {0} - ").format(output, err))
+ exit(("Failed to open file {0} - {1}").format(output, err))
return out
diff --git a/src/livestreamer/plugins/justintv.py b/src/livestreamer/plugins/justintv.py
index 4fe93be..3eef869 100644
--- a/src/livestreamer/plugins/justintv.py
+++ b/src/livestreamer/plugins/justintv.py
@@ -121,6 +121,9 @@ class JustinTV(Plugin):
for child in node.childNodes:
info[child.tagName] = self._get_node_text(child)
+ if not ("connect" in info and "play" in info):
+ continue
+
stream = RTMPStream(self.session, {
"rtmp": ("{0}/{1}").format(info["connect"], info["play"]),
"swfUrl": self.SWFURL,