add tornado
This commit is contained in:
parent
02fa4a73e7
commit
2b7e81add8
@ -2,7 +2,6 @@
|
|||||||
import streamlink
|
import streamlink
|
||||||
import tornado.web
|
import tornado.web
|
||||||
import tornado.routing
|
import tornado.routing
|
||||||
import urllib.parse
|
|
||||||
|
|
||||||
providers = {}
|
providers = {}
|
||||||
providers["nrk"] = "https://tv.nrk.no"
|
providers["nrk"] = "https://tv.nrk.no"
|
||||||
@ -12,7 +11,7 @@ providers["youtube"] = "https://youtu.be"
|
|||||||
class MainHandler(tornado.web.RequestHandler):
|
class MainHandler(tornado.web.RequestHandler):
|
||||||
def get(self):
|
def get(self):
|
||||||
provider = self.get_query_argument("provider", None)
|
provider = self.get_query_argument("provider", None)
|
||||||
if provider in providers:
|
if provider is not None and provider in providers:
|
||||||
endpoint = None
|
endpoint = None
|
||||||
src = providers[provider] + self.request.uri
|
src = providers[provider] + self.request.uri
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user