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

viaplay: new site update.

This commit is contained in:
Johan Andersson 2013-08-15 14:20:02 +02:00
parent dcf140475d
commit 7ee2dd5c1e

View File

@ -43,7 +43,14 @@ class Viaplay(Service):
xml = ET.XML(data) xml = ET.XML(data)
filename = xml.find("Url").text filename = xml.find("Url").text
options.other = "-W http://flvplayer.viastream.viasat.tv/flvplayer/play/swf/player.swf" parse = urlparse(filename)
match = re.search("^(/[a-z0-9]{0,5})/(.*)", parse.path)
if not match:
log.error("Somthing wrong with rtmpparse")
sys.exit(2)
filename = "%s://%s%s" % (parse.scheme, parse.hostname, match.group(1))
path = "-y %s" % match.group(2)
options.other = "-W http://flvplayer.viastream.viasat.tv/flvplayer/play/swf/player.swf %s" % path
download_rtmp(options, filename) download_rtmp(options, filename)
if options.subtitle and subtitle: if options.subtitle and subtitle:
if options.output != "-": if options.output != "-":