From 8445131754d58418bd3bddc11c34b5953a23a406 Mon Sep 17 00:00:00 2001 From: Johan Andersson Date: Fri, 16 Sep 2011 18:01:53 +0200 Subject: [PATCH] Added support to download videos from viaplay --- svtplay-dl | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/svtplay-dl b/svtplay-dl index 6f4a98b..f274984 100755 --- a/svtplay-dl +++ b/svtplay-dl @@ -226,6 +226,22 @@ def main(): viaplay = Viaplay(output, quality, live) viaplay.get(url) + elif re.findall("viaplay", url): + common = Common() + parse = urlparse.urlparse(url) + match = re.search('\/Tv/channels\/[a-zA-Z0-9-]+\/[a-zA-Z0-9-]+\/[a-zA-Z0-9-]+\/(.*)/', parse.path) + if not match: + print "Something wrong with that url" + sys.exit(2) + url = "http://viasat.web.entriq.net/nw/article/view/%s/?tf=players/TV6.tpl" % match.group(1) + data = common.getdata(url) + match = re.search("id:'(.*)'", data) + if not match: + print "Something wrong with that url" + url = "http://viastream.viasat.tv/PlayProduct/%s" % match.group(1) + viaplay = Viaplay(output, quality, live) + viaplay.get(url) + else: svtplay = Svtplay(output, quality, live) svtplay.get(url)