mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-27 13:44:14 +01:00
svtplay: support for oppetarkiv.se
This commit is contained in:
parent
514ed7e546
commit
4ebf565652
@ -12,7 +12,7 @@ from svtplay_dl.utils import get_http_data
|
||||
from svtplay_dl.service import service_handler, Generic
|
||||
|
||||
|
||||
__version__ = "0.9.2013.04.14-dev"
|
||||
__version__ = "0.9.2013.04.16-dev"
|
||||
|
||||
class Options:
|
||||
"""
|
||||
|
@ -17,7 +17,7 @@ from svtplay_dl.log import log
|
||||
|
||||
class Svtplay(Service):
|
||||
def handle(self, url):
|
||||
return ("svtplay.se" in url) or ("svt.se" in url)
|
||||
return ("svtplay.se" in url) or ("svt.se" in url) or ("oppetarkiv.se" in url)
|
||||
|
||||
def get(self, options, url):
|
||||
if re.findall("svt.se", url):
|
||||
@ -31,12 +31,15 @@ class Svtplay(Service):
|
||||
sys.exit(2)
|
||||
url = "%s?type=embed" % url
|
||||
data = get_http_data(url)
|
||||
match = re.search("value=\"(/(public)?(statiskt)?/swf/video/svtplayer-[0-9\.]+swf)\"", data)
|
||||
match = re.search("value=\"(/(public)?(statiskt)?/swf(/video)?/svtplayer-[0-9\.a-f]+swf)\"", data)
|
||||
swf = "http://www.svtplay.se%s" % match.group(1)
|
||||
options.other = "-W %s" % swf
|
||||
url = "%s&output=json&format=json" % url
|
||||
data = json.loads(get_http_data(url))
|
||||
options.live = data["video"]["live"]
|
||||
if "live" in data["video"]:
|
||||
options.live = data["video"]["live"]
|
||||
else:
|
||||
options.live = False
|
||||
streams = {}
|
||||
streams2 = {} #hack..
|
||||
for i in data["video"]["videoReferences"]:
|
||||
|
Loading…
Reference in New Issue
Block a user