diff --git a/svtplay-dl b/svtplay-dl index 89035f9..0e9be66 100755 --- a/svtplay-dl +++ b/svtplay-dl @@ -11,11 +11,16 @@ def getdata(url): argv = sys.argv[1] text = getdata(argv) m = re.search('dynamicStreams=(.*)\&\;background', text) -new = m.group(1) -tmp = new.split("|") -m = re.search('url:(.*)\,',tmp[0]) +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