1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-27 21:54:17 +01:00

urplay: support for subtitles

This commit is contained in:
Johan Andersson 2013-02-21 19:51:52 +01:00
parent b036149a00
commit 2febdd855e

View File

@ -794,6 +794,7 @@ class Urplay():
data = re.sub("(\w+): ", r'"\1":',data.group(1))
data = data.replace("\'", "\"").replace("\",}","\"}").replace("(m = location.hash.match(/[#&]start=(\d+)/)) ? m[1] : 0,","0")
jsondata = json.loads(data)
subtitle = jsondata["subtitles"].split(",")[0]
basedomain = jsondata["streaming_config"]["streamer"]["redirect"]
http = "http://%s/%s" % (basedomain, jsondata["file_html5"])
hds = "%s%s" % (http, jsondata["streaming_config"]["http_streaming"]["hds_file"])
@ -805,6 +806,8 @@ class Urplay():
download_hls(options, hls, http)
else:
download_rtmp(options, rtmp)
if options.subtitle:
subtitle_tt(options, subtitle)
class Qbrick():
def handle(self, url):