add tornado

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

View File

@ -2,7 +2,6 @@
import streamlink
import tornado.web
import tornado.routing
import urllib.parse
providers = {}
providers["nrk"] = "https://tv.nrk.no"
@ -12,7 +11,7 @@ providers["youtube"] = "https://youtu.be"
class MainHandler(tornado.web.RequestHandler):
def get(self):
provider = self.get_query_argument("provider", None)
if provider in providers:
if provider is not None and provider in providers:
endpoint = None
src = providers[provider] + self.request.uri
try: