mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-24 04:05:39 +01:00
Added support to download videos from viaplay
This commit is contained in:
parent
c6bc744ca0
commit
8445131754
16
svtplay-dl
16
svtplay-dl
@ -226,6 +226,22 @@ def main():
|
|||||||
viaplay = Viaplay(output, quality, live)
|
viaplay = Viaplay(output, quality, live)
|
||||||
viaplay.get(url)
|
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:
|
else:
|
||||||
svtplay = Svtplay(output, quality, live)
|
svtplay = Svtplay(output, quality, live)
|
||||||
svtplay.get(url)
|
svtplay.get(url)
|
||||||
|
Loading…
Reference in New Issue
Block a user