From 7ee2dd5c1e1070c84ec99927114a733806e6b16b Mon Sep 17 00:00:00 2001 From: Johan Andersson Date: Thu, 15 Aug 2013 14:20:02 +0200 Subject: [PATCH] viaplay: new site update. --- lib/svtplay_dl/service/viaplay.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/svtplay_dl/service/viaplay.py b/lib/svtplay_dl/service/viaplay.py index 2cdea10..0bf56c7 100644 --- a/lib/svtplay_dl/service/viaplay.py +++ b/lib/svtplay_dl/service/viaplay.py @@ -43,7 +43,14 @@ class Viaplay(Service): xml = ET.XML(data) 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) if options.subtitle and subtitle: if options.output != "-":