1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-30 15:14:14 +01:00

justin: support for non-subscriber channels

This commit is contained in:
Johan Andersson 2013-08-17 11:57:00 +02:00
parent b5c9339b2c
commit fcd83a2a61

View File

@ -51,14 +51,13 @@ class Justin(Service):
sa = list(xml)
streams = {}
for i in sa:
if i.tag[1:][:-1] != "iv":
try:
stream = {}
stream["token"] = i.find("token").text
stream["url"] = "%s/%s" % (i.find("connect").text, i.find("play").text)
streams[int(i.find("video_height").text)] = stream
except AttributeError:
pass
try:
stream = {}
stream["token"] = i.find("token").text
stream["url"] = "%s/%s" % (i.find("connect").text, i.find("play").text)
streams[int(i.find("video_height").text)] = stream
except AttributeError:
pass
if len(streams) > 0:
test = select_quality(options, streams)
options.other = "-j '%s' -W %s" % (test["token"], options.other)