1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-24 04:05:39 +01:00

Added support to download videos from tv8play

This commit is contained in:
Johan Andersson 2011-09-16 17:35:18 +02:00
parent 06d4071e71
commit c6bc744ca0

View File

@ -84,6 +84,7 @@ class Viaplay(Common):
if not self.output:
self.output = os.path.basename(ss)
print "Outfile: ", self.output
other = "-W http://flvplayer.viastream.viasat.tv/play/swf/player110516.swf?rnd=1315434062"
self.getrtmp(ss, self.output, self.live, other)
class Tv4play(Common):
@ -215,6 +216,16 @@ def main():
viaplay = Viaplay(output, quality, live)
viaplay.get(url)
elif re.findall("tv8play", 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)