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: