1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-23 19:55:38 +01:00

Added support to download videos from tv6play

This commit is contained in:
Johan Andersson 2011-09-16 17:25:07 +02:00
parent 4a3780e1ac
commit 06d4071e71

View File

@ -77,6 +77,10 @@ class Viaplay(Common):
data = self.getdata(url)
xml = ET.XML(data)
ss = xml.find("Product").find("Videos").find("Video").find("Url").text
if ss[:4] == "http":
data = self.getdata(ss)
xml = ET.XML(data)
ss = xml.find("Url").text
if not self.output:
self.output = os.path.basename(ss)
print "Outfile: ", self.output
@ -201,6 +205,16 @@ def main():
viaplay = Viaplay(output, quality, live)
viaplay.get(url)
elif re.findall("tv6play", url):
parse = urlparse.urlparse(url)
match = re.search('\/play\/(.*)/', parse.path)
if not match:
print "Something wrong with that url"
sys.exit(2)
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)