Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
metavar='FILENAME')
options, args = parser.parse_args()
if options.url is None:
print('You must enter a url to download\n')
parser.print_help()
exit()
if not options.file:
options.file = re.search('[^/]*$', options.url).group(0)
if not options.file or len(options.file) < 1:
print('Invalid file name specified\n')
parser.print_help()
exit()
log.startLogging(sys.stdout)
factory = RTSPClientFactory(options.url, options.file)
factory.protocol = RDTClient
factory.bandwidth = 99999999999
factory.deferred.addCallback(success).addErrback(error)
reactor.connectTCP(factory.host, factory.port, factory)
reactor.callLater(1, progress, factory)
reactor.run()