mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-27 21:54:17 +01:00
Print error msg if it cant find the stream
This commit is contained in:
parent
2c3bc7293e
commit
de575ac3b8
@ -11,11 +11,16 @@ def getdata(url):
|
||||
argv = sys.argv[1]
|
||||
text = getdata(argv)
|
||||
m = re.search('dynamicStreams=(.*)\&\;background', text)
|
||||
if m:
|
||||
new = m.group(1)
|
||||
tmp = new.split("|")
|
||||
m = re.search('url:(.*)\,',tmp[0])
|
||||
else:
|
||||
m = re.search('pathflv=(.*)\&\;background',text)
|
||||
if not m:
|
||||
print "Err: cant find stream"
|
||||
sys.exit(2)
|
||||
stream = m.group(1)
|
||||
output = os.path.basename(stream)
|
||||
command = ["/usr/bin/rtmpdump","-r",stream,"-o",output]
|
||||
subprocess.call(command)
|
||||
print output
|
||||
|
Loading…
Reference in New Issue
Block a user