mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-24 12:15:40 +01:00
viaplay: forgot else after that f4m fix.
This commit is contained in:
parent
5e47b7bc26
commit
924cca1380
@ -78,27 +78,28 @@ class Viaplay(Service, OpenGraphThumbMixin):
|
||||
streams = hdsparse(options, manifest)
|
||||
for n in list(streams.keys()):
|
||||
yield streams[n]
|
||||
if filename[:4] == "http":
|
||||
data = get_http_data(filename)
|
||||
xml = ET.XML(data)
|
||||
filename = xml.find("Url").text
|
||||
if xml.find("Msg").text:
|
||||
log.error("Can't download file:")
|
||||
log.error(xml.find("Msg").text)
|
||||
else:
|
||||
if filename[:4] == "http":
|
||||
data = get_http_data(filename)
|
||||
xml = ET.XML(data)
|
||||
filename = xml.find("Url").text
|
||||
if xml.find("Msg").text:
|
||||
log.error("Can't download file:")
|
||||
log.error(xml.find("Msg").text)
|
||||
sys.exit(2)
|
||||
|
||||
parse = urlparse(filename)
|
||||
match = re.search("^(/[a-z0-9]{0,20})/(.*)", parse.path)
|
||||
if not match:
|
||||
log.error("Somthing wrong with rtmpparse")
|
||||
sys.exit(2)
|
||||
filename = "%s://%s:%s%s" % (parse.scheme, parse.hostname, parse.port, match.group(1))
|
||||
path = "-y %s" % match.group(2)
|
||||
options.other = "-W http://flvplayer.viastream.viasat.tv/flvplayer/play/swf/player.swf %s" % path
|
||||
if options.subtitle and options.force_subtitle:
|
||||
return
|
||||
|
||||
parse = urlparse(filename)
|
||||
match = re.search("^(/[a-z0-9]{0,20})/(.*)", parse.path)
|
||||
if not match:
|
||||
log.error("Somthing wrong with rtmpparse")
|
||||
sys.exit(2)
|
||||
filename = "%s://%s:%s%s" % (parse.scheme, parse.hostname, parse.port, match.group(1))
|
||||
path = "-y %s" % match.group(2)
|
||||
options.other = "-W http://flvplayer.viastream.viasat.tv/flvplayer/play/swf/player.swf %s" % path
|
||||
if options.subtitle and options.force_subtitle:
|
||||
return
|
||||
|
||||
yield RTMP(options, filename, bitrate)
|
||||
yield RTMP(options, filename, bitrate)
|
||||
|
||||
def find_all_episodes(self, options):
|
||||
format_id = re.search(r'data-format-id="(\d+)"', self.get_urldata())
|
||||
|
Loading…
Reference in New Issue
Block a user