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

Main function.. no global variables

This commit is contained in:
Johan Andersson 2011-03-19 14:09:31 +01:00
parent a2229b17e8
commit 090fa40ba6

View File

@ -52,6 +52,7 @@ def gethttp(url, output):
fd.close() fd.close()
def main():
argv = sys.argv[1] argv = sys.argv[1]
DATA = getdata(argv) DATA = getdata(argv)
MATCH = re.search('dynamicStreams=(.*)\&amp\;background', DATA) MATCH = re.search('dynamicStreams=(.*)\&amp\;background', DATA)
@ -72,3 +73,6 @@ if STREAM[0:4] == "rtmp":
getrtmp(STREAM, OUTPUT) getrtmp(STREAM, OUTPUT)
else: else:
gethttp(STREAM, OUTPUT) gethttp(STREAM, OUTPUT)
if __name__ == "__main__":
main()