From 40ad490efe38a1f1c66e75b1a99b1956ff06736e Mon Sep 17 00:00:00 2001 From: Christopher Rosell Date: Thu, 23 Aug 2012 22:51:52 +0200 Subject: livestreamer.plugins.justintv: Small tweak to login check. --- src/livestreamer/plugins/justintv.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/livestreamer/plugins/justintv.py b/src/livestreamer/plugins/justintv.py index c3e7826..4aeca9b 100644 --- a/src/livestreamer/plugins/justintv.py +++ b/src/livestreamer/plugins/justintv.py @@ -57,7 +57,11 @@ class JustinTV(Plugin): for node in element.childNodes: if node.nodeType == node.TEXT_NODE: res.append(node.data) - return "".join(res) + + if len(res) == 0: + return None + else: + return "".join(res) def _get_streaminfo(self, channelname): def clean_tag(tag): @@ -74,7 +78,7 @@ class JustinTV(Plugin): metadata = self._get_metadata(channelname) chansub = metadata["access_guid"] - if "login" in metadata: + if "login" in metadata and metadata["login"] is not None: self.logger.debug("Successfully logged in as {0}", metadata["login"]) -- cgit v1.2.3