mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-27 21:54:17 +01:00
Cosmetics
This commit is contained in:
parent
2c96664f43
commit
f9a8508180
14
svtplay-dl
14
svtplay-dl
@ -35,12 +35,12 @@ class Common(object):
|
|||||||
|
|
||||||
def getrtmp(self, url, output, live, other):
|
def getrtmp(self, url, output, live, other):
|
||||||
""" Get the stream from RTMP """
|
""" Get the stream from RTMP """
|
||||||
encrypted =""
|
encrypted = ""
|
||||||
if url[4:5] == "e":
|
if url[4:5] == "e":
|
||||||
# For encrypted streams
|
# For encrypted streams
|
||||||
encrypted = "-l 2"
|
encrypted = "-l 2"
|
||||||
if live:
|
if live:
|
||||||
live = "-v"
|
live = "-v"
|
||||||
|
|
||||||
rtmpdump = "rtmpdump -r %s -o %s %s %s %s" % (url, output, encrypted, other, live)
|
rtmpdump = "rtmpdump -r %s -o %s %s %s %s" % (url, output, encrypted, other, live)
|
||||||
command = shlex.split(rtmpdump)
|
command = shlex.split(rtmpdump)
|
||||||
@ -81,7 +81,6 @@ class Expressen(Common):
|
|||||||
streams = {}
|
streams = {}
|
||||||
|
|
||||||
for i in sa:
|
for i in sa:
|
||||||
stream = {}
|
|
||||||
streams[i.attrib["bitrate"]] = i.text
|
streams[i.attrib["bitrate"]] = i.text
|
||||||
|
|
||||||
sort = []
|
sort = []
|
||||||
@ -188,8 +187,9 @@ class Tv4play(Common):
|
|||||||
sys.exit(2)
|
sys.exit(2)
|
||||||
|
|
||||||
if not self.output:
|
if not self.output:
|
||||||
self.output = os.path.basename(streams[str(self.quality)]["path"])
|
self.output = os.path.basename(streams[str(self.quality)]["path"])
|
||||||
print "Outfile: ", self.output
|
print "Outfile: ", self.output
|
||||||
|
|
||||||
self.getrtmp(streams[str(self.quality)]["uri"], self.output, self.live, other)
|
self.getrtmp(streams[str(self.quality)]["uri"], self.output, self.live, other)
|
||||||
|
|
||||||
class Svtplay(Common):
|
class Svtplay(Common):
|
||||||
@ -225,8 +225,8 @@ class Svtplay(Common):
|
|||||||
filename = match.group(1)
|
filename = match.group(1)
|
||||||
|
|
||||||
if not self.output:
|
if not self.output:
|
||||||
self.output = os.path.basename(filename)
|
self.output = os.path.basename(filename)
|
||||||
print "Outfile: ", self.output
|
print "Outfile: ", self.output
|
||||||
|
|
||||||
if filename[0:4] == "rtmp":
|
if filename[0:4] == "rtmp":
|
||||||
self.getrtmp(filename, self.output, self.live, other)
|
self.getrtmp(filename, self.output, self.live, other)
|
||||||
|
Loading…
Reference in New Issue
Block a user