From 46a8dd89baaff010f30a6a1b1ff7aa183e25b92b Mon Sep 17 00:00:00 2001 From: Roy Olav Purser Date: Fri, 30 Apr 2021 11:24:25 +0200 Subject: [PATCH] test for stream --- stream.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stream.py b/stream.py index 7d455f4..a64a589 100755 --- a/stream.py +++ b/stream.py @@ -15,7 +15,9 @@ class MainHandler(tornado.web.RequestHandler): endpoint = None src = providers[provider] + self.request.uri try: - endpoint = streamlink.streams(src).get("best").url + stream = streamlink.streams(src).get("best") + if stream is not None: + endpoint = stream.url except Exception as e: self.write(str(e)) else: