test for stream

This commit is contained in:
Roy Olav Purser 2021-04-30 11:24:25 +02:00
parent 2b7e81add8
commit 46a8dd89ba
No known key found for this signature in database
GPG Key ID: 0BA77797F072BC52

View File

@ -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: